Skip to content

Commit 1534785

Browse files
CharlieChenECzhenggen-xu
authored andcommitted
[devices]:start opennsl modules after platform handle mac service on AS7326-56X/AS7726-56X (sonic-net#3726)
AS7326-56X and AS7726-56X use the same design so both devices have the same problem. The detailed description below takes AS7326-56X as the example to explain. Original implementation: - In platform/broadcom/sonic-platform-modules-accton/as7326-56x/service/as7326-platform-handle_mac.service, it executes the script file "accton_handle_idt.sh". - In "accton_handle_idt.sh", it modifies the content of the script file "/etc/init.d/opennsl-modules" to insert the lines to execute "idt_init.sh" before the command to load broadcom linux kernel module "linux-kernel-bde.ko". - The script "idt_init.sh" cannot be executed at the first boot of SONiC after installing SONiC under ONIE. This is the reason why all of the ports does not work. New implementation: - Let "as7326-platform-handle_mac.service" execute "idt_init.sh". - Change the content of "as7326-platform-handle_mac.service" to define the service type as "oneshot". Add the settings to ensure "as7326-platform-handle_mac.service" is executed before "opennsl-modules.service". By setting the service type as "oneshot", it is guaranteed that "opennsl-modules.services" is started only when the forked process to execute the script file "idt_init.sh" is terminated Signed-off-by: charlie_chen <charlie_chen@edge-core.com>
1 parent 53ed9a5 commit 1534785

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
[Unit]
2-
Description=Accton AS7326-56X Platform MAC hnadle service
3-
Before=pmon.service
4-
After=sysinit.target
5-
DefaultDependencies=no
2+
Description=Accton AS7326-56X Platform MAC handle service
3+
Before=opennsl-modules.service
4+
After=local-fs.target
65

76
[Service]
8-
ExecStart=/usr/local/bin/accton_handle_idt.sh
9-
KillSignal=SIGKILL
10-
SuccessExitStatus=SIGKILL
7+
Type=oneshot
8+
ExecStart=/usr/local/bin/idt_init.sh
9+
RemainAfterExit=yes
1110

1211
# Resource Limitations
1312
LimitCORE=infinity
1413

1514
[Install]
16-
WantedBy=multi-user.target
15+
WantedBy=opennsl-modules.service
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
[Unit]
2-
Description=Accton AS7726-32X Platform MAC hnadle service
3-
Before=pmon.service
4-
After=sysinit.target
5-
DefaultDependencies=no
2+
Description=Accton AS7726-32X Platform MAC handle service
3+
Before=opennsl-modules.service
4+
After=local-fs.target
65

76
[Service]
8-
ExecStart=/usr/local/bin/accton_handle_idt.sh
9-
KillSignal=SIGKILL
10-
SuccessExitStatus=SIGKILL
7+
Type=oneshot
8+
ExecStart=/usr/local/bin/idt_init.sh
9+
RemainAfterExit=yes
1110

1211
# Resource Limitations
1312
LimitCORE=infinity
1413

1514
[Install]
16-
WantedBy=multi-user.target
15+
WantedBy=opennsl-modules.service

0 commit comments

Comments
 (0)