Skip to content

Commit 9084c91

Browse files
committed
NOS-364: Add systemd services for Forwarding Stack services (#330)
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. --> **Pre-submission checklist** - [x] I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running `pip install -r requirements-dev.txt && pre-commit install` - [x] `pre-commit run` # Summary Adding systemd service units for Forwarding stack FBOSS services. The first PR can be found here: nexthop-ai/private-fboss#277 - Added and enabled `qsfp_service` systemd unit - Added and enabled `wdge_agent` systemd unit # Test Plan TBD <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? --> <!-- If a relevant Github issue exists for this PR, please make sure you link that issue to this PR -->
1 parent 0030899 commit 9084c91

File tree

3 files changed

+65
-0
lines changed

3 files changed

+65
-0
lines changed

fboss-image/image_builder/templates/centos-09.0/config.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ systemctl enable data_corral_service.service
5858
systemctl enable fan_service.service
5959
systemctl enable sensor_service.service
6060
systemctl enable fsdb.service
61+
systemctl enable qsfp_service.service
62+
systemctl enable wedge_agent.service
6163

6264
# 6. Done! Cleanup, remember that we are chrooted on the rootfs
6365
echo "Removing kernel rpms from rootfs..."
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# /usr/lib/systemd/system/qsfp_service.service
2+
[Unit]
3+
Description=FBOSS QSFP Service
4+
After=platform_manager.service
5+
After=rc-local.service
6+
StartLimitIntervalSec=600
7+
StartLimitBurst=5
8+
9+
[Service]
10+
Type=notify
11+
LimitNOFILE=10000000
12+
LimitCORE=32G
13+
MemoryMax=3.75G
14+
MemorySwapMax=0
15+
16+
Environment="PATH=/opt/fboss/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
17+
Environment="LD_LIBRARY_PATH=/opt/fboss/lib"
18+
WorkingDirectory=/opt/fboss
19+
ExecStart=/bin/bash -c 'source /opt/fboss/bin/setup_fboss_env && exec /opt/fboss/bin/qsfp_service'
20+
21+
Restart=always
22+
RestartSec=30
23+
TimeoutStartSec=180s
24+
25+
# Logging to journald
26+
StandardOutput=journal
27+
StandardError=journal
28+
SyslogIdentifier=qsfp_service
29+
30+
[Install]
31+
WantedBy=multi-user.target
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# /usr/lib/systemd/system/wedge_agent.service
2+
[Unit]
3+
Description=FBOSS Wedge Agent
4+
After=platform_manager.service
5+
After=qsfp_service.service
6+
After=rc-local.service
7+
StartLimitIntervalSec=600
8+
StartLimitBurst=5
9+
10+
[Service]
11+
Type=notify
12+
LimitNOFILE=10000000
13+
LimitCORE=32G
14+
MemoryMax=3.75G
15+
MemorySwapMax=0
16+
17+
Environment="PATH=/opt/fboss/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
18+
Environment="LD_LIBRARY_PATH=/opt/fboss/lib"
19+
WorkingDirectory=/opt/fboss
20+
ExecStart=/bin/bash -c 'source /opt/fboss/bin/setup_fboss_env && exec /opt/fboss/bin/wedge_agent-sai_impl'
21+
22+
Restart=always
23+
RestartSec=30
24+
TimeoutStartSec=180s
25+
26+
# Logging to journald
27+
StandardOutput=journal
28+
StandardError=journal
29+
SyslogIdentifier=wedge_agent
30+
31+
[Install]
32+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)