xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC] hotplug/Linux: Add --wait to iptables calls.
@ 2015-06-01 14:59 Anthony PERARD
  2015-06-01 15:08 ` Jan Beulich
  0 siblings, 1 reply; 6+ messages in thread
From: Anthony PERARD @ 2015-06-01 14:59 UTC (permalink / raw)
  To: Xen Devel
  Cc: Anthony PERARD, Wei Liu, Ian Jackson, Ian Campbell,
	Stefano Stabellini

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@citrix.com>

---

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-06-01 16:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-01 14:59 [PATCH RFC] hotplug/Linux: Add --wait to iptables calls Anthony PERARD
2015-06-01 15:08 ` Jan Beulich
2015-06-01 15:17   ` Ian Campbell
2015-06-01 16:09     ` Anthony PERARD
2015-06-01 16:13       ` Wei Liu
2015-06-01 16:15       ` Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).