SONiC Generic Update and Rollback - HLD#736
Merged
qiluo-msft merged 21 commits intosonic-net:masterfrom May 3, 2021
Merged
Conversation
qiluo-msft
reviewed
Jan 19, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
qiluo-msft
reviewed
Jan 19, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
qiluo-msft
reviewed
Jan 19, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
qiluo-msft
reviewed
Jan 19, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
qiluo-msft
reviewed
Jan 19, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
qiluo-msft
reviewed
Jan 19, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
qiluo-msft
reviewed
Jan 19, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
qiluo-msft
reviewed
Jan 19, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
qiluo-msft
reviewed
Jan 19, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
qiluo-msft
reviewed
Jan 19, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
qiluo-msft
reviewed
Feb 6, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Outdated
Show resolved
Hide resolved
ghooo
commented
Feb 17, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
praveen-li
reviewed
Mar 9, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
praveen-li
reviewed
Mar 9, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
praveen-li
reviewed
Mar 9, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
praveen-li
reviewed
Mar 9, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
praveen-li
reviewed
Mar 9, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
praveen-li
reviewed
Mar 9, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
praveen-li
reviewed
Mar 9, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
praveen-li
reviewed
Mar 9, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
praveen-li
reviewed
Mar 9, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
praveen-li
reviewed
Mar 9, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
praveen-li
reviewed
Mar 9, 2021
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
praveen-li
reviewed
Mar 9, 2021
doc/config-generic-update-rollback/Json_Patch_Ordering_using_YANG_Models_Design.md
Show resolved
Hide resolved
qiluo-msft
approved these changes
Mar 31, 2021
praveen-li
reviewed
Apr 20, 2021
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
praveen-li
reviewed
Apr 20, 2021
Member
praveen-li
left a comment
There was a problem hiding this comment.
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
praveen-li
reviewed
Apr 21, 2021
Member
praveen-li
left a comment
There was a problem hiding this comment.
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
ghooo
added a commit
to sonic-net/sonic-utilities
that referenced
this pull request
Apr 26, 2021
…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. ```
praveen-li
approved these changes
May 3, 2021
Member
praveen-li
left a comment
There was a problem hiding this comment.
Overall looks good to me, let me know if any pending questions, where my involvement is needed. Thx.
gitsabari
pushed a commit
to gitsabari/sonic-utilities
that referenced
this pull request
Jun 15, 2021
…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. ```
qiluo-msft
reviewed
Jan 16, 2022
doc/config-generic-update-rollback/SONiC_Generic_Config_Update_and_Rollback_Design.md
Show resolved
Hide resolved
malletvapid23
added a commit
to malletvapid23/Sonic-Utility
that referenced
this pull request
Aug 3, 2023
…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. ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.