Commit 90eaccec authored by David Johnson's avatar David Johnson

Set /etc/emulab/bossnode for emulabized Docker clients.

Now we've found a libc (musl) whose res_init() function just returns 0
:).  That is the final hope in tmcc's getbossnode() function.  Obviously
this is a crappy workaround, but it is better than adding a final gasp
like parsing /etc/resolv.conf manually.
parent 542862dd
......@@ -2746,6 +2746,13 @@ sub vnodeCreate($$$$)
"$mntdir/var.emulab/lock") {
mkdir($dir);
}
if ($newization >= DOCKER_EMULABIZE_CORE()) {
my ($boss_name,$boss_ip) = tmccbossinfo();
open(FD,">$mntdir/bossnode");
print FD "$boss_name\n";
close(FD);
push(@{$args{"HostConfig"}{"Binds"}},"$mntdir/bossnode:/etc/emulab/bossnode:ro");
}
# Populate the tmcc info.
mysystem2("rsync -a /var/emulab/boot/tmcc.$vnode_id/".
" $mntdir/var.emulab/boot/tmcc/");
......
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