Commit e21c64a3 authored by Elijah Grubb's avatar Elijah Grubb

Merge remote-tracking branch 'upstream/master' into entrypoint-bug-fix

parents 9ed6c0e5 642d15f8
......@@ -798,11 +798,11 @@ sub ensureDockerInstalled()
while ((time() - $startwaittime) < 900) {
my $rc = system("docker info");
if (!$rc) {
TBDebugTimeStamp("docker appears to be running\n");
TBDebugTimeStamp("docker appears to be running");
last;
}
else {
TBDebugTimeStamp("docker is not yet running; waiting...\n");
TBDebugTimeStamp("docker is not yet running; waiting...");
sleep(1);
}
}
......@@ -2735,10 +2735,13 @@ sub rootPreConfigNetwork($$$$)
# of any other macvlan devices).
if (exists($private->{'vlandevs'})) {
foreach my $brname (keys(%{ $private->{'vlandevs'} })) {
my $brv = getBridgeForIface($private->{'dummys'}->{$brname});
my @mvs = getMacvlanIfaces($private->{'dummys'}->{$brname});
my $viface = $private->{'vlandevs'}->{$brname};
next
if (!defined($viface));
my $brv = getBridgeForIface($viface);
my @mvs = getMacvlanIfaces($viface);
if (!defined($brv) && @mvs == 0) {
mysystem2("$IP link del dev $brname");
mysystem2("$IP link del dev $viface");
delete($private->{'vlandevs'}->{$brname})
if ($?);
}
......@@ -3237,8 +3240,20 @@ sub vnodePreConfigControlNetwork($$$$$$$$$$$$)
warn("could not find bossip anywhere; aborting!");
return -1;
}
my (undef,undef,undef,undef,@addrs) = gethostbyname("users");
if ($? || @addrs == 0) {
my $retries = 30;
my @addrs = ();
while ($retries > 0) {
(undef,undef,undef,undef,@addrs) = gethostbyname("users");
if ($? || @addrs == 0) {
warn("could not resolve users.$bossdomain; retrying!");
sleep(2);
}
else {
last;
}
$retries -= 1;
}
if (@addrs == 0) {
warn("could not resolve users.$bossdomain; aborting!");
return -1;
}
......@@ -4201,10 +4216,13 @@ sub vnodeDestroy($$$$)
# of any other macvlan devices).
if (exists($private->{'vlandevs'})) {
foreach my $brname (keys(%{ $private->{'vlandevs'} })) {
my $brv = getBridgeForIface($private->{'dummys'}->{$brname});
my @mvs = getMacvlanIfaces($private->{'dummys'}->{$brname});
my $viface = $private->{'vlandevs'}->{$brname};
next
if (!defined($viface));
my $brv = getBridgeForIface($viface);
my @mvs = getMacvlanIfaces($viface);
if (!defined($brv) && @mvs == 0) {
mysystem2("$IP link del dev $brname");
mysystem2("$IP link del dev $viface");
delete($private->{'vlandevs'}->{$brname})
if ($?);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment