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

[sonic-config-engine] /usr/local/bin/db_migrator.py -o migrate fails on all Arista platforms while trying to configure a device for L2 configuration #12083

Closed
vdahiya12 opened this issue Sep 14, 2022 · 4 comments
Assignees
Labels
MSFT Triaged this issue has been triaged

Comments

@vdahiya12
Copy link
Contributor

vdahiya12 commented Sep 14, 2022

Description

While trying to configure a device for L2 style topology in SONiC OS, the administrator is required to execute a sequential stream of commands as suggested here https://github.com/sonic-net/SONiC/wiki/L2-Switch-mode
while running the first command we see this error for dualtor

admin@sonic:~$ cat <<EOF | sudo config reload /dev/stdin -y
> {
>     "MGMT_INTERFACE": {
>         "eth0|1.1.1.1/24": {
>           "gwaddr": "1.1.1.1"
>         }
>     },
>     "DEVICE_METADATA": {
>         "localhost": {
>             "hostname": "sonic",
>             "subtype": "DualToR"
>         }
>     }
> }
> EOF
Running command: rm -rf /tmp/dropstat-*
Disabling container monitoring ...
Stopping SONiC target ...
Running command: /usr/local/bin/sonic-cfggen -j /etc/sonic/init_cfg.json -j /dev/stdin --write-to-db
Running command: /usr/local/bin/db_migrator.py -o migrate
Traceback (most recent call last):
  File "/usr/local/bin/db_migrator.py", line 668, in main
    result = getattr(dbmgtr, operation)()
  File "/usr/local/bin/db_migrator.py", line 627, in migrate
    self.common_migration_ops()
  File "/usr/local/bin/db_migrator.py", line 600, in common_migration_ops
    if self.asic_type == "broadcom" and 'Force10-S6100' in self.hwsku:
TypeError: argument of type 'NoneType' is not iterable
argument of type 'NoneType' is not iterable
usage: db_migrator.py [-h] [-o operation migrate, set_version, get_version] [-s unix socket] [-n asic namespace]

optional arguments:
  -h, --help            show this help message and exit
  -o operation (migrate, set_version, get_version)
                        operation to perform [default: get_version]
  -s unix socket        the unix socket that the desired database listens on
  -n asic namespace     The asic namespace whose DB instance we need to connect
admin@sonic:~$ 

Steps to reproduce the issue:

1.run the first command as suggested by this wiki link for all SONiC configurations of L2 topology
https://github.com/sonic-net/SONiC/wiki/L2-Switch-mode

Describe the results you received:

Describe the results you expected:

should not see the db_migrator error

Output of show version:


SONiC Software Version: SONiC.20201231.69
Distribution: Debian 10.12
Kernel: 4.19.0-12-2-amd64
Build commit: f5372f172e
Build date: Fri Jun 24 04:42:05 UTC 2022
Built by: cloudtest@f401f80cc000001

Platform: x86_64-arista_7050cx3_32s
HwSKU: Arista-7050CX3-32S-C32
ASIC: broadcom
ASIC Count: 1
Serial Number: JPE21030951

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):

@lguohan
Copy link
Collaborator

lguohan commented Sep 14, 2022

looks like caused by this pr.

sonic-net/sonic-utilities@6dfbdcb

@vdahiya12 vdahiya12 self-assigned this Oct 12, 2022
rjthomson added a commit to rjthomson/sonic-utilities-db-migration that referenced this issue Jan 27, 2023
@prgeor prgeor added Triaged this issue has been triaged MSFT labels Mar 1, 2023
@prgeor
Copy link
Contributor

prgeor commented Mar 1, 2023

looks like caused by this pr.

sonic-net/sonic-utilities@6dfbdcb

@tjchadaga could you check if this issue is already fixed

@tjchadaga
Copy link
Contributor

looks like caused by this pr.
sonic-net/sonic-utilities@6dfbdcb

@tjchadaga could you check if this issue is already fixed

This issue is fixed by #14933 and sonic-net/sonic-utilities#2821

@tjchadaga
Copy link
Contributor

Fixed by sonic-net/sonic-utilities#2821

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MSFT Triaged this issue has been triaged
Projects
Archived in project
Development

No branches or pull requests

4 participants