-
Notifications
You must be signed in to change notification settings - Fork 684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPM] Add logic to disable the feature before stopping it and enabling it before starting #3344
[SPM] Add logic to disable the feature before stopping it and enabling it before starting #3344
Conversation
…it before starting.
@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 |
@@ -1017,8 +1017,10 @@ def _get_installed_packages_except(self, package: Package) -> Dict[str, Package] | |||
|
|||
def _stop_feature(self, package: Package): | |||
self._systemctl_action(package, 'stop') | |||
self._systemctl_action(package, 'disable') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@qiluo-msft UT added
/Azpw run |
/azpw run |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
…g 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 start
Cherry-pick PR to 202405: #3619 |
…g it before starting (#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 start
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 withdelayed
attribute explained in theHow to verify it
section.How I did it
Add the
systemctl disable ...
after thesystemctl stop...
and thesystemctl enable ...
before thesystemctl start ..
for some feature.How to verify it
featureX
sonic-package-manager repository <featureX> <URL>
featureX
version 1.0.0 where thedelayed
flag is equal tofalse
(delayed
flag means - the feature will be started right after the system boots or after thePortInitDone
event)sonic-package-manager install featureX==1.0.0 -y
config feature state featureX enabled
featureX
version 1.0.1 where thedelayed
flag is equal totrue
sonic-package-manager install featureX==1.0.1 -y
manifest
file to verify thedelayed
field valuesonic-package-manager show package manifest featureX
config save -y
reboot
featureX
is delayed on the system startPrevious 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)