sonic-utilities
sonic-utilities copied to clipboard
[SPM] Add logic to disable the feature before stopping it and enabling it before starting
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
featureXversion 1.0.0 where thedelayedflag is equal tofalse(delayedflag means - the feature will be started right after the system boots or after thePortInitDoneevent) sonic-package-manager install featureX==1.0.0 -y- Enable the feature in SONiC
config feature state featureX enabled- Install
featureXversion 1.0.1 where thedelayedflag is equal totrue sonic-package-manager install featureX==1.0.1 -y- Check the
manifestfile to verify thedelayedfield value sonic-package-manager show package manifest featureXconfig save -yreboot- Check that the
featureXis delayed on the system start
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)
@lguohan can you suggest a reviewer for this issue?
@lguohan kindly reminder the fix should go for both 202311 and 202405
@qiluo-msft could you please help to review?
@qiluo-msft kindly reminder. do you want to assign someone else ? we need this to get in soon please
/Azpw run
/azpw run
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
Cherry-pick PR to 202405: https://github.com/sonic-net/sonic-utilities/pull/3619