deployment: libvirt: correct internal/external net

The INTERNAL and EXTERNAL networks configured by destroy and setup
network scripts are inverted with reference to the default
config_controller selections as well as the wiki
StarlingX/Installation_Guide_Virtual_Environment/Controller_Storage.

The most pressing concern in this is that what was actually the internal
management network was being nat'd.

Also, under normal testing it is not recommended to address the internal
management network from the virtualization host.  There are unlikely to be
configurations that will have external devices addressing the management
network.

Delete what was "EXTERNAL", actually internal, and rename "INTERNAL" to
be EXTERNAL.

Related-Bug: #1790716

Change-Id: I08f9e7712fed120001c864903880e13e9478764d
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
This commit is contained in:
Michel Thebeau 2018-09-07 16:21:40 -04:00
parent 8ff2f0e8ba
commit 503a9417de
3 changed files with 8 additions and 14 deletions

View File

@ -22,10 +22,8 @@ an interactive shell that configures everything. Here's an example::
export CONTROLLER=madcloud
export COMPUTE=madnode
export BRIDGE_INTERFACE=madbr
export INTERNAL_NETWORK=172.30.20.0/24
export INTERNAL_IP=172.30.20.1/24
export EXTERNAL_NETWORK=192.168.20.0/24
export EXTERNAL_IP=192.168.20.1/24
export EXTERNAL_NETWORK=172.30.20.0/24
export EXTERNAL_IP=172.30.20.1/24
There is also a script ``cleanup_network.sh`` that will remove networking
configuration from libvirt.

View File

@ -1,10 +1,8 @@
#!/usr/bin/env bash
BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr}
INTERNAL_NETWORK=${INTERNAL_NETWORK:-10.10.10.0/24}
INTERNAL_IP=${INTERNAL_IP:-10.10.10.1/24}
EXTERNAL_NETWORK=${EXTERNAL_NETWORK:-192.168.204.0/24}
EXTERNAL_IP=${EXTERNAL_IP:-192.168.204.1/24}
EXTERNAL_NETWORK=${EXTERNAL_NETWORK:-10.10.10.0/24}
EXTERNAL_IP=${EXTERNAL_IP:-10.10.10.1/24}
for i in {1..4}; do
BRIDGE_INTERFACE_NAME=${BRIDGE_INTERFACE}$i

View File

@ -19,10 +19,8 @@ done
shift $((OPTIND-1))
BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr}
INTERNAL_NETWORK=${INTERNAL_NETWORK:-10.10.10.0/24}
INTERNAL_IP=${INTERNAL_IP:-10.10.10.1/24}
EXTERNAL_NETWORK=${EXTERNAL_NETWORK:-192.168.204.0/24}
EXTERNAL_IP=${EXTERNAL_IP:-192.168.204.1/24}
EXTERNAL_NETWORK=${EXTERNAL_NETWORK:-10.10.10.0/24}
EXTERNAL_IP=${EXTERNAL_IP:-10.10.10.1/24}
if [[ -r /sys/class/net/${BRIDGE_INTERFACE}1 ]]; then
echo "${BRIDGE_INTERFACE}1 exists, cowardly refusing to overwrite it, exiting..."
@ -33,8 +31,8 @@ for i in {1..4}; do
sudo brctl addbr ${BRIDGE_INTERFACE}$i
done
sudo ifconfig ${BRIDGE_INTERFACE}1 $INTERNAL_IP up
sudo ifconfig ${BRIDGE_INTERFACE}2 $EXTERNAL_IP up
sudo ifconfig ${BRIDGE_INTERFACE}1 $EXTERNAL_IP up
sudo ifconfig ${BRIDGE_INTERFACE}2 up
sudo ifconfig ${BRIDGE_INTERFACE}3 up
sudo ifconfig ${BRIDGE_INTERFACE}4 up
sudo iptables -t nat -A POSTROUTING -s $EXTERNAL_NETWORK -j MASQUERADE