diff options
author | Dan Radez <dradez@redhat.com> | 2016-04-12 14:39:32 -0400 |
---|---|---|
committer | Dan Radez <dradez@redhat.com> | 2016-06-28 10:02:05 -0400 |
commit | ec53529b33c22eb54f6d9af5aa14e4ef74340963 (patch) | |
tree | d67781d8e834de3c9d803ec5e44e2a3b6bc14d9c /ci/deploy.sh | |
parent | cc35694a87dfab1afbf429bedf67e2ef63003f3d (diff) |
Adding VLAN support
JIRA: APEX-136
JIRA: APEX-30
Change-Id: I7cbbe11f4c1f1455dba253733c78fe8dc215de97
Signed-off-by: Dan Radez <dradez@redhat.com>
Diffstat (limited to 'ci/deploy.sh')
-rwxr-xr-x | ci/deploy.sh | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh index 50090490..30f8e0f9 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -495,7 +495,6 @@ function setup_undercloud_vm { # extra space to overwrite the previous connectivity output echo -e "${blue}\r ${reset}" sleep 1 - ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" "if ! ip a s eth2 | grep ${public_network_provisioner_ip} > /dev/null; then ip a a ${public_network_provisioner_ip}/${public_network_cidr##*/} dev eth2; ip link set up dev eth2; fi" # ssh key fix for stack user ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" "restorecon -r /home/stack" @@ -665,12 +664,12 @@ function configure_undercloud { ovs_dpdk_bridge='' fi - if ! controller_nic_template=$(python3.4 -B $LIB/python/apex-python-utils.py nic-template -t $CONFIG/nics-controller.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family); then + if ! controller_nic_template=$(python3.4 -B $LIB/python/apex-python-utils.py nic-template -r controller -s $NETSETS -i $net_isolation_enabled -t $CONFIG/nics-template.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family); then echo -e "${red}ERROR: Failed to generate controller NIC heat template ${reset}" exit 1 fi - if ! compute_nic_template=$(python3.4 -B $LIB/python/apex-python-utils.py nic-template -t $CONFIG/nics-compute.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family -d "$ovs_dpdk_bridge"); then + if ! compute_nic_template=$(python3.4 -B $LIB/python/apex-python-utils.py nic-template -r compute -s $NETSETS -i $net_isolation_enabled -t $CONFIG/nics-template.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family -d "$ovs_dpdk_bridge"); then echo -e "${red}ERROR: Failed to generate compute NIC heat template ${reset}" exit 1 fi @@ -773,6 +772,30 @@ sudo sed -i '/#workers\s=/c\workers = 2' /etc/heat/heat.conf sudo systemctl restart openstack-heat-engine sudo systemctl restart openstack-heat-api EOI + +# configure external network + ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" << EOI +if [[ "$public_network_vlan" != "native" ]]; then + cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-vlan${public_network_vlan} +DEVICE=vlan${public_network_vlan} +ONBOOT=yes +DEVICETYPE=ovs +TYPE=OVSIntPort +BOOTPROTO=static +IPADDR=${public_network_provisioner_ip} +PREFIX=${public_network_cidr##*/} +OVS_BRIDGE=br-ctlplane +OVS_OPTIONS="tag=${public_network_vlan}" +EOF + ifup vlan${public_network_vlan} +else + if ! ip a s eth2 | grep ${public_network_provisioner_ip} > /dev/null; then + ip a a ${public_network_provisioner_ip}/${public_network_cidr##*/} dev eth2 + ip link set up dev eth2 + fi +fi +EOI + # WORKAROUND: must restart the above services to fix sync problem with nova compute manager # TODO: revisit and file a bug if necessary. This should eventually be removed # as well as glance api problem |