xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Robert Ho <robert.hu@intel.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: [OSSTEST PATCH 2/4] ts-xen-install: networking: Bail if we expected a bridge but there wasn't one
Date: Thu, 10 Sep 2015 18:17:29 +0100	[thread overview]
Message-ID: <1441905451-32518-3-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1441905451-32518-1-git-send-email-ian.jackson@eu.citrix.com>

If we have been told that there should already be a bridge, but there
isn't one, we would previously rewrite the networking config just in
case (mainly to make it static).  Instead, quit the /e/n/i editing in
this case.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 ts-xen-install |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/ts-xen-install b/ts-xen-install
index 433a6d3..b148163 100755
--- a/ts-xen-install
+++ b/ts-xen-install
@@ -285,17 +285,15 @@ sub nodhcp () {
 	}
 	my ($iface,$bridgex);
 
-	if ($initscripts_nobridge) {
-	    $iface= 'xenbr0';
-	    $bridgex= <<END;
+	if (!$initscripts_nobridge) {
+	    target_editfile_cancel("no bridge but old xend setup");
+	}
+	$iface= 'xenbr0';
+	$bridgex= <<END;
     bridge_ports $physif
     bridge_fd 0
     bridge_stp off
 END
-	} else {
-	    $iface= $physif;
-	    $bridgex= '';
-        }
 
 	my $routes= target_cmd_output_root($ho, "route -n");
 
-- 
1.7.10.4

  parent reply	other threads:[~2015-09-10 17:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-05  6:22 OSSTEST -- nested test case development, RFC: ts-guest-destroy doesn't call guest_await_dhcp_tcp() if guest has fixed IP Hu, Robert
2015-08-05  6:43 ` Hu, Robert
2015-08-05 12:26 ` Ian Campbell
2015-08-06  1:57   ` Hu, Robert
2015-08-06  9:00     ` Ian Campbell
2015-08-06 10:33       ` Hu, Robert
2015-08-11 12:54       ` Ian Jackson
2015-08-12  5:15         ` Hu, Robert
2015-08-12 15:27           ` Ian Jackson
2015-08-13  3:46             ` Hu, Robert
2015-08-14  2:41               ` Hu, Robert
2015-09-10 16:38               ` Ian Jackson
2015-09-10 17:17                 ` [OSSTest Nested v12 18/21] After Xen install, configure its xenbr0 interface as dhcp Ian Jackson
2015-09-10 17:17                   ` [OSSTEST PATCH 1/4] ts-xen-install: networking: Do nothing if there's already a bridge Ian Jackson
2015-09-10 17:17                   ` Ian Jackson [this message]
2015-09-10 17:17                   ` [OSSTEST PATCH 3/4] ts-xen-install: networking: Never rewrite the interface config Ian Jackson
2015-09-25 18:34                     ` Ian Jackson
2015-09-10 17:17                   ` [OSSTEST PATCH 4/4] ts-xen-install: networking: Rename `nodhcp' to `ensurebridge' Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441905451-32518-3-git-send-email-ian.jackson@eu.citrix.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=robert.hu@intel.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).