Make config-dhcp-agent.sh bashate compliant
Change-Id: I91ede62a58cd224b7b93f4652174c09c387386d6 Partially-Implements: blueprint bashate gate
This commit is contained in:
parent
1d299dfe9a
commit
58c1a04c49
@ -26,53 +26,53 @@ neutron_conf=/etc/neutron/neutron.conf
|
||||
# https://www.rdoproject.org/forum/discussion/567/packstack-allinone-grizzly-cirros-image-cannot-get-a-dhcp-address-when-a-centos-image-can/p1
|
||||
|
||||
/usr/sbin/iptables -A POSTROUTING -t mangle -p udp --dport bootpc \
|
||||
-j CHECKSUM --checksum-fill
|
||||
-j CHECKSUM --checksum-fill
|
||||
|
||||
if [[ ${MECHANISM_DRIVERS} =~ linuxbridge ]]; then
|
||||
interface_driver="neutron.agent.linux.interface.BridgeInterfaceDriver"
|
||||
interface_driver="neutron.agent.linux.interface.BridgeInterfaceDriver"
|
||||
elif [[ ${MECHANISM_DRIVERS} == "openvswitch" ]]; then
|
||||
interface_driver="neutron.agent.linux.interface.OVSInterfaceDriver"
|
||||
interface_driver="neutron.agent.linux.interface.OVSInterfaceDriver"
|
||||
fi
|
||||
|
||||
# Logging
|
||||
crudini --set $neutron_conf \
|
||||
DEFAULT \
|
||||
log_file \
|
||||
"${NEUTRON_DHCP_AGENT_LOG_FILE}"
|
||||
DEFAULT \
|
||||
log_file \
|
||||
"${NEUTRON_DHCP_AGENT_LOG_FILE}"
|
||||
|
||||
# Configure dhcp_agent.ini
|
||||
crudini --set $cfg \
|
||||
DEFAULT \
|
||||
verbose \
|
||||
"${VERBOSE_LOGGING}"
|
||||
DEFAULT \
|
||||
verbose \
|
||||
"${VERBOSE_LOGGING}"
|
||||
crudini --set $cfg \
|
||||
DEFAULT \
|
||||
debug \
|
||||
"${DEBUG_LOGGING}"
|
||||
DEFAULT \
|
||||
debug \
|
||||
"${DEBUG_LOGGING}"
|
||||
crudini --set $cfg \
|
||||
DEFAULT \
|
||||
interface_driver \
|
||||
"$interface_driver"
|
||||
DEFAULT \
|
||||
interface_driver \
|
||||
"$interface_driver"
|
||||
crudini --set $cfg \
|
||||
DEFAULT \
|
||||
dhcp_driver \
|
||||
"${DHCP_DRIVER}"
|
||||
DEFAULT \
|
||||
dhcp_driver \
|
||||
"${DHCP_DRIVER}"
|
||||
crudini --set $cfg \
|
||||
DEFAULT \
|
||||
use_namespaces \
|
||||
"${USE_NAMESPACES}"
|
||||
DEFAULT \
|
||||
use_namespaces \
|
||||
"${USE_NAMESPACES}"
|
||||
crudini --set $cfg \
|
||||
DEFAULT \
|
||||
delete_namespaces \
|
||||
"${DELETE_NAMESPACES}"
|
||||
DEFAULT \
|
||||
delete_namespaces \
|
||||
"${DELETE_NAMESPACES}"
|
||||
crudini --set $cfg \
|
||||
DEFAULT \
|
||||
dnsmasq_config_file \
|
||||
"${DNSMASQ_CONFIG_FILE}"
|
||||
DEFAULT \
|
||||
dnsmasq_config_file \
|
||||
"${DNSMASQ_CONFIG_FILE}"
|
||||
crudini --set $cfg \
|
||||
DEFAULT \
|
||||
root_helper \
|
||||
"${ROOT_HELPER}"
|
||||
DEFAULT \
|
||||
root_helper \
|
||||
"${ROOT_HELPER}"
|
||||
|
||||
cat > ${DNSMASQ_CONFIG_FILE} <<EOF
|
||||
dhcp-option-force=26,1450
|
||||
@ -81,7 +81,7 @@ EOF
|
||||
|
||||
# Remove any existing qdhcp namespaces
|
||||
ip netns list | grep qdhcp | while read -r line ; do
|
||||
ip netns delete $line
|
||||
ip netns delete $line
|
||||
done
|
||||
|
||||
# Start DHCP Agent
|
||||
|
Loading…
x
Reference in New Issue
Block a user