Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7cc1c2c626f3
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7835641e7757
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Apr 14, 2020

  1. nixosTests.flannel: port to python, unbreak

    For reasons yet unknown, the vxlan backend doesn't work (at least inside
    the qemu networking), so this is moved to the udp backend.
    
    Note changing the backend apparently also changes the interface name,
    it's now `flannel0`, not `flannel.1`
    
    fixes #74941
    flokli committed Apr 14, 2020
    Copy the full SHA
    28ef438 View commit details

Commits on Apr 15, 2020

  1. Merge pull request #85252 from flokli/nixos-flannel-fix

    nixosTests.flannel: port to python, unbreak
    flokli authored Apr 15, 2020
    Copy the full SHA
    7835641 View commit details
Showing with 19 additions and 18 deletions.
  1. +19 −18 nixos/tests/flannel.nix
37 changes: 19 additions & 18 deletions nixos/tests/flannel.nix
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
import ./make-test.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ lib, ...} : {
name = "flannel";

meta = with pkgs.stdenv.lib.maintainers; {
meta = with lib.maintainers; {
maintainers = [ offline ];
};

nodes = let
flannelConfig = {
flannelConfig = { pkgs, ... } : {
services.flannel = {
enable = true;
backend = {
Type = "udp";
Port = 8285;
};
network = "10.1.0.0/16";
iface = "eth1";
etcd.endpoints = ["http://etcd:2379"];
};

networking.firewall.allowedUDPPorts = [ 8472 ];
networking.firewall.allowedUDPPorts = [ 8285 ];
};
in {
etcd = { ... }: {
@@ -32,25 +36,22 @@ import ./make-test.nix ({ pkgs, ...} : {
networking.firewall.allowedTCPPorts = [ 2379 ];
};

node1 = { ... }: {
require = [flannelConfig];
};

node2 = { ... }: {
require = [flannelConfig];
};
node1 = flannelConfig;
node2 = flannelConfig;
};

testScript = ''
startAll;
start_all()
$node1->waitForUnit("flannel.service");
$node2->waitForUnit("flannel.service");
node1.wait_for_unit("flannel.service")
node2.wait_for_unit("flannel.service")
my $ip1 = $node1->succeed("ip -4 addr show flannel.1 | grep -oP '(?<=inet).*(?=/)'");
my $ip2 = $node2->succeed("ip -4 addr show flannel.1 | grep -oP '(?<=inet).*(?=/)'");
node1.wait_until_succeeds("ip l show dev flannel0")
ip1 = node1.succeed("ip -4 addr show flannel0 | grep -oP '(?<=inet).*(?=/)'")
node2.wait_until_succeeds("ip l show dev flannel0")
ip2 = node2.succeed("ip -4 addr show flannel0 | grep -oP '(?<=inet).*(?=/)'")
$node1->waitUntilSucceeds("ping -c 1 $ip2");
$node2->waitUntilSucceeds("ping -c 1 $ip1");
node1.wait_until_succeeds(f"ping -c 1 {ip2}")
node2.wait_until_succeeds(f"ping -c 1 {ip1}")
'';
})