Networking
[NSX] How to Rollback Management Plane
haewon83
2024. 7. 30. 14:39
3.2.1 이상 버전부터 업그레이드를 한 경우에 Management Plane만 간편하게 Rollback 하는 방법이 있습니다.
이는 업그레이드가 정상적으로 완료되었거나, 완료되지 않았거나 모두 해당합니다.
3.2.3.1에서 4.1.2.4로 업그레이드 한 환경에서 Management Plane을 Rollback 해보겠습니다.
1. 모든 NSX Manager에서 Corfu DB를 중지합니다.
root@nsx-mgr01:~# /etc/init.d/corfu-server stop Stopping corfu-server (via systemctl): corfu-server.service. root@nsx-mgr02:~# /etc/init.d/corfu-server stop Stopping corfu-server (via systemctl): corfu-server.service. root@nsx-mgr03:~# /etc/init.d/corfu-server stop Stopping corfu-server (via systemctl): corfu-server.service. |
2. 모든 NSX Manager에서 다음 명령어로 Rollback을 시작합니다.
아래 명령어가 완료되고 나면, NSX Manager가 재부팅 됩니다.
root@nsx-mgr01:~# su admin NSX CLI (Manager, Policy, Controller 4.1.2.4.0.23786742). Press ? for command list or enter: help nsx-mgr01> node-rollback run-step step1_start_rollback This will start rollback process to rollback node to version 3.2.3.1.0.22104638. All changes done after starting MP upgrade will be lost. - Manager node will reboot as part of this step. - Run step2_restore_data on one of the Manager nodes after step1 is successful on all Manager nodes. Do you want to continue? (yes/no): yes 2024-07-28 05:50:37,089 - Setting up rollback scripts for rollback to 3.2.3.1.0.22104638 2024-07-28 05:50:37,194 - Rollback scripts set up for rollback to 3.2.3.1.0.22104638 2024-07-28 05:50:37,195 - Rollback info 2024-07-28 05:50:37,847 - Running backup_version_check 2024-07-28 05:50:42,932 - Backup version check passed. 2024-07-28 05:50:42,932 - Start running step step1_start_rollback 2024-07-28 05:50:42,980 - Running "cleanup_bundle" (task 1 of 4) 2024-07-28 05:50:48,086 - Running "reboot_into_rollback_version" (task 2 of 4) 2024-07-28 05:50:48,108 - System will now reboot. Run step2_restore_data on one of the nodes after this step is complete on all Manager nodes. { "state": 1, "state_text": "CMD_SUCCESS", "info": "", "body": null } nsx-mgr02> node-rollback run-step step1_start_rollback This will start rollback process to rollback node to version 3.2.3.1.0.22104638. All changes done after starting MP upgrade will be lost. - Manager node will reboot as part of this step. - Run step2_restore_data on one of the Manager nodes after step1 is successful on all Manager nodes. Do you want to continue? (yes/no): yes 2024-07-28 05:50:44,129 - Setting up rollback scripts for rollback to 3.2.3.1.0.22104638 2024-07-28 05:50:44,229 - Rollback scripts set up for rollback to 3.2.3.1.0.22104638 2024-07-28 05:50:44,229 - Rollback info 2024-07-28 05:50:44,909 - Running backup_version_check 2024-07-28 05:50:49,992 - Backup version check passed. 2024-07-28 05:50:49,993 - Start running step step1_start_rollback 2024-07-28 05:50:50,041 - Running "cleanup_bundle" (task 1 of 4) 2024-07-28 05:50:55,139 - Running "reboot_into_rollback_version" (task 2 of 4) 2024-07-28 05:50:55,167 - System will now reboot. Run step2_restore_data on one of the nodes after this step is complete on all Manager nodes. { "state": 1, "state_text": "CMD_SUCCESS", "info": "", "body": null } nsx-mgr03> node-rollback run-step step1_start_rollback This will start rollback process to rollback node to version 3.2.3.1.0.22104638. All changes done after starting MP upgrade will be lost. - Manager node will reboot as part of this step. - Run step2_restore_data on one of the Manager nodes after step1 is successful on all Manager nodes. Do you want to continue? (yes/no): yes 2024-07-28 05:50:39,143 - Setting up rollback scripts for rollback to 3.2.3.1.0.22104638 2024-07-28 05:50:39,266 - Rollback scripts set up for rollback to 3.2.3.1.0.22104638 2024-07-28 05:50:39,267 - Rollback info 2024-07-28 05:50:40,045 - Running backup_version_check 2024-07-28 05:50:45,161 - Backup version check passed. 2024-07-28 05:50:45,161 - Start running step step1_start_rollback 2024-07-28 05:50:45,205 - Running "cleanup_bundle" (task 1 of 4) 2024-07-28 05:50:50,286 - Running "reboot_into_rollback_version" (task 2 of 4) 2024-07-28 05:50:50,309 - System will now reboot. Run step2_restore_data on one of the nodes after this step is complete on all Manager nodes. { "state": 1, "state_text": "CMD_SUCCESS", "info": "", "body": null } |
3. NSX Manager 중 한 Manager에서 다음 명령어를 실행합니다.
root@nsx-mgr01:~# su admin NSX CLI (Manager, Policy, Controller 3.2.3.1.0.22104638). Press ? for command list or enter: help nsx-mgr01> node-rollback run-step step2_restore_data This will restore data-store to a snapshot taken at the beginning of upgrade. - Run this command only on one of the Manager nodes. - Please make sure that step1_start_rollback step is successful on all nodes of cluster before starting this step. - After this step, run step3_exit_rollback on all the nodes to continue the rollback. Do you want to continue? (yes/no): yes 2024-07-28 06:04:11,953 - Running node_version_check 2024-07-28 06:04:17,043 - Node version checks passed. 2024-07-28 06:04:17,063 - Running restore_ready_check 2024-07-28 06:04:22,135 - Node restore ready checks passed. 2024-07-28 06:04:22,136 - Start running step step2_restore_data 2024-07-28 06:04:22,167 - Running "run_db_restore" (task 1 of 1) 2024-07-28 06:11:47,649 - Step finished successfully Run step3_exit_rollback on all Manager nodes to continue the rollback. { "state": 1, "state_text": "CMD_SUCCESS", "info": "", "body": null } |
4. 다시 모든 NSX Manager에서 다음 명령어를 실행합니다.
root@nsx-mgr01:~# su admin NSX CLI (Manager, Policy, Controller 3.2.3.1.0.22104638). Press ? for command list or enter: help nsx-mgr01> node-rollback run-step step3_exit_rollback This will start services in restored version. - Please make sure step2_restore_data is successful on one of the MP nodes before running this step. Do you want to continue? (yes/no): yes 2024-07-28 06:50:01,705 - Running restore_complete_check 2024-07-28 06:50:06,796 - Node restore complete checks passed. 2024-07-28 06:50:06,796 - Start running step step3_exit_rollback 2024-07-28 06:50:06,836 - Running "start_services" (task 1 of 3) 2024-07-28 06:56:27,424 - Running "trigger_search_resync" (task 2 of 3) 2024-07-28 06:57:37,629 - Running "finish_rollback" (task 3 of 3) 2024-07-28 06:57:37,757 - Step finished successfully { "state": 1, "state_text": "CMD_SUCCESS", "info": "", "body": null } root@nsx-mgr02:~# su admin NSX CLI (Manager, Policy, Controller 3.2.3.1.0.22104638). Press ? for command list or enter: help nsx-mgr02> node-rollback run-step step3_exit_rollback This will start services in restored version. - Please make sure step2_restore_data is successful on one of the MP nodes before running this step. Do you want to continue? (yes/no): yes 2024-07-28 06:50:18,434 - Running restore_complete_check 2024-07-28 06:50:23,545 - Node restore complete checks passed. 2024-07-28 06:50:23,546 - Start running step step3_exit_rollback 2024-07-28 06:50:23,590 - Running "start_services" (task 1 of 3) 2024-07-28 06:56:13,871 - Running "trigger_search_resync" (task 2 of 3) 2024-07-28 06:57:29,065 - Running "finish_rollback" (task 3 of 3) 2024-07-28 06:57:29,182 - Step finished successfully { "state": 1, "state_text": "CMD_SUCCESS", "info": "", "body": null } root@nsx-mgr03:~# su admin NSX CLI (Manager, Policy, Controller 3.2.3.1.0.22104638). Press ? for command list or enter: help nsx-mgr03> node-rollback run-step step3_exit_rollback This will start services in restored version. - Please make sure step2_restore_data is successful on one of the MP nodes before running this step. Do you want to continue? (yes/no): yes 2024-07-28 06:50:28,736 - Running restore_complete_check 2024-07-28 06:50:33,836 - Node restore complete checks passed. 2024-07-28 06:50:33,836 - Start running step step3_exit_rollback 2024-07-28 06:50:33,875 - Running "start_services" (task 1 of 3) 2024-07-28 06:56:24,419 - Running "trigger_search_resync" (task 2 of 3) 2024-07-28 06:57:29,602 - Running "finish_rollback" (task 3 of 3) 2024-07-28 06:57:29,698 - Step finished successfully { "state": 1, "state_text": "CMD_SUCCESS", "info": "", "body": null } |
5. 모든 NSX Manager에서 버전 정보를 확인합니다.
nsx-mgr01> get version Sun Jul 28 2024 UTC 06:59:53.182 VMware NSX Software, Version 3.2.3.1.0.22104638 Product Version 3.2.3.1.0.22104592 Technical Support: http://www.vmware.com/support.html Copyright © 2014-2023 VMware, Inc. All rights reserved. This product is protected by copyright and intellectual property laws in the United States and other countries as well as by international treaties. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies. nsx-mgr02> get version Sun Jul 28 2024 UTC 07:00:17.708 VMware NSX Software, Version 3.2.3.1.0.22104638 Product Version 3.2.3.1.0.22104592 Technical Support: http://www.vmware.com/support.html Copyright © 2014-2023 VMware, Inc. All rights reserved. This product is protected by copyright and intellectual property laws in the United States and other countries as well as by international treaties. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies. nsx-mgr03> get version Sun Jul 28 2024 UTC 07:00:19.466 VMware NSX Software, Version 3.2.3.1.0.22104638 Product Version 3.2.3.1.0.22104592 Technical Support: http://www.vmware.com/support.html Copyright © 2014-2023 VMware, Inc. All rights reserved. This product is protected by copyright and intellectual property laws in the United States and other countries as well as by international treaties. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies. |
[References]
Upgrade Management Plane from NSX 3.2.1.x and later
https://docs.vmware.com/en/VMware-NSX/4.1/upgrade/GUID-E5E0692F-BE74-48C2-96E4-EF61F7216635.html