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

Port 202012 DB migration changes to newer branches #2515

Merged
merged 2 commits into from
Nov 23, 2022

Conversation

vaibhavhd
Copy link
Contributor

What I did

Fixes sonic-net/sonic-buildimage#12643

How I did it

How to verify it

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

@vaibhavhd vaibhavhd merged commit addae73 into sonic-net:master Nov 23, 2022
@vaibhavhd vaibhavhd deleted the port-202012-version branch November 23, 2022 18:10
mdanish-kh pushed a commit to mdanish-kh/sonic-utilities that referenced this pull request Nov 23, 2022
Fixes sonic-net/sonic-buildimage#12643

Version on 202012 branch is missing in master and 202205 branch. This caused failures in upgrade from 202012 to newer branch images, where db_migrator experienced crash.
This commit fixes the issue, and ports the version handling for 202012 to newer branches.
yxieca pushed a commit that referenced this pull request Nov 29, 2022
Fixes sonic-net/sonic-buildimage#12643

Version on 202012 branch is missing in master and 202205 branch. This caused failures in upgrade from 202012 to newer branch images, where db_migrator experienced crash.
This commit fixes the issue, and ports the version handling for 202012 to newer branches.
preetham-singh pushed a commit to preetham-singh/sonic-utilities that referenced this pull request Dec 6, 2022
Fixes sonic-net/sonic-buildimage#12643

Version on 202012 branch is missing in master and 202205 branch. This caused failures in upgrade from 202012 to newer branch images, where db_migrator experienced crash.
This commit fixes the issue, and ports the version handling for 202012 to newer branches.
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Dec 6, 2022
Update sonic-utilities submodule pointer to include the following:
* ca9a020 [generate_dump] [Mellanox] Fix the duplicate dfw dump collection problem by adding symlinks ([sonic-net#2536](sonic-net/sonic-utilities#2536))
* 92c7001 [config] Add check in config interface ip command to block if the interface is portchannel member ([sonic-net#2539](sonic-net/sonic-utilities#2539))
* e8130f5 [system-health] Improve code structure of system health CLIs ([sonic-net#2453](sonic-net/sonic-utilities#2453))
* 00c01b3 Transceiver eeprom dom CLI modification to show output from TRANSCEIVER_DOM_THRESHOLD table ([sonic-net#2535](sonic-net/sonic-utilities#2535))
* 42f51c2 sonic-utilities: Update config reload() to verify formatting of an input file ([sonic-net#2529](sonic-net/sonic-utilities#2529))
* a5e1e2b [GCU] Add RemoveCreateOnlyDependency Validator/Generator ([sonic-net#2500](sonic-net/sonic-utilities#2500))
* 6411b52 [QoS] Introduce delay to the qos reload flow ([sonic-net#2503](sonic-net/sonic-utilities#2503))
* fce7ec3 Use github code scanning instead of LGTM ([sonic-net#2530](sonic-net/sonic-utilities#2530))
* 91bd6de Change show kube command default value of insecure key to True ([sonic-net#2517](sonic-net/sonic-utilities#2517))
* c44c584 Add db_migrator_constants.py script to setup.py ([sonic-net#2534](sonic-net/sonic-utilities#2534))
* 6a3238e [drop counters] Fix CLI script for unconfigured PGs ([sonic-net#2518](sonic-net/sonic-utilities#2518))
* 263810b Update vrf add, del commands for duplicate/non-existing VRFs ([sonic-net#2467](sonic-net/sonic-utilities#2467))
* addae73 Port 202012 DB migration changes to newer branches ([sonic-net#2515](sonic-net/sonic-utilities#2515))
* 2af8cfa [VXLAN]Fixing traceback in show remotemac when mac moves during command execution ([sonic-net#2506](sonic-net/sonic-utilities#2506))

Signed-off-by: dprital <drorp@nvidia.com>
@tjchadaga
Copy link
Contributor

@qiluo-msft - please help revert this PR as it is causing sonic-net/sonic-buildimage#12955

@dgsudharsan
Copy link
Collaborator

@qiluo-msft This needs to be reverted only in master and not in 202205 since 202205 still has swsssdk.

vaibhavhd added a commit that referenced this pull request Dec 7, 2022
…er (#2544)

Fixes: sonic-net/sonic-buildimage#12955

The cherrypick changes (from 202012 to master) made as part of #2515
broke the master branch db_migrator. The issue is due to an import of swsssdk which is no longer available in master image.

How I did it
Removed the import statement that came due to cherrypick.

How to verify it
Checked on physical device running master image

Without fix:

root@str2-acs-12:~# db_migrator.py
Traceback (most recent call last):
  File "/usr/local/bin/db_migrator.py", line 11, in <module>
    from swsssdk import ConfigDBConnector, SonicDBConfig
ModuleNotFoundError: No module named 'swsssdk'
root@str2-acs-12:~# 

With fix:

root@str2-acs-12:~# db_migrator.py     
version_4_0_0
root@str2-acs-12:~#
@vaibhavhd
Copy link
Contributor Author

@qiluo-msft This needs to be reverted only in master and not in 202205 since 202205 still has swsssdk.

I think revert is not needed since now we have fixed this as part of #2544

StormLiangMS pushed a commit that referenced this pull request Dec 30, 2022
Fixes sonic-net/sonic-buildimage#12643

Version on 202012 branch is missing in master and 202205 branch. This caused failures in upgrade from 202012 to newer branch images, where db_migrator experienced crash.
This commit fixes the issue, and ports the version handling for 202012 to newer branches.
StormLiangMS pushed a commit that referenced this pull request Dec 30, 2022
…er (#2544)

Fixes: sonic-net/sonic-buildimage#12955

The cherrypick changes (from 202012 to master) made as part of #2515
broke the master branch db_migrator. The issue is due to an import of swsssdk which is no longer available in master image.

How I did it
Removed the import statement that came due to cherrypick.

How to verify it
Checked on physical device running master image

Without fix:

root@str2-acs-12:~# db_migrator.py
Traceback (most recent call last):
  File "/usr/local/bin/db_migrator.py", line 11, in <module>
    from swsssdk import ConfigDBConnector, SonicDBConfig
ModuleNotFoundError: No module named 'swsssdk'
root@str2-acs-12:~# 

With fix:

root@str2-acs-12:~# db_migrator.py     
version_4_0_0
root@str2-acs-12:~#
vaibhavhd added a commit that referenced this pull request Jun 29, 2023
…ph (#2887)

Microsoft ADO: 18217044

This PR is follow up to an old PR: #2515

This PR addresses two issues:

Not migrating RESTAPI, TELEMETRY, DEVICE_METADATA entries if they are not supported in target image's minigraph.py.
Not migrating these entries if minigraph.xml file is missing.
Not maintaining the config for these tables in two different places. Currently db migrator has its own constants, and minigraph.py maintains its own.
How I did it
This change removes hardcoding config in migrator code, and migrating the config for RESTAPI, TELEMETRY, DEVICE_METADATA from minigraph generator.

How to verify it
Tested on a physical device.
yxieca pushed a commit that referenced this pull request Jul 7, 2023
…ph (#2887)

Microsoft ADO: 18217044

This PR is follow up to an old PR: #2515

This PR addresses two issues:

Not migrating RESTAPI, TELEMETRY, DEVICE_METADATA entries if they are not supported in target image's minigraph.py.
Not migrating these entries if minigraph.xml file is missing.
Not maintaining the config for these tables in two different places. Currently db migrator has its own constants, and minigraph.py maintains its own.
How I did it
This change removes hardcoding config in migrator code, and migrating the config for RESTAPI, TELEMETRY, DEVICE_METADATA from minigraph generator.

How to verify it
Tested on a physical device.
StormLiangMS pushed a commit that referenced this pull request Jul 19, 2023
…ph (#2887)

Microsoft ADO: 18217044

This PR is follow up to an old PR: #2515

This PR addresses two issues:

Not migrating RESTAPI, TELEMETRY, DEVICE_METADATA entries if they are not supported in target image's minigraph.py.
Not migrating these entries if minigraph.xml file is missing.
Not maintaining the config for these tables in two different places. Currently db migrator has its own constants, and minigraph.py maintains its own.
How I did it
This change removes hardcoding config in migrator code, and migrating the config for RESTAPI, TELEMETRY, DEVICE_METADATA from minigraph generator.

How to verify it
Tested on a physical device.
vaibhavhd added a commit to vaibhavhd/sonic-utilities that referenced this pull request Jul 21, 2023
…ph (sonic-net#2887)

Microsoft ADO: 18217044

This PR is follow up to an old PR: sonic-net#2515

This PR addresses two issues:

Not migrating RESTAPI, TELEMETRY, DEVICE_METADATA entries if they are not supported in target image's minigraph.py.
Not migrating these entries if minigraph.xml file is missing.
Not maintaining the config for these tables in two different places. Currently db migrator has its own constants, and minigraph.py maintains its own.
How I did it
This change removes hardcoding config in migrator code, and migrating the config for RESTAPI, TELEMETRY, DEVICE_METADATA from minigraph generator.

How to verify it
Tested on a physical device.
qiluo-msft pushed a commit that referenced this pull request Jul 26, 2023
…ph (#2887) (#2924)

Microsoft ADO: 18217044

This PR is follow up to an old PR: #2515

This PR addresses two issues:

Not migrating RESTAPI, TELEMETRY, DEVICE_METADATA entries if they are not supported in target image's minigraph.py.
Not migrating these entries if minigraph.xml file is missing.
Not maintaining the config for these tables in two different places. Currently db migrator has its own constants, and minigraph.py maintains its own.
How I did it
This change removes hardcoding config in migrator code, and migrating the config for RESTAPI, TELEMETRY, DEVICE_METADATA from minigraph generator.

How to verify it
Tested on a physical device.
pdhruv-marvell pushed a commit to pdhruv-marvell/sonic-utilities that referenced this pull request Aug 23, 2023
…ph (sonic-net#2887)

Microsoft ADO: 18217044

This PR is follow up to an old PR: sonic-net#2515

This PR addresses two issues:

Not migrating RESTAPI, TELEMETRY, DEVICE_METADATA entries if they are not supported in target image's minigraph.py.
Not migrating these entries if minigraph.xml file is missing.
Not maintaining the config for these tables in two different places. Currently db migrator has its own constants, and minigraph.py maintains its own.
How I did it
This change removes hardcoding config in migrator code, and migrating the config for RESTAPI, TELEMETRY, DEVICE_METADATA from minigraph generator.

How to verify it
Tested on a physical device.
yxieca pushed a commit that referenced this pull request Aug 29, 2023
…ph (#2887)

Microsoft ADO: 18217044

This PR is follow up to an old PR: #2515

This PR addresses two issues:

Not migrating RESTAPI, TELEMETRY, DEVICE_METADATA entries if they are not supported in target image's minigraph.py.
Not migrating these entries if minigraph.xml file is missing.
Not maintaining the config for these tables in two different places. Currently db migrator has its own constants, and minigraph.py maintains its own.
How I did it
This change removes hardcoding config in migrator code, and migrating the config for RESTAPI, TELEMETRY, DEVICE_METADATA from minigraph generator.

How to verify it
Tested on a physical device.
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.

[DB Migrator] DB Migration from 202012 to 202205 does not work
4 participants