sonic-utilities icon indicating copy to clipboard operation
sonic-utilities copied to clipboard

[SPM] Add logic to disable the feature before stopping it and enabling it before starting

Open vadymhlushko-mlnx opened this issue 1 year ago • 8 comments

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

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)

vadymhlushko-mlnx avatar May 29 '24 12:05 vadymhlushko-mlnx

@lguohan can you suggest a reviewer for this issue?

liat-grozovik avatar May 30 '24 11:05 liat-grozovik

@lguohan kindly reminder the fix should go for both 202311 and 202405

liat-grozovik avatar Jun 10 '24 11:06 liat-grozovik

@qiluo-msft could you please help to review?

liat-grozovik avatar Jun 24 '24 06:06 liat-grozovik

@qiluo-msft kindly reminder. do you want to assign someone else ? we need this to get in soon please

liat-grozovik avatar Sep 03 '24 08:09 liat-grozovik

/Azpw run

stepanblyschak avatar Oct 28 '24 16:10 stepanblyschak

/azpw run

stepanblyschak avatar Oct 28 '24 17:10 stepanblyschak

/azp run

bingwang-ms avatar Nov 01 '24 17:11 bingwang-ms

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Nov 01 '24 17:11 azure-pipelines[bot]

Cherry-pick PR to 202405: https://github.com/sonic-net/sonic-utilities/pull/3619

mssonicbld avatar Nov 15 '24 18:11 mssonicbld