[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH RFC] hotplug/Linux: Add --wait to iptables calls.



This help to avoid guest creation error when a downstream project is also
updating the iptables at guest creation time.

The error seen is this one:
  libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus:
  /etc/xen/scripts/vif-bridge online [-1] exited with error status 4

Apparently, exit status 4 could be a try again error.

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

---

This error is seen while using OpenStack with nova-network service running
(instead of Neutron). OpenStack is updating the iptables with iptables-save
and iptables-restore.

The status 4 error also happend at guest shutdown time (with vif-bridge
offline ...) and it appear to happen more often, but that not an issue
since the guest is been destroy.

Host: Ubuntu 14.04 (which have Xen 4.4)
---
 tools/hotplug/Linux/vif-common.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/hotplug/Linux/vif-common.sh 
b/tools/hotplug/Linux/vif-common.sh
index fa0a18e..5780343 100644
--- a/tools/hotplug/Linux/vif-common.sh
+++ b/tools/hotplug/Linux/vif-common.sh
@@ -130,9 +130,9 @@ frob_iptable()
     local c="-D"
   fi
 
-  iptables "$c" FORWARD -m physdev --physdev-is-bridged --physdev-in "$dev" \
+  iptables --wait "$c" FORWARD -m physdev --physdev-is-bridged --physdev-in 
"$dev" \
     "$@" -j ACCEPT 2>/dev/null &&
-  iptables "$c" FORWARD -m physdev --physdev-is-bridged --physdev-out "$dev" \
+  iptables --wait "$c" FORWARD -m physdev --physdev-is-bridged --physdev-out 
"$dev" \
     -j ACCEPT 2>/dev/null
 
   if [ \( "$command" == "online" -o "$command" == "add" \) -a $? -ne 0 ]
-- 
Anthony PERARD


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.