-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 Generic Update and Rollback - HLD #736
SONiC Generic Update and Rollback - HLD #736
Conversation
ghooo
commented
Jan 19, 2021
•
edited
Loading
edited
Repo | PR Title | State |
---|---|---|
sonic-utilities | [config][generic-update] Adding apply-patch, rollback, checkpoints commands | |
sonic-buildimage | [sonic-yang] Backlinks are none when there is 0 backlinks | |
sonic-utilities | [config][generic-update] Implementing patch sorting | |
sonic-buildimage | [yang-models] Removing sonic-acl import from sonic-nat.yang | |
sonic-utilities | [config][generic-update] Implementing patch sorting (2nd attempt) | |
sonic-utilities | [config][generic-update] Fix PatchApplier init order | |
sonic-utilities | [generic-config-updater] Cropping current/target config before sorting | |
sonic-utilities | [generic_config_updater] Logging | |
sonic-utilities | Generic_upater: Apply JSON change | |
sonic-utilities | generic_updater: Fix service validator related issues | |
sonic-utilities | [generic-config-updater] Adding logging to config-{replace, rollback, checkpoint, list-checkpoints} | |
sonic-mgmt | draft for dhcp server testcase | |
sonic-mgmt | Skip DUTs that don't support apply-patch feature | |
sonic-utilities | [generic-config-updater] Handling empty tables while sorting a patch | |
sonic-utilities | [generic-config-updater] Logging change just before applying it | |
sonic-utilities | generic_config_updater: Filename changed & VLAN validator added | |
sonic-mgmt | skip_release DUTs that don't support apply-patch feature | |
sonic-mgmt | Generic Config Updater cacl test | |
sonic-mgmt | Generic Config Updater Syslog server test | |
sonic-utilities | [generic-config-updater] Adding non-strict mode | |
sonic-buildimage | [yang-models] Validating 'services' exist if ACL type is 'CTRLPLANE' | |
sonic-buildimage | [yang-model] Using 'leafref' instead of 'must' for loopback | |
sonic-utilities | [generic-config-updater] Improving CreateOnly validator and marking /LOOPBACK_INTERFACE/LOOPBACK#/vrf_name as create-only | |
sonic-utilities | [GCU] Implementing DryRun by printing patch-sorter steps/imitating config_db | |
sonic-utilities | [GCU] Moving PatchSorter unit-test to json file to make it easier to read/maintain | |
sonic-mgmt | GCU loopback interface test | |
sonic-utilities | [GCU] Loading yang-models only once | |
sonic-mgmt | Make GCU syslog's test independent from previous test | |
sonic-mgmt | GCU vlan interface test | |
sonic-mgmt | GCU cacl test combination | |
sonic-utilities | [GCU] Different apply-patch runs should produce same sorted steps | |
sonic-utilities | [GCU] Copying config_db before calling sonic_yang.loadData | |
sonic-utilities | [GCU] Using simulated config instead of target config when validating replace operation in NoDependencyMoveValidator | |
sonic-mgmt | GCU portchannel interface test | |
sonic-buildimage | [sonic-yang-mgmt] Adding flag to disable/enable log printing | |
sonic-utilities | [GCU] Show default option for '--format' | |
sonic-utilities | [GCU] Disallowing DeleteInsteadOfReplaceMoveExtender from generating delete whole config move | |
sonic-utilities | [build-failure-fix][GCU] Sort referrer paths alphabetically directly on 202111 | |
sonic-utilities | [generic-config-updater] Handle failed service restarts | |
sonic-utilities | [generic_config_updater] Minor update - No logical code change | |
sonic-mgmt | Add previous GCU tests to kvm daily test | |
sonic-utilities | [GCU] Mark children of bgp_neighbor as create-only | |
sonic-mgmt | GCU AAA test | |
sonic-mgmt | GCU test for BGPListener(BGPMonitor) | |
sonic-mgmt | Remove test reset check for GCU test | |
sonic-mgmt | Add incremental QOS config tests | |
sonic-mgmt | Skip GCU test on dut version that older than 202112 | |
sonic-buildimage | [yang] Adding sonic-bgp-monitor to setup.py | |
sonic-buildimage | [yang] Fixing groupings when grouping is in the same module file | |
sonic-mgmt | Revert GCU cacl test due to random failure and add sleep in cacl for local test | |
sonic-mgmt | Added support of barefoot asic in incremental_qos test case | |
sonic-mgmt | Add pfcwd interval config tests | |
sonic-mgmt | [tests/generic_config_updater] Replace IP testcase for BGP Listener | |
sonic-mgmt | Incremental QOS config updater test update | |
sonic-mgmt | [generic-config-updater][Add/Remove rack] - Updated test to include add/remove rack via patch-apply | |
sonic-utilities | [GCU] Turning port admin down before some critical port changes | |
sonic-utilities | [GCU] Supporting Groupings during path-xpath translation | |
sonic-mgmt | [GCU] Add config ipv6 BGP neighbor test | |
sonic-mgmt | AddRack: Skip multi asic & remove hack | |
sonic-utilities | [GCU] Marking fields under BGP_PEER_RANGE, BGP_MONITORS as create-only | |
sonic-mgmt | GCU test for bgp speaker | |
sonic-mgmt | GCU test for BGP prefix | |
sonic-mgmt | [GCU] Add ethernet interface tests | |
sonic-utilities | [GCU] Marking fields under MIRROR_SESSION as create-only | |
sonic-utilities | [generic-config-updater] Add caclrule validator | |
sonic-mgmt | GCU test for Monitor Config | |
sonic-buildimage | [yang] In ACL_RULE PRIORITY is mandatory and also PACKET_ACTION for CTRLPLANE ACLs | |
sonic-mgmt | Add loganalyzer ignore regex for GCU | |
sonic-utilities | [GCU] Optimizing moves by adding generators for keys/tables | |
sonic-mgmt | [GCU] add ipv6, ethernet interface to kvm test suite | |
sonic-mgmt | [tests/generic_config_updater]skip test on release 202111 | |
sonic-mgmt | [generic_config_updater]Add empty input fixture to verify configDB before GCU tests | |
sonic-mgmt | [generic_config_updater] add GCU ignore regex | |
sonic-utilities | [GCU] Supressing YANG errors from libyang while sorting | |
sonic-buildimage | [SY] Adding exceptlionList to validation exception | |
sonic-utilities | [GCU] Validate peer_group_range ip_range are correct | |
sonic-mgmt | Fix test case: generic_config_updater/test_ipv6.py::test_ipv6_neighbor_admin_change | |
sonic-utilities | [GCU] Handling non-compliant leaf-list with string values | |
sonic-mgmt | Fix test case: generic_config_updater/test_eth_interface.py::test_replace_mtu | |
sonic-utilities | [GCU] Handling type1 lists | |
sonic-mgmt | [configlet] Add test_add_rack to KVM daily test | |
sonic-mgmt | [tests/generic_config_updater] improve GCU portchannel test | |
sonic-utilities | [generic-config-updater] Add NTP validator | |
sonic-mgmt | [GCU] Shorten GCU ignored LA list | |
sonic-mgmt | [GCU] Add rollback validation test | |
sonic-mgmt | Avoid long run test in GCU. | |
sonic-mgmt | Bypass replace_lane to unblock submodule update | |
sonic-mgmt | Fix GCU update speed case to use supported speed get from the dut | |
sonic-utilities | [GCU] Moving UniqueLanes from only validating moves, to be a supplemental YANG validator |
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/Json_Patch_Ordering_using_YANG_Models_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will complete entire review today/
doc/config-generic-update-rollback/Json_Change_Application_Design.md
Outdated
Show resolved
Hide resolved
doc/config-generic-update-rollback/Json_Patch_Ordering_using_YANG_Models_Design.md
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me, let me know if there is a section for lower-level design and the section which describes the unit test in more detail.
doc/config-generic-update-rollback/Json_Patch_Ordering_using_YANG_Models_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/Json_Patch_Ordering_using_YANG_Models_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/Json_Patch_Ordering_using_YANG_Models_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
…mmands (#1536) #### What I did Adding apply-patch, rollback, replace, checkpoint, delete-checkpoint, list-checkpoints functionality. #### How I did it This PR is implementing the first step in in README.md in the design document: sonic-net/SONiC#736 #### How to verify it Using unit-tests #### 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) ```sh admin@sonic:~$ sudo config apply-patch --help Usage: config apply-patch [OPTIONS] PATCH_FILE_PATH Apply given patch of updates to Config. A patch is a JsonPatch which follows rfc6902. This command can be used do partial updates to the config with minimum disruption to running processes. It allows addition as well as deletion of configs. The patch file represents a diff of ConfigDb(ABNF) format or SonicYang format. <patch-file-path>: Path to the patch file on the file-system. Options: -f, --format [CONFIGDB|SONICYANG] format of config of the patch is either ConfigDb(ABNF) or SonicYang -d, --dry-run test out the command without affecting config state -v, --verbose print additional details of what the operation is doing -h, -?, --help Show this message and exit. admin@sonic:~$ sudo config replace --help Usage: config replace [OPTIONS] TARGET_FILE_PATH Replace the whole config with the specified config. The config is replaced with minimum disruption e.g. if ACL config is different between current and target config only ACL config is updated, and other config/services such as DHCP will not be affected. **WARNING** The target config file should be the whole config, not just the part intended to be updated. <target-file-path>: Path to the target file on the file-system. Options: -f, --format [CONFIGDB|SONICYANG] format of target config is either ConfigDb(ABNF) or SonicYang -d, --dry-run test out the command without affecting config state -v, --verbose print additional details of what the operation is doing -h, -?, --help Show this message and exit. admin@sonic:~$ sudo config rollback --help Usage: config rollback [OPTIONS] CHECKPOINT_NAME Rollback the whole config to the specified checkpoint. The config is rolled back with minimum disruption e.g. if ACL config is different between current and checkpoint config only ACL config is updated, and other config/services such as DHCP will not be affected. <checkpoint-name>: The checkpoint name, use `config list-checkpoints` command to see available checkpoints. Options: -d, --dry-run test out the command without affecting config state -v, --verbose print additional details of what the operation is doing -?, -h, --help Show this message and exit. admin@sonic:~$ sudo config checkpoint --help Usage: config checkpoint [OPTIONS] CHECKPOINT_NAME Take a checkpoint of the whole current config with the specified checkpoint name. <checkpoint-name>: The checkpoint name, use `config list-checkpoints` command to see available checkpoints. Options: -v, --verbose print additional details of what the operation is doing -h, -?, --help Show this message and exit. admin@sonic:~$ sudo config delete-checkpoint --help Usage: config delete-checkpoint [OPTIONS] CHECKPOINT_NAME Delete a checkpoint with the specified checkpoint name. <checkpoint-name>: The checkpoint name, use `config list-checkpoints` command to see available checkpoints. Options: -v, --verbose print additional details of what the operation is doing -h, -?, --help Show this message and exit. admin@sonic:~$ sudo config list-checkpoints --help Usage: config list-checkpoints [OPTIONS] List the config checkpoints available. Options: -v, --verbose print additional details of what the operation is doing -?, -h, --help Show this message and exit. ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me, let me know if any pending questions, where my involvement is needed. Thx.
…mmands (sonic-net#1536) #### What I did Adding apply-patch, rollback, replace, checkpoint, delete-checkpoint, list-checkpoints functionality. #### How I did it This PR is implementing the first step in in README.md in the design document: sonic-net/SONiC#736 #### How to verify it Using unit-tests #### 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) ```sh admin@sonic:~$ sudo config apply-patch --help Usage: config apply-patch [OPTIONS] PATCH_FILE_PATH Apply given patch of updates to Config. A patch is a JsonPatch which follows rfc6902. This command can be used do partial updates to the config with minimum disruption to running processes. It allows addition as well as deletion of configs. The patch file represents a diff of ConfigDb(ABNF) format or SonicYang format. <patch-file-path>: Path to the patch file on the file-system. Options: -f, --format [CONFIGDB|SONICYANG] format of config of the patch is either ConfigDb(ABNF) or SonicYang -d, --dry-run test out the command without affecting config state -v, --verbose print additional details of what the operation is doing -h, -?, --help Show this message and exit. admin@sonic:~$ sudo config replace --help Usage: config replace [OPTIONS] TARGET_FILE_PATH Replace the whole config with the specified config. The config is replaced with minimum disruption e.g. if ACL config is different between current and target config only ACL config is updated, and other config/services such as DHCP will not be affected. **WARNING** The target config file should be the whole config, not just the part intended to be updated. <target-file-path>: Path to the target file on the file-system. Options: -f, --format [CONFIGDB|SONICYANG] format of target config is either ConfigDb(ABNF) or SonicYang -d, --dry-run test out the command without affecting config state -v, --verbose print additional details of what the operation is doing -h, -?, --help Show this message and exit. admin@sonic:~$ sudo config rollback --help Usage: config rollback [OPTIONS] CHECKPOINT_NAME Rollback the whole config to the specified checkpoint. The config is rolled back with minimum disruption e.g. if ACL config is different between current and checkpoint config only ACL config is updated, and other config/services such as DHCP will not be affected. <checkpoint-name>: The checkpoint name, use `config list-checkpoints` command to see available checkpoints. Options: -d, --dry-run test out the command without affecting config state -v, --verbose print additional details of what the operation is doing -?, -h, --help Show this message and exit. admin@sonic:~$ sudo config checkpoint --help Usage: config checkpoint [OPTIONS] CHECKPOINT_NAME Take a checkpoint of the whole current config with the specified checkpoint name. <checkpoint-name>: The checkpoint name, use `config list-checkpoints` command to see available checkpoints. Options: -v, --verbose print additional details of what the operation is doing -h, -?, --help Show this message and exit. admin@sonic:~$ sudo config delete-checkpoint --help Usage: config delete-checkpoint [OPTIONS] CHECKPOINT_NAME Delete a checkpoint with the specified checkpoint name. <checkpoint-name>: The checkpoint name, use `config list-checkpoints` command to see available checkpoints. Options: -v, --verbose print additional details of what the operation is doing -h, -?, --help Show this message and exit. admin@sonic:~$ sudo config list-checkpoints --help Usage: config list-checkpoints [OPTIONS] List the config checkpoints available. Options: -v, --verbose print additional details of what the operation is doing -?, -h, --help Show this message and exit. ```
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
…mmands (#1536) #### What I did Adding apply-patch, rollback, replace, checkpoint, delete-checkpoint, list-checkpoints functionality. #### How I did it This PR is implementing the first step in in README.md in the design document: sonic-net/SONiC#736 #### How to verify it Using unit-tests #### 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) ```sh admin@sonic:~$ sudo config apply-patch --help Usage: config apply-patch [OPTIONS] PATCH_FILE_PATH Apply given patch of updates to Config. A patch is a JsonPatch which follows rfc6902. This command can be used do partial updates to the config with minimum disruption to running processes. It allows addition as well as deletion of configs. The patch file represents a diff of ConfigDb(ABNF) format or SonicYang format. <patch-file-path>: Path to the patch file on the file-system. Options: -f, --format [CONFIGDB|SONICYANG] format of config of the patch is either ConfigDb(ABNF) or SonicYang -d, --dry-run test out the command without affecting config state -v, --verbose print additional details of what the operation is doing -h, -?, --help Show this message and exit. admin@sonic:~$ sudo config replace --help Usage: config replace [OPTIONS] TARGET_FILE_PATH Replace the whole config with the specified config. The config is replaced with minimum disruption e.g. if ACL config is different between current and target config only ACL config is updated, and other config/services such as DHCP will not be affected. **WARNING** The target config file should be the whole config, not just the part intended to be updated. <target-file-path>: Path to the target file on the file-system. Options: -f, --format [CONFIGDB|SONICYANG] format of target config is either ConfigDb(ABNF) or SonicYang -d, --dry-run test out the command without affecting config state -v, --verbose print additional details of what the operation is doing -h, -?, --help Show this message and exit. admin@sonic:~$ sudo config rollback --help Usage: config rollback [OPTIONS] CHECKPOINT_NAME Rollback the whole config to the specified checkpoint. The config is rolled back with minimum disruption e.g. if ACL config is different between current and checkpoint config only ACL config is updated, and other config/services such as DHCP will not be affected. <checkpoint-name>: The checkpoint name, use `config list-checkpoints` command to see available checkpoints. Options: -d, --dry-run test out the command without affecting config state -v, --verbose print additional details of what the operation is doing -?, -h, --help Show this message and exit. admin@sonic:~$ sudo config checkpoint --help Usage: config checkpoint [OPTIONS] CHECKPOINT_NAME Take a checkpoint of the whole current config with the specified checkpoint name. <checkpoint-name>: The checkpoint name, use `config list-checkpoints` command to see available checkpoints. Options: -v, --verbose print additional details of what the operation is doing -h, -?, --help Show this message and exit. admin@sonic:~$ sudo config delete-checkpoint --help Usage: config delete-checkpoint [OPTIONS] CHECKPOINT_NAME Delete a checkpoint with the specified checkpoint name. <checkpoint-name>: The checkpoint name, use `config list-checkpoints` command to see available checkpoints. Options: -v, --verbose print additional details of what the operation is doing -h, -?, --help Show this message and exit. admin@sonic:~$ sudo config list-checkpoints --help Usage: config list-checkpoints [OPTIONS] List the config checkpoints available. Options: -v, --verbose print additional details of what the operation is doing -?, -h, --help Show this message and exit. ```