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

[Config Rollback] | Failed to rollback config #11912

Closed
Hedgehog-Guru opened this issue Aug 31, 2022 · 1 comment · Fixed by sonic-net/sonic-utilities#2347
Closed

[Config Rollback] | Failed to rollback config #11912

Hedgehog-Guru opened this issue Aug 31, 2022 · 1 comment · Fixed by sonic-net/sonic-utilities#2347
Assignees
Labels
MSFT Triaged this issue has been triaged

Comments

@Hedgehog-Guru
Copy link

Description

In attempt to make config rollback I receive the next error : Error: 'DryRunChangeApplier' object has no attribute 'remove_backend_tables_from_config'

Steps to reproduce the issue:

  1. Make some changes in configuration

  2. Configure checkpoint (config checkpoint A)

  3. Make some changes in configuration

  4. Configure 2nd checkpoint (config checkpoint B)

  5. Make some changes in configuration

  6. Try to rollback (config rollback -d A)

Describe the results you received:

`# config rollback -d A
** DRY RUN EXECUTION **
Config Rollbacker: Config rollbacking starting.
Config Rollbacker: Checkpoint name: A.
Config Rollbacker: Verifying 'A' exists.
Config Rollbacker: Loading checkpoint into memory.
Config Rollbacker: Replacing config using 'Config Replacer'.
Config Replacer: Config replacement starting.
Config Replacer: Target config length: 15511.
Config Replacer: Getting current config db.
Config Replacer: Generating patch between target config and current config db.
Config Replacer: Applying patch using 'Patch Applier'.
Patch Applier: Patch application starting.
Patch Applier: Patch: [{"op": "remove", "path": "/VLAN_MEMBER/Vlan12|Ethernet8"}, {"op": "remove", "path": "/VLAN_MEMBER/Vlan12|Ethernet0"}, {"op": "remove", "path": "/VLAN/Vlan12"}]
Patch Applier: Getting current config db.
Patch Applier: Simulating the target full config after applying the patch.
Patch Applier: Validating target config does not have empty tables, since they do not show up in ConfigDb.
Patch Applier: Sorting patch updates.
Patch Applier: The patch was sorted into 3 changes:
Patch Applier: * [{"op": "remove", "path": "/VLAN_MEMBER/Vlan12|Ethernet0"}]
Patch Applier: * [{"op": "remove", "path": "/VLAN_MEMBER/Vlan12|Ethernet8"}]
Patch Applier: * [{"op": "remove", "path": "/VLAN/Vlan12"}]
Patch Applier: Applying 3 changes in order:
Patch Applier: * [{"op": "remove", "path": "/VLAN_MEMBER/Vlan12|Ethernet0"}]
** DryRun: Would apply [{"op": "remove", "path": "/VLAN_MEMBER/Vlan12|Ethernet0"}]
Patch Applier: * [{"op": "remove", "path": "/VLAN_MEMBER/Vlan12|Ethernet8"}]
** DryRun: Would apply [{"op": "remove", "path": "/VLAN_MEMBER/Vlan12|Ethernet8"}]
Patch Applier: * [{"op": "remove", "path": "/VLAN/Vlan12"}]
** DryRun: Would apply [{"op": "remove", "path": "/VLAN/Vlan12"}]
Patch Applier: Verifying patch updates are reflected on ConfigDB.
Failed to rollback config
Usage: config rollback [OPTIONS] CHECKPOINT_NAME
Try "config rollback -h" for help.

Error: 'DryRunChangeApplier' object has no attribute 'remove_backend_tables_from_config'
root@qa-eth-vt03-7-4700a0:/home/admin# config save -y
Running command: /usr/local/bin/sonic-cfggen -d --print-data > /etc/sonic/config_db.json`

Describe the results you expected:

config rollback is succesfull

Output of show version:

SONiC Software Version: SONiC.202205_rc.4-57a4487c1_Internal
Distribution: Debian 11.4
Kernel: 5.10.0-12-2-amd64
Build commit: 57a4487c1
Build date: Tue Aug 16 15:50:37 UTC 2022
Built by: sw-r2d2-bot@r-build-sonic-ci02-242

Platform: x86_64-mlnx_msn4700-r0
HwSKU: ACS-MSN4700
ASIC: mellanox
ASIC Count: 1
Serial Number: MT2119X03332
Model Number: MSN4700-WS2F_QP1
Hardware Revision: A1
Uptime: 14:53:32 up  1:29,  6 users,  load average: 0.72, 0.77, 0.82
Date: Tue 23 Aug 2022 14:53:32

Docker images:
REPOSITORY                    TAG                              IMAGE ID       SIZE
docker-orchagent              202205_rc.4-57a4487c1_Internal   48f4b29e69d5   471MB
docker-orchagent              latest                           48f4b29e69d5   471MB
docker-teamd                  202205_rc.4-57a4487c1_Internal   eac1405feb6d   453MB
docker-teamd                  latest                           eac1405feb6d   453MB
docker-macsec                 latest                           51e17826801b   455MB
docker-syncd-mlnx             202205_rc.4-57a4487c1_Internal   258e52fd636a   852MB
docker-syncd-mlnx             latest                           258e52fd636a   852MB
docker-platform-monitor       202205_rc.4-57a4487c1_Internal   200612bf0d92   855MB
docker-platform-monitor       latest                           200612bf0d92   855MB
docker-dhcp-relay             latest                           853d6573b194   446MB
docker-sonic-telemetry        202205_rc.4-57a4487c1_Internal   ff9f643ccb64   517MB
docker-sonic-telemetry        latest                           ff9f643ccb64   517MB
docker-lldp                   202205_rc.4-57a4487c1_Internal   6980e1ff8957   479MB
docker-lldp                   latest                           6980e1ff8957   479MB
docker-router-advertiser      202205_rc.4-57a4487c1_Internal   35ce72cf8303   437MB
docker-router-advertiser      latest                           35ce72cf8303   437MB
docker-mux                    202205_rc.4-57a4487c1_Internal   15db5848b5cc   485MB
docker-mux                    latest                           15db5848b5cc   485MB
docker-database               202205_rc.4-57a4487c1_Internal   64bbd239a40b   437MB
docker-database               latest                           64bbd239a40b   437MB
docker-fpm-frr                202205_rc.4-57a4487c1_Internal   3c05c46e549a   454MB
docker-fpm-frr                latest                           3c05c46e549a   454MB
docker-nat                    202205_rc.4-57a4487c1_Internal   cecffd854283   428MB
docker-nat                    latest                           cecffd854283   428MB
docker-sflow                  202205_rc.4-57a4487c1_Internal   ca7041480a31   426MB
docker-sflow                  latest                           ca7041480a31   426MB
docker-snmp                   202205_rc.4-57a4487c1_Internal   c6aebe0f5a5f   454MB
docker-snmp                   latest                           c6aebe0f5a5f   454MB
docker-sonic-mgmt-framework   202205_rc.4-57a4487c1_Internal   de015d307366   554MB
docker-sonic-mgmt-framework   latest                           de015d307366   554MB

Output of show techsupport:

sonic_dump_qa-eth-vt02-2-4700a1_20220823_145320_config_rollback.tar.gz

@zhangyanzhao zhangyanzhao added Triaged this issue has been triaged MSFT labels Aug 31, 2022
@zhangyanzhao
Copy link
Collaborator

GCU related issue, please help to investigate @qiluo-msft

wen587 added a commit to sonic-net/sonic-utilities that referenced this issue Sep 5, 2022
What I did
Fix sonic-net/sonic-buildimage#11912

How I did it
Add the missing 'remove_backend_tables_from_config' in dry run.

How to verify it
Run unit test and manual test locally.
yxieca pushed a commit to sonic-net/sonic-utilities that referenced this issue Sep 8, 2022
What I did
Fix sonic-net/sonic-buildimage#11912

How I did it
Add the missing 'remove_backend_tables_from_config' in dry run.

How to verify it
Run unit test and manual test locally.
EdenGri pushed a commit to EdenGri/sonic-utilities that referenced this issue Oct 12, 2022
What I did
Fix sonic-net/sonic-buildimage#11912

How I did it
Add the missing 'remove_backend_tables_from_config' in dry run.

How to verify it
Run unit test and manual test locally.
preetham-singh pushed a commit to preetham-singh/sonic-utilities that referenced this issue Nov 21, 2022
What I did
Fix sonic-net/sonic-buildimage#11912

How I did it
Add the missing 'remove_backend_tables_from_config' in dry run.

How to verify it
Run unit test and manual test locally.
malletvapid23 added a commit to malletvapid23/Sonic-Utility that referenced this issue Aug 3, 2023
What I did
Fix sonic-net/sonic-buildimage#11912

How I did it
Add the missing 'remove_backend_tables_from_config' in dry run.

How to verify it
Run unit test and manual test locally.
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
None yet
Development

Successfully merging a pull request may close this issue.

4 participants