From 64a2cf40a5a0690afc17a804d6ffa44520553535 Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Wed, 15 Apr 2015 16:38:09 -0700 Subject: [PATCH] Add workaround to work with cirros image The cirros image uses an old dhcp client which does not work properly with hardware that has checksum offload enabled. Add a bootp rule to rewrite the checksum via iptables. Latest cirros 0.3.33 is afflicted by this bug. Change-Id: Ibfd1f87af5d0bef9fcb1354121e76e4e0db8ab5e --- .../neutron-agents/config-scripts/config-dhcp-agent.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docker/neutron/neutron-agents/config-scripts/config-dhcp-agent.sh b/docker/neutron/neutron-agents/config-scripts/config-dhcp-agent.sh index 415644aa6e..08d2b21b1a 100755 --- a/docker/neutron/neutron-agents/config-scripts/config-dhcp-agent.sh +++ b/docker/neutron/neutron-agents/config-scripts/config-dhcp-agent.sh @@ -18,6 +18,14 @@ check_required_vars VERBOSE_LOGGING DEBUG_LOGGING MECHANISM_DRIVERS \ cfg=/etc/neutron/dhcp_agent.ini neutron_conf=/etc/neutron/neutron.conf +# Workaround bug in dhclient in cirros images which does not correctly +# handle setting checksums of packets when using hardware with checksum +# offloading. See: +# 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 + if [[ ${MECHANISM_DRIVERS} =~ linuxbridge ]]; then interface_driver="neutron.agent.linux.interface.BridgeInterfaceDriver" elif [[ ${MECHANISM_DRIVERS} == "openvswitch" ]]; then