From 547f9309a1e5b92dbbc44165d3c8a7ff6256adc6 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Tue, 23 Oct 2018 09:34:51 -0700 Subject: [PATCH] Minor fixes to re-align with Ironic Ironic has evolved and a few items were no longer correct in the contributed scripts for use with ironic. Additionally a database workaround was fixed, and as such commented out. Change-Id: I105791985973e8348d43d41982ac7ba3e0cf970c --- magnum/tests/contrib/gate_hook.sh | 9 ++++++--- magnum/tests/contrib/post_test_hook.sh | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/magnum/tests/contrib/gate_hook.sh b/magnum/tests/contrib/gate_hook.sh index 6a0c0acd3c..9fe5fba5e8 100755 --- a/magnum/tests/contrib/gate_hook.sh +++ b/magnum/tests/contrib/gate_hook.sh @@ -57,7 +57,9 @@ elif [ "${coe}${special}" = "k8s-ironic" ]; then export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin ironic git://git.openstack.org/openstack/ironic" - export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_DEPLOY_DRIVER=pxe_ipmitool" + # NOTE(TheJulia): Ironic switched to "hardware types" in Queens and + # removed legacy "drivers" in Rocky. "ipmi" superceeds *_ipmitool drivers. + export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_DEPLOY_DRIVER=ipmi" # NOTE(ykarel) Ironic to work with magnum, requires devstack to be configured with IP_VERSION=4 export DEVSTACK_LOCAL_CONFIG+=$'\n'"IP_VERSION=4" export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_BAREMETAL_BASIC_OPS=True" @@ -73,8 +75,9 @@ elif [ "${coe}${special}" = "k8s-ironic" ]; then # export DEVSTACK_LOCAL_CONFIG+=$'\n'"SWIFT_ENABLE_TEMPURLS=True" # export DEVSTACK_LOCAL_CONFIG+=$'\n'"SWIFT_TEMPURL_KEY=password" # export DEVSTACK_LOCAL_CONFIG+=$'\n'"SWIFT_HASH=password" - - export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_ENABLED_DRIVERS=fake,agent_ipmitool,pxe_ipmitool" + # NOTE(TheJulia): Enable interface order will result in the iscsi + # deployment method being used by default. + export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_ENABLED_DEPLOY_INTERFACES=iscsi,direct" export DEVSTACK_LOCAL_CONFIG+=$'\n'"VOLUME_BACKING_FILE_SIZE=24G" export DEVSTACK_LOCAL_CONFIG+=$'\n'"FORCE_CONFIG_DRIVE=True" export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=tinyipa" diff --git a/magnum/tests/contrib/post_test_hook.sh b/magnum/tests/contrib/post_test_hook.sh index 7331a84280..92b88880f2 100755 --- a/magnum/tests/contrib/post_test_hook.sh +++ b/magnum/tests/contrib/post_test_hook.sh @@ -38,10 +38,11 @@ function create_test_data { elif [ "${coe}${special}" == 'k8s-ironic' ]; then local bm_flavor_id=$(openstack flavor show baremetal -f value -c id) die_if_not_set $LINENO bm_flavor_id "Failed to get id of baremetal flavor" - + # NOTE(TheJulia): This issue was fixed in Feb 2018 as part of change + # Ifb9a49d4258a559cf2175d902e9424a3f98065c5. Commented out in Oct 2018. # NOTE(yuanying): Workaround fix for ironic issue # cf. https://bugs.launchpad.net/ironic/+bug/1596421 - echo "alter table ironic.nodes modify instance_info LONGTEXT;" | mysql -uroot -p${MYSQL_PASSWORD} ironic + # echo "alter table ironic.nodes modify instance_info LONGTEXT;" | mysql -uroot -p${MYSQL_PASSWORD} ironic # NOTE(yuanying): Ironic instances need to connect to Internet openstack subnet set private-subnet --dns-nameserver 8.8.8.8 local container_format="ami"