diff options
author | Vladyslav Drok <vdrok@mirantis.com> | 2017-08-11 19:47:15 +0300 |
---|---|---|
committer | Vladyslav Drok <vdrok@mirantis.com> | 2017-08-21 10:14:42 +0000 |
commit | 30bc3c0933a1072e5e4c48b4614f5f387ffd8327 (patch) | |
tree | 232dc6aedfe40402cf384e4d326ebca91305adf8 /devstack/upgrade | |
parent | c08c21e30840b20cb979c9f117f15414f45da856 (diff) | |
download | ironic-30bc3c0933a1072e5e4c48b4614f5f387ffd8327.tar.gz |
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
Diffstat (limited to 'devstack/upgrade')
-rwxr-xr-x | devstack/upgrade/resources.sh | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/devstack/upgrade/resources.sh b/devstack/upgrade/resources.sh index 9682b753b..040ecab80 100755 --- a/devstack/upgrade/resources.sh +++ b/devstack/upgrade/resources.sh @@ -93,7 +93,15 @@ function create { } 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 { @@ -131,10 +139,14 @@ case $1 in create ;; "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 + # NOTE(vdrok): pass all the arguments grenade passes further. + verify "${@:2}" ;; "destroy") destroy |