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 1/4] ts-xen-install: networking: Do nothing if there's already a bridge
Date: Thu, 10 Sep 2015 18:17:28 +0100 [thread overview]
Message-ID: <1441905451-32518-2-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1441905451-32518-1-git-send-email-ian.jackson@eu.citrix.com>
The main effect is that old Xend tests will no longer replace the
bridge network interface. If it was using dhcp then it will keep
using dhcp, rather than being switched to have the dhcp-obtained
address hardwired in a static configuration.
A side effect is that after this, `nodhcp' will do nothing if it has
already been run, rather than replacing the effects of a previous run.
This case is only relevant for ad-hoc by-hand invocations, where
changes to the script may not be reflected when it is rerun.
Most invocations remain unaffected.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
ts-xen-install | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/ts-xen-install b/ts-xen-install
index b511e2b..433a6d3 100755
--- a/ts-xen-install
+++ b/ts-xen-install
@@ -255,7 +255,6 @@ sub nodhcp () {
if (!defined $physif) {
# preread /etc/network/interfaces to figure out the interface
my %candidates;
- my @bridges;
while (<EI>) {
if (
m{^ \s* ( auto \s+ (\S+) ) \s* $}x ||
@@ -266,20 +265,18 @@ sub nodhcp () {
}
if (
(
- (m{^ \s* iface \s+ (xenbr\w*) \s+ inet \s+ }x
- ? ((push @bridges, $1), 1) : 0)
+ m{^ \s* iface \s+ (xenbr\w*) \s+ inet \s+ }x
...
!m{^ [ \t] }x
)
&&
m{^ \s+ bridge_ports \s+ (\S+) \s }x
) {
- push @{ $candidates{$1} }, "$bridges[$#bridges] $_";
+ targt_editfile_cancel("already have a bridge");
}
}
EI->error and die $!;
delete $candidates{'lo'};
- delete $candidates{$_} foreach @bridges;
die Dumper(\%candidates, \@bridges).
" -- cannot determine default interface"
unless (scalar keys %candidates) == 1;
--
1.7.10.4
next prev parent reply other threads:[~2015-09-10 17:17 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 ` Ian Jackson [this message]
2015-09-10 17:17 ` [OSSTEST PATCH 2/4] ts-xen-install: networking: Bail if we expected a bridge but there wasn't one Ian Jackson
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-2-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).