What's this?
Nova instance が稼働している compute node が障害停止した際に、Nova instance を別の compute node 上に復旧(=退避)
- Shared storage 無しの場合、全く新しい Nova instance が別の compute node 上で起動される
- ただし、障害停止した compute node 上で稼働していた Nova instance の Parameter (id, hostname, uid, ip ...etc)が使用される
- データは引き継がれない
[条件]
- Shared storage なし
- Nova instance の全データは compute node の local disk にある
- 追加 Volume としての Cinder 未使用
- Hypervisor は KVM
Initial state
Compute node
# nova service-list | egrep "Host|nova-compute"
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
| nova-compute | node-27 | nova | enabled | up | 2015-03-17T08:36:27.000000 | - |
| nova-compute | node-28 | nova | enabled | up | 2015-03-17T08:36:24.000000 | - |
| nova-compute | node-31 | nova2 | enabled | up | 2015-03-17T08:36:24.000000 | - |
AZ
# nova availability-zone-list | egrep -A 10 "^\| nova"
| nova | available |
| |- node-27 | |
| | |- nova-compute | enabled :-) 2015-03-17T08:36:37.000000 |
| |- node-28 | |
| | |- nova-compute | enabled :-) 2015-03-17T08:36:34.000000 |
| nova2 | available |
| |- node-31 | |
| | |- nova-compute | enabled :-) 2015-03-17T08:36:34.000000 |
+--------------------------+----------------------------------------+
Nova instance is running on node-27
[root@node-17 ~]# nova list --field name,status,OS-EXT-STS:vm_state,OS-EXT-AZ:availability_zone,OS-EXT-SRV-ATTR:hypervisor_hostname
+--------------------------------------+------------+--------+----------------------+------------------------------+--------------------------------------+
| ID | Name | Status | OS-EXT-STS: Vm State | OS-EXT-AZ: Availability Zone | OS-EXT-SRV-ATTR: Hypervisor Hostname |
+--------------------------------------+------------+--------+----------------------+------------------------------+--------------------------------------+
| b103274a-fd6d-42cc-8cfb-c78f3d37c898 | admin_vm01 | ACTIVE | active | nova | node-27 |
+--------------------------------------+------------+--------+----------------------+------------------------------+--------------------------------------+
Stop nova-compute service of node-27
Stop nova-compute service
# service openstack-nova-compute stop
Stopping openstack-nova-compute: [ OK ]
# service openstack-nova-compute status
openstack-nova-compute is stopped
# nova service-list | egrep "Host|nova-compute"
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
| nova-compute | node-27 | nova | enabled | down | 2015-03-17T08:38:17.000000 | - |
| nova-compute | node-28 | nova | enabled | up | 2015-03-17T08:37:14.000000 | - |
| nova-compute | node-31 | nova2 | enabled | up | 2015-03-17T08:38:14.000000 | - |
AZ
# nova availability-zone-list | egrep -A 10 "^\| nova"
| nova | available |
| |- node-27 | |
| | |- nova-compute | enabled XXX 2015-03-17T08:38:17.000000 |
| |- node-28 | |
| | |- nova-compute | enabled :-) 2015-03-17T08:37:14.000000 |
| nova2 | available |
| |- node-31 | |
| | |- nova-compute | enabled :-) 2015-03-17T08:38:14.000000 |
+--------------------------+----------------------------------------+
Evacuate
Execute evacuate
Evacuate Nova instance to node-28
# nova evacuate b103274a-fd6d-42cc-8cfb-c78f3d37c898 node-28
+-----------+--------------+
| Property | Value |
+-----------+--------------+
| adminPass | EtDTWFzQAe8q |
+-----------+--------------+
Check the evacuate result
- Nova instance has same parameters (id, hostname, uid, ip ...etc) which previous Nova instance had.
- You can login to this instance by using above adminPass.
# nova list --field name,status,,OS-EXT-STS:vm_state,OS-EXT-AZ:availability_zone,OS-EXT-SRV-ATTR:hypervisor_hostname
+--------------------------------------+------------+--------+--+----------------------+------------------------------+--------------------------------------+
| ID | Name | Status | | OS-EXT-STS: Vm State | OS-EXT-AZ: Availability Zone | OS-EXT-SRV-ATTR: Hypervisor Hostname |
+--------------------------------------+------------+--------+--+----------------------+------------------------------+--------------------------------------+
| b103274a-fd6d-42cc-8cfb-c78f3d37c898 | admin_vm01 | ACTIVE | | active | nova | node-28 |
+--------------------------------------+------------+--------+--+----------------------+------------------------------+--------------------------------------+
Environment
- Openstack : Juno
- Ceph : Firefly
Reference
Openstack - Nova Evacuate with Shared Storage
Openstack - Nova Evacuate with Shared Storage with Cinder
Openstack - Nova Evacuate with Shared Storage with Cinder between AZ
Openstack - Nova Evacuate without Shared Storage
Openstack - Nova Host-Evacuate with Shared Storage
Openstack - Nova Host-Evacuate with Shared Storage between AZ