Commit b08e3323 authored by Dan Radez's avatar Dan Radez

quick fixes to deploy and clean

- adding a missing exit 1 in the deploy script
- setting link up on hypervisor bridges
- redirecting error from cleanup commands so they're not so chatty

Change-Id: I844c35effb2817948ea096b07a34d83678803e00
parent e5bb2981
......@@ -13,7 +13,7 @@ ovs_bridges="brbm brbm1 brbm2 brbm3"
# Clean off instack VM
virsh destroy instack 2> /dev/null || echo -n ''
virsh undefine instack --remove-all-storage 2> /dev/null || echo -n ''
if ! virsh vol-delete instack.qcow2 --pool default; then
if ! virsh vol-delete instack.qcow2 --pool default 2> /dev/null; then
if [ ! -e /var/lib/libvirt/images/instack.qcow2 ]; then
/usr/bin/touch /var/lib/libvirt/images/instack.qcow2
virsh vol-delete instack.qcow2 --pool default
......@@ -34,7 +34,7 @@ done
for bridge in ${ovs_bridges}; do
virsh net-destroy ${bridge} 2> /dev/null
virsh net-undefine ${bridge} 2> /dev/null
if detach_interface_from_ovs ${bridge}; then
if detach_interface_from_ovs ${bridge} 2> /dev/null; then
ovs-vsctl del-br ${bridge} 2> /dev/null
fi
done
......
......@@ -859,6 +859,7 @@ EOI
ovs_ip=${ip_range##*,}
eval "net_cidr=\${${network}_cidr}"
sudo ip addr add ${ovs_ip}/${net_cidr##*/} dev ${NET_MAP[$network]}
sudo ip link set up ${NET_MAP[$network]}
tmp_ip=$(find_ip ${NET_MAP[$network]})
if [ -n "$tmp_ip" ]; then
echo -e "${blue}INFO: OVS Bridge ${NET_MAP[$network]} IP set: ${tmp_ip}${reset}"
......@@ -960,6 +961,7 @@ parse_cmdline() {
echo -e "${red}INFO: Single flat network requested. Ignoring any network settings!${reset}"
elif [[ -z "$NETSETS" && "$net_isolation_enabled" == "TRUE" ]]; then
echo -e "${red}ERROR: You must provide a network_settings file with -n or use --flat to force a single flat network{reset}"
exit 1
fi
if [[ -n "$virtual" && -n "$INVENTORY_FILE" ]]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment