此内容没有您所选择的语言版本。
Chapter 4. Testing Evacuation with Instance HA
Warning
The following procedure involves deliberately crashing a Compute node. Doing this forces the automated evacuation of instances through Instance HA.
Boot one or more instances on the overcloud before crashing the Compute node that hosts the instances to test.
stack@director $ . overcloudrc stack@director $ nova boot --image cirros --flavor 2 test-failover stack@director $ nova list --fields name,status,host
stack@director $ . overcloudrc stack@director $ nova boot --image cirros --flavor 2 test-failover stack@director $ nova list --fields name,status,hostCopy to Clipboard Copied! Toggle word wrap Toggle overflow Log in to the Compute node that hosts the instances and change to the
rootuser. Replacecompute-nwith the name of the Compute node:stack@director $ . stackrc stack@director $ ssh -l heat-admin compute-n heat-admin@compute-n $ su -
stack@director $ . stackrc stack@director $ ssh -l heat-admin compute-n heat-admin@compute-n $ su -Copy to Clipboard Copied! Toggle word wrap Toggle overflow Crash the Compute node.
root@compute-n $ echo c > /proc/sysrq-trigger
root@compute-n $ echo c > /proc/sysrq-triggerCopy to Clipboard Copied! Toggle word wrap Toggle overflow Wait a few minutes and then verify that these instances re-spawned on another Compute nodes.
stack@director $ nova list --fields name,status,host stack@director $ nova service-list
stack@director $ nova list --fields name,status,host stack@director $ nova service-listCopy to Clipboard Copied! Toggle word wrap Toggle overflow