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

[chasssis]Error seen with config load_minigraph -y --override_config in consig_setup service in SUPERVISOR #16164

Closed
judyjoseph opened this issue Aug 15, 2023 · 1 comment · Fixed by sonic-net/sonic-utilities#2946
Assignees
Labels

Comments

@judyjoseph
Copy link
Contributor

Description

See this error with config load_minigraph -y --override_config in consig_setup service in SUPERVISOR

Aug 14 19:27:59 sonic config-setup[9481]: Traceback (most recent call last):
Aug 14 19:27:59 sonic config-setup[9481]: Traceback (most recent call last):
Aug 14 19:27:59 sonic config-setup[9481]:   File "/usr/local/bin/config", line 8, in <module>
Aug 14 19:27:59 sonic config-setup[9481]:   File "/usr/local/bin/config", line 8, in <module>
Aug 14 19:27:59 sonic config-setup[9481]:     sys.exit(config())
Aug 14 19:27:59 sonic config-setup[9481]:     sys.exit(config())
Aug 14 19:27:59 sonic config-setup[9481]:   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 764, in __call__
Aug 14 19:27:59 sonic config-setup[9481]:   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 764, in __call__
Aug 14 19:27:59 sonic config-setup[9481]:     return self.main(*args, **kwargs)
Aug 14 19:27:59 sonic config-setup[9481]:     return self.main(*args, **kwargs)
Aug 14 19:27:59 sonic config-setup[9481]:   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 717, in main
Aug 14 19:27:59 sonic config-setup[9481]:   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 717, in main
Aug 14 19:27:59 sonic config-setup[9481]:     rv = self.invoke(ctx)
Aug 14 19:27:59 sonic config-setup[9481]:     rv = self.invoke(ctx)
Aug 14 19:27:59 sonic config-setup[9481]:   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1137, in invoke
Aug 14 19:27:59 sonic config-setup[9481]:   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1137, in invoke
Aug 14 19:27:59 sonic config-setup[9481]:     return _process_result(sub_ctx.command.invoke(sub_ctx))
Aug 14 19:27:59 sonic config-setup[9481]:     return _process_result(sub_ctx.command.invoke(sub_ctx))
Aug 14 19:27:59 sonic config-setup[9481]:   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 956, in invoke
Aug 14 19:27:59 sonic config-setup[9481]:   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 956, in invoke
Aug 14 19:27:59 sonic config-setup[9481]:     return ctx.invoke(self.callback, **ctx.params)
Aug 14 19:27:59 sonic config-setup[9481]:     return ctx.invoke(self.callback, **ctx.params)
Aug 14 19:27:59 sonic config-setup[9481]:   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 555, in invoke
Aug 14 19:27:59 sonic config-setup[9481]:   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 555, in invoke
Aug 14 19:27:59 sonic config-setup[9481]:     return callback(*args, **kwargs)
Aug 14 19:27:59 sonic config-setup[9481]:     return callback(*args, **kwargs)
Aug 14 19:27:59 sonic config-setup[9481]:   File "/usr/local/lib/python3.9/dist-packages/click/decorators.py", line 64, in new_func
Aug 14 19:27:59 sonic config-setup[9481]:   File "/usr/local/lib/python3.9/dist-packages/click/decorators.py", line 64, in new_func
Aug 14 19:27:59 sonic config-setup[9481]:     return ctx.invoke(f, obj, *args, **kwargs)
Aug 14 19:27:59 sonic config-setup[9481]:     return ctx.invoke(f, obj, *args, **kwargs)
Aug 14 19:27:59 sonic config-setup[9481]:   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 555, in invoke
Aug 14 19:27:59 sonic config-setup[9481]:   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 555, in invoke
Aug 14 19:27:59 sonic config-setup[9481]:     return callback(*args, **kwargs)
Aug 14 19:27:59 sonic config-setup[9481]:     return callback(*args, **kwargs)
Aug 14 19:27:59 sonic config-setup[9481]:   File "/usr/local/lib/python3.9/dist-packages/config/main.py", line 1823, in override_config_table
Aug 14 19:27:59 sonic config-setup[9481]:   File "/usr/local/lib/python3.9/dist-packages/config/main.py", line 1823, in override_config_table
Aug 14 19:27:59 sonic config-setup[9481]:     ns_config_input = config_input[ns]
Aug 14 19:27:59 sonic config-setup[9481]:     ns_config_input = config_input[ns]
Aug 14 19:27:59 sonic config-setup[9481]: KeyError: 'asic14'
Aug 14 19:27:59 sonic config-setup[9481]: KeyError: 'asic14'

Steps to reproduce the issue:

  1. Boot the SUPERVISOR card with the golden_config_db.json file. Sample format
{
  "localhost": {
    "KUBERNETES_MASTER": {
      "SERVER": {
        "ip": "",
        "disable": "true"
      }
    },
    "MACSEC_PROFILE": {}
  },
  "asic0": {
    "KUBERNETES_MASTER": {
      "SERVER": {
        "ip": "",
        "disable": "true"
      }
    },
    "MACSEC_PROFILE": {}
  },
  "asic1": {
    "KUBERNETES_MASTER": {
      "SERVER": {
        "ip": "",
        "disable": "true"
      }
    },
    "MACSEC_PROFILE": {}
  },
  "asic2": {
    "KUBERNETES_MASTER": {
      "SERVER": {
        "ip": "",
        "disable": "true"
      }
    },
    "MACSEC_PROFILE": {}
  },
  "asic3": {
    "KUBERNETES_MASTER": {
      "SERVER": {
        "ip": "",
        "disable": "true"
      }
    },
    "MACSEC_PROFILE": {}
  },
  "asic4": {
    "KUBERNETES_MASTER": {
      "SERVER": {
        "ip": "",
        "disable": "true"
      }
    },
    "MACSEC_PROFILE": {}
  },
  "asic5": {
    "KUBERNETES_MASTER": {
      "SERVER": {
        "ip": "",
        "disable": "true"
      }
    },
    "MACSEC_PROFILE": {}
  },
  "asic6": {
    "KUBERNETES_MASTER": {
      "SERVER": {
        "ip": "",
        "disable": "true"
      }
    },
    "MACSEC_PROFILE": {}
  },
  "asic7": {
    "KUBERNETES_MASTER": {
      "SERVER": {
        "ip": "",
        "disable": "true"
      }
    },
    "MACSEC_PROFILE": {}
  },
  "asic8": {
    "KUBERNETES_MASTER": {
      "SERVER": {
        "ip": "",
        "disable": "true"
      }
    },
    "MACSEC_PROFILE": {}
  },
  "asic9": {
    "KUBERNETES_MASTER": {
      "SERVER": {
        "ip": "",
        "disable": "true"
      }
    },
    "MACSEC_PROFILE": {}
  },
  "asic10": {
    "KUBERNETES_MASTER": {
      "SERVER": {
        "ip": "",
        "disable": "true"
      }
    },
    "MACSEC_PROFILE": {}
  },
  "asic11": {
    "KUBERNETES_MASTER": {
      "SERVER": {
        "ip": "",
        "disable": "true"
      }
    },
    "MACSEC_PROFILE": {}
  },
  "asic12": {
    "KUBERNETES_MASTER": {
      "SERVER": {
        "ip": "",
        "disable": "true"
      }
    },
    "MACSEC_PROFILE": {}
  },
  "asic13": {
    "KUBERNETES_MASTER": {
      "SERVER": {
        "ip": "",
        "disable": "true"
      }
    },
    "MACSEC_PROFILE": {}
  }
}

Describe the results you received:

Error shown when the "asic" section mapped to a namespace which is present in the device is missing in the golden_config_db.json

Describe the results you expected:

No error

Output of show version:

admin@str2-7250-sup-1:~$ show version 

SONiC Software Version: SONiC.20220530.38
SONiC OS Version: 11
Distribution: Debian 11.7
Kernel: 5.10.0-18-2-amd64
Build commit: 4115919589
Build date: Fri Jul 28 01:24:14 UTC 2023
Built by: cloudtest@8ec96c8ac000000```
#### 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):

<!--
     Also attach debug file produced by `sudo generate_dump`
-->
@judyjoseph judyjoseph changed the title [chasssis][config override] Error seen with config_loa [chasssis]Error seen with config load_minigraph -y --override_config in consig_setup service in SUPERVISOR Aug 15, 2023
@judyjoseph judyjoseph self-assigned this Aug 15, 2023
@wen587
Copy link
Contributor

wen587 commented Aug 17, 2023

@qiluo-msft for vis of this special case.

qiluo-msft pushed a commit to sonic-net/sonic-utilities that referenced this issue Aug 19, 2023
…_config_db (#2946)

#### What I did
Fixes sonic-net/sonic-buildimage#16164

#### How I did it
In the multi-asic devices for eg: supervisor card of a chassis, the asics are not of its own -- it is the asic present in the fabric cards in the chassis. On then -- all the fabric cards need not be present in the chassis everytime.

In that case golden_config_db.json file generated by NDM ( based on the Subdevices in the minigraph ) will not have all ASICs -- it will be for the fabric cards present in the chassis  

With the current logic, if there is an asic namespace missing -- config load_minigraph will exit with error as in the Issue #sonic-net/sonic-buildimage#16164 and not restart dockers.

Add logic to check and continue if the "asic" namespace is not present in the golden_config_db.json for multi-asic platforms.

#### How to verify it
Verified on a SUP

```
admin@str2-xxxx-sup-1:~$ sudo config load_minigraph -y --override_config 
Disabling container monitoring ...
Stopping SONiC target ...
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json   --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic0 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic1 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic2 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic3 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic4 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic5 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic6 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic7 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic8 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic9 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic10 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic11 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic12 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic13 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic14 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic15 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -d -y /etc/sonic/sonic_version.yml -t /usr/share/sonic/templates/sonic-environment.j2,/etc/sonic/sonic-environment
Running command: config qos reload --no-dynamic-buffer --no-delay
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/0/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/1/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/2/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/3/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/4/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/5/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/6/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/7/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/8/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/9/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/10/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/11/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/12/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/13/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/14/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/15/buffers.json.j2
Running command: pfcwd start_default
Running command: config override-config-table /etc/sonic/golden_config_db.json
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Override config not present for asic1                                   <<<<<<<<<<<<<<<<<<<<<
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Override config not present for asic14                          <<<<<<<<<<<<<<<<<<<<<
Override config not present for asic15                          <<<<<<<<<<<<<<<<<<<<<
Restarting SONiC target ...
Enabling container monitoring ...
Reloading Monit configuration ...
Reinitializing monit daemon

```
yxieca pushed a commit to sonic-net/sonic-utilities that referenced this issue Aug 23, 2023
…_config_db (#2946)

#### What I did
Fixes sonic-net/sonic-buildimage#16164

#### How I did it
In the multi-asic devices for eg: supervisor card of a chassis, the asics are not of its own -- it is the asic present in the fabric cards in the chassis. On then -- all the fabric cards need not be present in the chassis everytime.

In that case golden_config_db.json file generated by NDM ( based on the Subdevices in the minigraph ) will not have all ASICs -- it will be for the fabric cards present in the chassis  

With the current logic, if there is an asic namespace missing -- config load_minigraph will exit with error as in the Issue #sonic-net/sonic-buildimage#16164 and not restart dockers.

Add logic to check and continue if the "asic" namespace is not present in the golden_config_db.json for multi-asic platforms.

#### How to verify it
Verified on a SUP

```
admin@str2-xxxx-sup-1:~$ sudo config load_minigraph -y --override_config 
Disabling container monitoring ...
Stopping SONiC target ...
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json   --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic0 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic1 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic2 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic3 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic4 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic5 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic6 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic7 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic8 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic9 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic10 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic11 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic12 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic13 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic14 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic15 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -d -y /etc/sonic/sonic_version.yml -t /usr/share/sonic/templates/sonic-environment.j2,/etc/sonic/sonic-environment
Running command: config qos reload --no-dynamic-buffer --no-delay
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/0/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/1/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/2/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/3/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/4/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/5/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/6/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/7/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/8/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/9/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/10/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/11/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/12/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/13/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/14/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/15/buffers.json.j2
Running command: pfcwd start_default
Running command: config override-config-table /etc/sonic/golden_config_db.json
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Override config not present for asic1                                   <<<<<<<<<<<<<<<<<<<<<
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Override config not present for asic14                          <<<<<<<<<<<<<<<<<<<<<
Override config not present for asic15                          <<<<<<<<<<<<<<<<<<<<<
Restarting SONiC target ...
Enabling container monitoring ...
Reloading Monit configuration ...
Reinitializing monit daemon

```
StormLiangMS pushed a commit to sonic-net/sonic-utilities that referenced this issue Sep 3, 2023
…_config_db (#2946)

#### What I did
Fixes sonic-net/sonic-buildimage#16164

#### How I did it
In the multi-asic devices for eg: supervisor card of a chassis, the asics are not of its own -- it is the asic present in the fabric cards in the chassis. On then -- all the fabric cards need not be present in the chassis everytime.

In that case golden_config_db.json file generated by NDM ( based on the Subdevices in the minigraph ) will not have all ASICs -- it will be for the fabric cards present in the chassis  

With the current logic, if there is an asic namespace missing -- config load_minigraph will exit with error as in the Issue #sonic-net/sonic-buildimage#16164 and not restart dockers.

Add logic to check and continue if the "asic" namespace is not present in the golden_config_db.json for multi-asic platforms.

#### How to verify it
Verified on a SUP

```
admin@str2-xxxx-sup-1:~$ sudo config load_minigraph -y --override_config 
Disabling container monitoring ...
Stopping SONiC target ...
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json   --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic0 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic1 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic2 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic3 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic4 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic5 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic6 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic7 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic8 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic9 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic10 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic11 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic12 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic13 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic14 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json  -n asic15 --write-to-db
Running command: /usr/local/bin/sonic-cfggen -d -y /etc/sonic/sonic_version.yml -t /usr/share/sonic/templates/sonic-environment.j2,/etc/sonic/sonic-environment
Running command: config qos reload --no-dynamic-buffer --no-delay
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/0/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/1/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/2/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/3/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/4/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/5/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/6/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/7/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/8/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/9/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/10/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/11/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/12/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/13/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/14/buffers.json.j2
Buffer definition template not found at /usr/share/sonic/device/x86_64-nokia_ixrxxxxe_sup-r0/Nokia-IXRxxxxE-SUP-10/15/buffers.json.j2
Running command: pfcwd start_default
Running command: config override-config-table /etc/sonic/golden_config_db.json
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Override config not present for asic1                                   <<<<<<<<<<<<<<<<<<<<<
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Removing configDB overriden table first ...
Overriding input config to configDB ...
Overriding completed. No service is restarted.
Override config not present for asic14                          <<<<<<<<<<<<<<<<<<<<<
Override config not present for asic15                          <<<<<<<<<<<<<<<<<<<<<
Restarting SONiC target ...
Enabling container monitoring ...
Reloading Monit configuration ...
Reinitializing monit daemon

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