After first bootup, the FEATURE table is not present in CONFIG_DB #5911
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.
Issue : After first bootup, the FEATURE table is not present in CONFIG_DB
root@sonic:/home/admin# sonic-db-cli CONFIG_DB keys *FEAT*
root@sonic:/home/admin#
(With Fix from PR - sonic-net/sonic-utilities#1232)
root@sonic:/home/admin# config feature state nat enabled
Feature 'nat' doesn't exist
root@sonic:/home/admin#
And then, If I do 'cold reboot' or 'config reload', the FEATURE table gets added to CONFIG_DB.
After reboot/config-reload,
root@sonic:/home/admin# sonic-db-cli CONFIG_DB keys *FEAT*
FEATURE|nat
FEATURE|bgp
FEATURE|syncd
FEATURE|sflow
FEATURE|telemetry
FEATURE|snmp
FEATURE|pmon
FEATURE|swss
FEATURE|mgmt-framework
FEATURE|database
FEATURE|radv
FEATURE|lldp
FEATURE|teamd
FEATURE|dhcp_relay
root@sonic:/home/admin#
Rootcause:
While first boot up, the init_cfg.json file (contains FEATURE table) contents are not getting written to CONFIG_DB.
And later 'cold reboot' or 'config reload', init_cfg.json file contents are writing to CONFIG_DB.
Fix : Added changes to do "config reload" instead of "load config" in config-setup script, as it handles the config_db contents at first bootup.
'config reload' script takes care of writing 'init_cfg.json' file to CONFIG_DB.
Signed-off-by: Akhilesh Samineni akhilesh.samineni@broadcom.com