Code Review
/
icn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Include boot MAC address when listing nodes
[icn.git]
/
deploy
/
metal3-vm
/
ubuntu_bridge_network_configuration.sh
diff --git
a/deploy/metal3-vm/ubuntu_bridge_network_configuration.sh
b/deploy/metal3-vm/ubuntu_bridge_network_configuration.sh
index
dffa678
..
60875cb
100755
(executable)
--- a/
deploy/metal3-vm/ubuntu_bridge_network_configuration.sh
+++ b/
deploy/metal3-vm/ubuntu_bridge_network_configuration.sh
@@
-1,6
+1,5
@@
#!/usr/bin/env bash
#!/usr/bin/env bash
-
-set -xe
+set -eux -o pipefail
# shellcheck disable=SC1091
source lib/logging.sh
# shellcheck disable=SC1091
source lib/logging.sh
@@
-11,24
+10,20
@@
if [ "$MANAGE_PRO_BRIDGE" == "y" ]; then
# Adding an IP address in the libvirt definition for this network results in
# dnsmasq being run, we don't want that as we have our own dnsmasq, so set
# the IP address here
# Adding an IP address in the libvirt definition for this network results in
# dnsmasq being run, we don't want that as we have our own dnsmasq, so set
# the IP address here
- sudo brctl addbr provisioning
- # sudo ifconfig provisioning 172.22.0.1 netmask 255.255.255.0 up
- # Use ip command. ifconfig commands are deprecated now.
+ sudo ip link add dev provisioning type bridge
sudo ip addr add dev provisioning 172.22.0.1/24
sudo ip link set provisioning up
# Need to pass the provision interface for bare metal
if [ "$PRO_IF" ]; then
sudo ip addr add dev provisioning 172.22.0.1/24
sudo ip link set provisioning up
# Need to pass the provision interface for bare metal
if [ "$PRO_IF" ]; then
- sudo
brctl addif provisioning "$PRO_IF"
+ sudo
ip link set dev "$PRO_IF" master provisioning
fi
fi
if [ "$MANAGE_INT_BRIDGE" == "y" ]; then
# Create the baremetal bridge
if ! [[ $(ip a show baremetal) ]]; then
fi
fi
if [ "$MANAGE_INT_BRIDGE" == "y" ]; then
# Create the baremetal bridge
if ! [[ $(ip a show baremetal) ]]; then
- sudo brctl addbr baremetal
- # sudo ifconfig baremetal 192.168.111.1 netmask 255.255.255.0 up
- # Use ip command. ifconfig commands are deprecated now.
+ sudo ip link add dev baremetal type bridge
sudo ip addr add dev baremetal 192.168.111.1/24
sudo ip link set baremetal up
fi
sudo ip addr add dev baremetal 192.168.111.1/24
sudo ip link set baremetal up
fi
@@
-36,7
+31,7
@@
if [ "$MANAGE_PRO_BRIDGE" == "y" ]; then
# Add the internal interface to it if requests, this may also be the interface providing
# external access so we need to make sure we maintain dhcp config if its available
if [ "$INT_IF" ]; then
# Add the internal interface to it if requests, this may also be the interface providing
# external access so we need to make sure we maintain dhcp config if its available
if [ "$INT_IF" ]; then
- sudo
brctl addif "$INT_IF"
+ sudo
ip link set dev "$INT_IF" master baremetal
fi
fi
fi
fi
@@
-45,6
+40,6
@@
if [ "$MANAGE_PRO_BRIDGE" == "y" ]; then
sudo virsh net-destroy baremetal
sudo virsh net-start baremetal
if [ "$INT_IF" ]; then #Need to bring UP the NIC after destroying the libvirt network
sudo virsh net-destroy baremetal
sudo virsh net-start baremetal
if [ "$INT_IF" ]; then #Need to bring UP the NIC after destroying the libvirt network
- sudo i
fup "$INT_IF"
+ sudo i
p link set dev "$INT_IF" up
fi
fi
fi
fi