summaryrefslogtreecommitdiff
path: root/ignore-ip-command-script-errors.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-10-12 04:00:49 +0000
committerCoprDistGit <infra@openeuler.org>2023-10-12 04:00:49 +0000
commitc22f60e6e55f1bf300dd76d2222a93911f3b2bb2 (patch)
treeef665e7018377f53612ac2751dcaea35a1c587b6 /ignore-ip-command-script-errors.patch
parent39a4763249cd6289e5019acfe0c98dbb169f5f2e (diff)
automatic import of xenopeneuler22.03_LTS
Diffstat (limited to 'ignore-ip-command-script-errors.patch')
-rw-r--r--ignore-ip-command-script-errors.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/ignore-ip-command-script-errors.patch b/ignore-ip-command-script-errors.patch
new file mode 100644
index 0000000..7457873
--- /dev/null
+++ b/ignore-ip-command-script-errors.patch
@@ -0,0 +1,48 @@
+References: bsc#1172356
+The bug is that virt-manager reports a failure when in fact
+the host and guest have added the network interface. The Xen
+scripts are failing with an error when in fact that command
+is succeeding.
+
+The 'ip' commands seem to abort the script due to a 'set -e' in
+xen-script-common.sh with what appears to be an error condition.
+However, the command actually succeeds when checked from the
+host console or also by inserting a sleep before each ip command
+and executing it manually at the command line. This seems to be
+an artifact of using 'set -e' everywhere.
+
+--- xen-4.13.1-testing.orig/tools/hotplug/Linux/xen-network-common.sh
++++ xen-4.13.1-testing/tools/hotplug/Linux/xen-network-common.sh
+@@ -90,7 +90,7 @@ _setup_bridge_port() {
+ local virtual="$2"
+
+ # take interface down ...
+- ip link set dev ${dev} down
++ (ip link set dev ${dev} down || true)
+
+ if [ $virtual -ne 0 ] ; then
+ # Initialise a dummy MAC address. We choose the numerically
+@@ -101,7 +101,7 @@ _setup_bridge_port() {
+ fi
+
+ # ... and configure it
+- ip address flush dev ${dev}
++ (ip address flush dev ${dev} || true)
+ }
+
+ setup_physical_bridge_port() {
+@@ -138,11 +138,11 @@ add_to_bridge () {
+ return
+ fi
+ if [ "$legacy_tools" ]; then
+- brctl addif ${bridge} ${dev}
++ (brctl addif ${bridge} ${dev} || true)
+ else
+- ip link set "$dev" master "$bridge"
++ (ip link set "$dev" master "$bridge" || true)
+ fi
+- ip link set dev ${dev} up
++ (ip link set dev ${dev} up || true)
+ }
+
+ # Usage: set_mtu bridge dev