Skip to content

Commit

Permalink
Merge pull request #762 from socallinuxexpo/rh/1725453483
Browse files Browse the repository at this point in the history
[READY] - reenable dhcpv6 kea and nixosTest core updates
  • Loading branch information
kylerisse authored Sep 6, 2024
2 parents 1ba2edc + 0168308 commit 878ed17
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 8 deletions.
3 changes: 1 addition & 2 deletions nix/machines/core/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@

in
{
# TODO: Reenable after bumping to new nix release
enable = false;
enable = true;
configFile = "${dhcp6PopulateConfig}/dhcp6-server.conf";
};
};
Expand Down
34 changes: 28 additions & 6 deletions nix/tests/core.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ in
# temporary router since we do not have the junipers for ipv6 router advertisement
router = { ... }: {
virtualisation.vlans = [ 1 ];
virtualisation.graphics = false;
systemd.services.systemd-networkd.environment.SYSTEMD_LOG_LEVEL = "debug";
# since this is a router we need to set enable ipv6 forwarding or radvd will complain
boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = true;
Expand Down Expand Up @@ -79,11 +78,11 @@ in
};

virtualisation.vlans = [ 1 ];
virtualisation.graphics = false;
systemd.services.systemd-networkd.environment.SYSTEMD_LOG_LEVEL = "debug";
systemd.network = {
networks = lib.mkForce {
"01-eth1" = {
networks = {
# Override the phyiscal interface config
"10-lan" = lib.mkForce {
name = "eth1";
enable = true;
address = [ "${coremasterAddr.ipv6}/64" "${coremasterAddr.ipv4}/24" ];
Expand Down Expand Up @@ -145,14 +144,37 @@ in
coremaster.succeed("named-checkzone scale.lan ${scaleZone}")
client1.wait_for_unit("systemd-networkd-wait-online.service")
client1.wait_until_succeeds("ping -c 5 ${coremasterAddr.ipv4}")
#client1.wait_until_succeeds("ping -c 5 -6 ${coremasterAddr.ipv6}")
client1.wait_until_succeeds("ping -c 5 -6 ${coremasterAddr.ipv6}")
client1.wait_until_succeeds("ip route show | grep default | grep -w ${routerAddr.ipv4}")
# ensure that we got the correct prefix and suffix on dhcpv6
#client1.wait_until_succeeds("ip addr show dev eth1 | grep inet6 | grep ${chomp}:d8c")
client1.wait_until_succeeds("ip addr show dev eth1 | grep inet6 | grep ${chomp}:d8c")
# Have to wrap drill since retcode isnt necessarily 1 on query failure
client1.wait_until_succeeds("test ! -z \"$(drill -Q -z scale.lan SOA)\"")
client1.wait_until_succeeds("test ! -z \"$(drill -Q -z coreexpo.scale.lan A)\"")
client1.wait_until_succeeds("test ! -z \"$(drill -Q -z coreexpo.scale.lan AAAA)\"")
client1.wait_until_succeeds("test ! -z \"$(drill -Q -z -x ${coremasterAddr.ipv4})\"")
'';

interactive.nodes =
let
interactiveDefaults = hostPort:
{
services.openssh.enable = true;
services.openssh.settings.PermitRootLogin = "yes";
users.extraUsers.root.initialPassword = "";
systemd.network.networks."01-eth0" = {
name = "eth0";
enable = true;
networkConfig.DHCP = "yes";
};
virtualisation.forwardPorts = [
{ from = "host"; host.port = hostPort; guest.port = 22; }
];
};
in
{
router = interactiveDefaults 2222;
coremaster = interactiveDefaults 2223;
client1 = interactiveDefaults 2224;
};
}

0 comments on commit 878ed17

Please sign in to comment.