Skip to content

Enhanced Feature table to support 'always_enabled' value for state and auto-restart fields.#6000

Merged
abdosi merged 2 commits intosonic-net:masterfrom
abdosi:feature_update
Nov 25, 2020
Merged

Enhanced Feature table to support 'always_enabled' value for state and auto-restart fields.#6000
abdosi merged 2 commits intosonic-net:masterfrom
abdosi:feature_update

Conversation

@abdosi
Copy link
Contributor

@abdosi abdosi commented Nov 23, 2020

Why I did:
Fixes Issue##5999

How I did:

  • Added new flag value 'always_enabled' for the state and auto-restart field of feature table

  • init_cfg.json is updated to initialize state field of database/swss/syncd/teamd feature and auto-restart field of database feature
    as always_enabled

  • Once the state/auto-restart value is initialized as "always_enabled" it is immutable and cannot be change via feature config commands. (config feature..) PR#Feature table cli command update sonic-utilities#1271

  • hostcfgd will not take any action if state field value is 'always_enabled'

  • Since we have always_enabled field for auto-restart updated supervisor-proc-exit-listener
    not to have special check for database and always rely on value from Feature table.

How I Verify:

  • Cli command
admin@str-xxx-2:/var/log$ show feature status
Feature     State           AutoRestart
----------  --------------  --------------
acms        enabled         enabled
bgp         enabled         enabled
database    always_enabled  always_enabled
dhcp_relay  enabled         enabled
lldp        enabled         enabled
pmon        enabled         enabled
radv        enabled         enabled
snmp        enabled         enabled
swss        always_enabled  enabled
syncd       always_enabled  enabled
teamd       always_enabled  enabled
telemetry   enabled         enabled

  • Hostcfgd skip the processing via syslog

Nov 25 01:02:44.925773 str-xxx-2 INFO hostcfgd: Feature 'teamd' service is always enabled

  • Made sure auto-restart works fine for swss/syncd/teamd

@abdosi abdosi marked this pull request as ready for review November 23, 2020 16:48
@abdosi
Copy link
Contributor Author

abdosi commented Nov 23, 2020

vsimage test "test_po_cleanup.py" failure is expected since we need to update the test case based on this change.
In the test case we are using config feature teamd disabled which will not work after this change.

Updated the test case here: sonic-net/sonic-mgmt#2577

@abdosi abdosi changed the base branch from master to 201911 November 24, 2020 02:35
@abdosi abdosi changed the base branch from 201911 to master November 24, 2020 02:35
rlhui
rlhui previously approved these changes Nov 24, 2020
auto-restart field of Feature table.

Signed-off-by: Abhishek Dosi <[email protected]>
Copy link
Contributor

@jleveque jleveque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As comments.

Also please update PR title and description to align with new solution.

@abdosi abdosi changed the title Remove swss/syncd/teamd from Feature Table. Enhanced Feature table to support 'always_enabled' value for state and auto-restart fields. Nov 25, 2020
abdosi added a commit to sonic-net/sonic-mgmt that referenced this pull request Nov 25, 2020
Use systemctl stop teamd instead of config feature.
Changes trigger because of sonic-net/sonic-buildimage#6000
Signed-off-by: Abhishek Dosi <[email protected]>
@abdosi abdosi linked an issue Nov 25, 2020 that may be closed by this pull request
@abdosi abdosi merged commit fad481e into sonic-net:master Nov 25, 2020
@abdosi abdosi deleted the feature_update branch November 25, 2020 16:41
abdosi added a commit that referenced this pull request Nov 25, 2020
…d auto-restart fields. (#6000)

Added new flag value 'always_enabled' for the state and auto-restart field of feature table

init_cfg.json is updated to initialize state field of database/swss/syncd/teamd feature and auto-restart field of database feature
as always_enabled

Once the state/auto-restart value is initialized as "always_enabled" it is immutable and cannot be change via feature config commands. (config feature..) PR#sonic-net/sonic-utilities#1271

hostcfgd will not take any action if state field value is 'always_enabled'

Since we have always_enabled field for auto-restart updated supervisor-proc-exit-listener
not to have special check for database and always rely on value from Feature table.
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
…d auto-restart fields. (sonic-net#6000)

Added new flag value 'always_enabled' for the state and auto-restart field of feature table

init_cfg.json is updated to initialize state field of database/swss/syncd/teamd feature and auto-restart field of database feature
as always_enabled

Once the state/auto-restart value is initialized as "always_enabled" it is immutable and cannot be change via feature config commands. (config feature..) PR#sonic-net/sonic-utilities#1271

hostcfgd will not take any action if state field value is 'always_enabled'

Since we have always_enabled field for auto-restart updated supervisor-proc-exit-listener
not to have special check for database and always rely on value from Feature table.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Possibility of Teamd can start before swss restart

3 participants