Skip to content
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

After onie install with latest sonic-utilities configuration is not loaded into CONFIG_DB resulting in failure to initialize switch #20730

Open
dgsudharsan opened this issue Nov 8, 2024 · 3 comments

Comments

@dgsudharsan
Copy link
Collaborator

Description

Issue due to yang validation introduced in the PR sonic-net/sonic-utilities#3576

The config-setup generates a configuration which is not yang aligned. For example loopback and interface tables are defined like below

    "LOOPBACK_INTERFACE": {
        "Loopback0|10.1.0.1/32": {}
    },
   "INTERFACE": {
        "Ethernet0|10.0.0.0/31": {},

While yang expects it to

    "LOOPBACK_INTERFACE": {
        "Loopback0": {},
        "Loopback0|10.1.0.1/32": {}
    },
    "INTERFACE": {
        "Ethernet0": {},
        "Ethernet0|10.0.0.0/31": {},
2024 Nov  8 03:57:59.954048 r-tigris-04 INFO config-setup[3665]: No configuration detected, generating factory default configuration...
2024 Nov  8 03:58:00.299118 r-tigris-04 INFO config-setup[3665]: Reloading existing config db...
2024 Nov  8 03:58:00.617087 r-tigris-04 NOTICE switch_hash: 'reload' executing with command: config reload /etc/sonic/config_db.json -y -n
2024 Nov  8 03:58:00.617004 r-tigris-04 INFO config-setup[4045]: Acquired lock on /etc/sonic/reload.lock
2024 Nov  8 03:58:00.819290 r-tigris-04 INFO config-setup[4045]: libyang[0]: Leafref "../../LOOPBACK_INTERFACE_LIST/name" of value "Loopback0" points to a non-existing leaf. (path: /sonic-loopback-interface:sonic-loopback-interface/LOOPBACK_INTERFACE/LOOPBACK_INTERFACE_IPPREFIX_LIST[name='Loopback0'][ip-prefix='10.1.0.1/32']/name)
2024 Nov  8 03:58:00.819731 r-tigris-04 INFO config-setup[4045]: sonic_yang(3):Data Loading Failed:Leafref "../../LOOPBACK_INTERFACE_LIST/name" of value "Loopback0" points to a non-existing leaf.
2024 Nov  8 03:58:00.819755 r-tigris-04 INFO config-setup[4045]: /etc/sonic/config_db.json fails YANG validation! Error: Data Loading Failed
2024 Nov  8 03:58:00.819775 r-tigris-04 INFO config-setup[4045]: Leafref "../../LOOPBACK_INTERFACE_LIST/name" of value "Loopback0" points to a non-existing leaf.
2024 Nov  8 03:58:00.819800 r-tigris-04 INFO config-setup[4045]: Released lock on /etc/sonic/reload.lock
2024 Nov  8 03:58:00.819868 r-tigris-04 INFO config-setup[4045]: Aborted!
2024 Nov  8 03:58:00.880277 r-tigris-04 INFO config-setup[4372]: True
2024 Nov  8 03:58:00.881941 r-tigris-04 INFO systemd[1]: Finished config-setup.service - Config initialization and migration service.

Steps to reproduce the issue:

Describe the results you received:

Describe the results you expected:

Output of show version:

(paste your output here)

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

@dgsudharsan
Copy link
Collaborator Author

@qiluo-msft @wen587 Can you please prioritize this as this is a regression issue?

@qiluo-msft
Copy link
Collaborator

@wen587 , seems "factory default configuration" fails yang validation.

@qiluo-msft
Copy link
Collaborator

@dgsudharsan Could you share the /etc/sonic/config_db.json when issue happens?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants