Set resource class during upgrade
This is done to trigger a bit of code from commit c3118b91db4b97a689c9a2f25a9554a0ccb29252 to nova for active nodes. Change-Id: I1ac1b8501cbed901941e7c89fc55c5b9bea0cb4f
This commit is contained in:
parent
c08c21e308
commit
30bc3c0933
@ -93,7 +93,15 @@ function create {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function verify {
|
function verify {
|
||||||
:
|
local side="$1"
|
||||||
|
|
||||||
|
if [[ "$side" = "post-upgrade" ]]; then
|
||||||
|
nodes=$(openstack --os-baremetal-api-version 1.9 baremetal node list --provision-state active -f value -c UUID)
|
||||||
|
# Trigger nova flavor migration code for active instances.
|
||||||
|
for node_id in $nodes; do
|
||||||
|
openstack --os-baremetal-api-version 1.21 baremetal node set $node_id --resource-class baremetal
|
||||||
|
done
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function verify_noapi {
|
function verify_noapi {
|
||||||
@ -131,10 +139,14 @@ case $1 in
|
|||||||
create
|
create
|
||||||
;;
|
;;
|
||||||
"verify_noapi")
|
"verify_noapi")
|
||||||
verify_noapi
|
# NOTE(vdrok): our implementation of verify_noapi is a noop, but
|
||||||
|
# grenade always passes the upgrade side (pre-upgrade or post-upgrade)
|
||||||
|
# as an argument to it. Pass all the arguments grenade passes further.
|
||||||
|
verify_noapi "${@:2}"
|
||||||
;;
|
;;
|
||||||
"verify")
|
"verify")
|
||||||
verify
|
# NOTE(vdrok): pass all the arguments grenade passes further.
|
||||||
|
verify "${@:2}"
|
||||||
;;
|
;;
|
||||||
"destroy")
|
"destroy")
|
||||||
destroy
|
destroy
|
||||||
|
Loading…
x
Reference in New Issue
Block a user