Merge "Remove the obsolete --block-migrate parameter"
This commit is contained in:
commit
5a5ffcf560
@ -68,26 +68,15 @@ fi
|
|||||||
{% if compute_evacuate %}
|
{% if compute_evacuate %}
|
||||||
{% if 'compute' in node_name %}
|
{% if 'compute' in node_name %}
|
||||||
source {{ overcloud_rc }}
|
source {{ overcloud_rc }}
|
||||||
## Detect if ceph shared storage was used
|
|
||||||
STORAGE_BACKEND=$(openstack volume service list -f json | jq -r -c '.[] | select(.Binary | contains("cinder-volume")) | .Host' | sed s/hostgroup@tripleo_//)
|
|
||||||
{% for instance in node_instances.stdout_lines %}
|
{% for instance in node_instances.stdout_lines %}
|
||||||
if [ $STORAGE_BACKEND == 'ceph' ]; then
|
nova live-migration {{ instance }} {{ node_name }}
|
||||||
nova live-migration {{ instance }} {{ node_name }}
|
|
||||||
else
|
|
||||||
nova live-migration --block-migrate {{ instance }} {{ node_name }}
|
|
||||||
fi
|
|
||||||
timeout_seconds=120
|
timeout_seconds=120
|
||||||
elapsed_seconds=0
|
elapsed_seconds=0
|
||||||
while true; do
|
while true; do
|
||||||
if [ $STORAGE_BACKEND == 'ceph' ]; then
|
echo "Live migrating {{ instance }} back to {{ node_name }} ..."
|
||||||
echo "Shared storage live migrating {{ instance }} back to {{ node_name }} ..."
|
|
||||||
## Live migration might not complete on the first run so we run it multiple times
|
## Live migration might not complete on the first run so we run it multiple times
|
||||||
## until the instance ends back on the originating host
|
## until the instance ends back on the originating host
|
||||||
nova live-migration {{ instance }} {{ node_name }}
|
nova live-migration {{ instance }} {{ node_name }}
|
||||||
else
|
|
||||||
echo "Block migrating {{ instance }} back to {{ node_name }} ..."
|
|
||||||
nova live-migration --block-migrate {{ instance }} {{ node_name }}
|
|
||||||
fi
|
|
||||||
INSTANCE_HOST=$(openstack server show {{ instance }} -f value -c OS-EXT-SRV-ATTR:host)
|
INSTANCE_HOST=$(openstack server show {{ instance }} -f value -c OS-EXT-SRV-ATTR:host)
|
||||||
if [ $INSTANCE_HOST == '{{ node_name }}' ]; then
|
if [ $INSTANCE_HOST == '{{ node_name }}' ]; then
|
||||||
break
|
break
|
||||||
|
@ -1,14 +1,8 @@
|
|||||||
{% if compute_evacuate %}
|
{% if compute_evacuate %}
|
||||||
source {{ overcloud_rc }}
|
source {{ overcloud_rc }}
|
||||||
## Detect if ceph shared storage was used
|
|
||||||
STORAGE_BACKEND=$(openstack volume service list -f json | jq -r -c '.[] | select(.Binary | contains("cinder-volume")) | .Host' | sed s/hostgroup@tripleo_//)
|
|
||||||
## Get exact hostname
|
## Get exact hostname
|
||||||
HOST=$(openstack compute service list -f value -c Host | grep {{ node_name }} )
|
HOST=$(openstack compute service list -f value -c Host | grep {{ node_name }} )
|
||||||
if [ $STORAGE_BACKEND == 'ceph' ]; then
|
nova host-evacuate-live ${HOST}
|
||||||
nova host-evacuate-live ${HOST}
|
|
||||||
else
|
|
||||||
nova host-evacuate-live --block-migrate ${HOST}
|
|
||||||
fi
|
|
||||||
|
|
||||||
timeout_seconds=120
|
timeout_seconds=120
|
||||||
elapsed_seconds=0
|
elapsed_seconds=0
|
||||||
|
Loading…
Reference in New Issue
Block a user