Merge "devstack: Don't modprobe inside containers"
This commit is contained in:
commit
ad5840313b
@ -1666,10 +1666,21 @@ function enroll_nodes {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function die_if_module_not_loaded {
|
||||||
|
if ! grep -q $1 /proc/modules; then
|
||||||
|
die $LINENO "$1 kernel module is not loaded"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function configure_iptables {
|
function configure_iptables {
|
||||||
# enable tftp natting for allowing connections to HOST_IP's tftp server
|
# enable tftp natting for allowing connections to HOST_IP's tftp server
|
||||||
|
if ! running_in_container; then
|
||||||
sudo modprobe nf_conntrack_tftp
|
sudo modprobe nf_conntrack_tftp
|
||||||
sudo modprobe nf_nat_tftp
|
sudo modprobe nf_nat_tftp
|
||||||
|
else
|
||||||
|
die_if_module_not_loaded nf_conntrack_tftp
|
||||||
|
die_if_module_not_loaded nf_nat_tftp
|
||||||
|
fi
|
||||||
# explicitly allow DHCP - packets are occasionally being dropped here
|
# explicitly allow DHCP - packets are occasionally being dropped here
|
||||||
sudo iptables -I INPUT -p udp --dport 67:68 --sport 67:68 -j ACCEPT || true
|
sudo iptables -I INPUT -p udp --dport 67:68 --sport 67:68 -j ACCEPT || true
|
||||||
# nodes boot from TFTP and callback to the API server listening on $HOST_IP
|
# nodes boot from TFTP and callback to the API server listening on $HOST_IP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user