Commit 093ed4a
authored
[SPM] Add logic to disable the feature before stopping it and enabling it before starting (sonic-net#3344)
What I did
Add logic to disable the feature before stopping and enabling it before starting in order to properly clean the systemd symlinks to avoid issues with delayed attribute explained in the How to verify it section.
How I did it
Add the systemctl disable ... after the systemctl stop... and the systemctl enable ... before the systemctl start .. for some feature.
How to verify it
Add repository for some featureX
sonic-package-manager repository <featureX> <URL>
Install featureX version 1.0.0 where the delayed flag is equal to false (delayed flag means - the feature will be started right after the system boots or after the PortInitDone event)
sonic-package-manager install featureX==1.0.0 -y
Enable the feature in SONiC
config feature state featureX enabled
Install featureX version 1.0.1 where the delayed flag is equal to true
sonic-package-manager install featureX==1.0.1 -y
Check the manifest file to verify the delayed field value
sonic-package-manager show package manifest featureX
config save -y
reboot
Check that the featureX is delayed on the system start1 parent 7d013df commit 093ed4a
File tree
2 files changed
+13
-2
lines changed- sonic_package_manager
- tests/sonic_package_manager
2 files changed
+13
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1017 | 1017 | | |
1018 | 1018 | | |
1019 | 1019 | | |
| 1020 | + | |
1020 | 1021 | | |
1021 | 1022 | | |
| 1023 | + | |
1022 | 1024 | | |
1023 | 1025 | | |
1024 | 1026 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
| 327 | + | |
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
336 | 345 | | |
337 | 346 | | |
338 | 347 | | |
| |||
370 | 379 | | |
371 | 380 | | |
372 | 381 | | |
373 | | - | |
| 382 | + | |
374 | 383 | | |
375 | 384 | | |
376 | 385 | | |
| |||
0 commit comments