internal [SPM] Add logic to disable the feature before stopping it and enabling it before starting #30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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)