Fix grenade jobs
This changes up devstack code to make sure OVS does the right thing after upgrading. After the neutron upgrade, it uses a new OVS tag for networking, so this changes things over to the new one. Make sure that we remove all resources that were created during resources phase. Set tempest fixed_network_name explicitly as it is prerequirement for ironic, see reference. Reference: https://github.com/openstack/tempest/blob/039b2fe/tempest/scenario/manager.py#L1161 Change-Id: I35789602fb542bb33533211a742c3e4d265a3b91
This commit is contained in:
parent
659f951d72
commit
c1e0fece35
@ -910,8 +910,8 @@ function create_ovs_taps {
|
||||
tag_id=$(sudo ovs-vsctl get port ${tapdev} tag)
|
||||
die_if_not_set $LINENO tag_id "Failed to get tag id"
|
||||
|
||||
local ovs_tap=ovs-${tag_id}-tap1
|
||||
local brbm_tap=brbm-${tag_id}-tap1
|
||||
local ovs_tap=ovs-tap
|
||||
local brbm_tap=brbm-tap
|
||||
# make sure veth pair is not existing, otherwise delete its links
|
||||
sudo ip link show $ovs_tap && sudo ip link delete $ovs_tap
|
||||
sudo ip link show $brbm_tap && sudo ip link delete $brbm_tap
|
||||
|
@ -78,6 +78,10 @@ function early_create {
|
||||
r_net_gateway=$(sudo ip netns exec qrouter-$router_id ip -4 route get 8.8.8.8 |grep dev | awk '{print $7}')
|
||||
sudo ip route replace $RESOURCES_FIXED_RANGE via $r_net_gateway
|
||||
|
||||
# NOTE(vsaienko) remove connection between br-int and brbm from old setup
|
||||
sudo ovs-vsctl -- --if-exists del-port ovs-1-tap1
|
||||
sudo ovs-vsctl -- --if-exists del-port brbm-1-tap1
|
||||
|
||||
create_ovs_taps $net_id
|
||||
}
|
||||
|
||||
@ -94,7 +98,26 @@ function verify_noapi {
|
||||
}
|
||||
|
||||
function destroy {
|
||||
:
|
||||
# NOTE(vsaienko) move ironic VMs back to private network.
|
||||
local net_id
|
||||
net_id=$(openstack network show private -f value -c id)
|
||||
create_ovs_taps $net_id
|
||||
|
||||
# NOTE(vsaienko) during early_create phase we update grenade resources neutron/subnet_id,
|
||||
# neutron/router_id, neutron/net_id. It was needed to instruct nova to boot instances
|
||||
# in ironic_grenade network instead of neutron_grenade during resources phase. As result
|
||||
# during neutron/resources.sh destroy phase ironic_grenade router|subnet|network were deleted.
|
||||
# Make sure that we removed neutron resources here.
|
||||
neutron router-gateway-clear neutron_grenade || /bin/true
|
||||
neutron router-interface-delete neutron_grenade neutron_grenade || /bin/true
|
||||
neutron router-delete neutron_grenade || /bin/true
|
||||
neutron net-delete neutron_grenade || /bin/true
|
||||
|
||||
# NOTE(vsaienko) fixed_network_name tempest config option setting logic was changed in
|
||||
# https://review.openstack.org/374311/ and until it is not reverted or
|
||||
# https://review.openstack.org/380006 is merged we need to set fixed_network_name explicitly.
|
||||
TEMPEST_CONFIG="$TARGET_RELEASE_DIR/tempest/etc/tempest.conf"
|
||||
iniset $TEMPEST_CONFIG compute fixed_network_name $PRIVATE_NETWORK_NAME
|
||||
}
|
||||
|
||||
# Dispatcher
|
||||
|
@ -26,6 +26,8 @@ RUN_DIR=$(cd $(dirname "$0") && pwd)
|
||||
# Source params
|
||||
source $GRENADE_DIR/grenaderc
|
||||
|
||||
source $TOP_DIR/openrc admin admin
|
||||
|
||||
# Import common functions
|
||||
source $GRENADE_DIR/functions
|
||||
|
||||
@ -123,6 +125,12 @@ start_nova_compute
|
||||
ensure_services_started ironic-api ironic-conductor
|
||||
ensure_logs_exist ir-cond ir-api
|
||||
|
||||
# NOTE(vsaienko) starting from Ocata when Neutron is restarted there is no guarantee that
|
||||
# internal tag, that was assigned to network will be the same. As result we need to update
|
||||
# tag on link between br-int and brbm to new value after restart.
|
||||
net_id=$(openstack network show ironic_grenade -f value -c id)
|
||||
create_ovs_taps $net_id
|
||||
|
||||
set +o xtrace
|
||||
echo "*********************************************************************"
|
||||
echo "SUCCESS: End $0"
|
||||
|
Loading…
Reference in New Issue
Block a user