blade-tuvok: move public interface off a VLAN

Previously, the public/internal interfaces were VLANned onto the same NIC. For
some reason, sometime the Emulex adapters seem to end up not getting configured
properly, which causes me no end of pain when I spend time trying to debug why
none of my VMs can see the internet anymore.

Instead of doing this, put the public interface onto its own actual virtual
network interface.
This commit is contained in:
Luke Granger-Brown 2021-12-17 00:27:24 +00:00
parent 18ac4b13fd
commit fee02312d3
2 changed files with 17 additions and 6 deletions

View file

@ -47,7 +47,8 @@ in {
my.blade.macAddress = {
internal = "e4:11:5b:ac:e3:fe";
storage = "e4:11:5b:ac:e4:02";
internet = "e4:11:5b:ac:e4:00";
internet = "e4:11:5b:ac:e3:ff";
public = "e4:11:5b:ac:e4:00";
};
services.ceph = {

View file

@ -24,6 +24,11 @@ in {
type = lib.types.nullOr lib.types.str;
default = null;
};
macAddress.public = lib.mkOption {
# If not using a VLAN.
type = lib.types.nullOr lib.types.str;
default = null;
};
};
config = {
@ -90,12 +95,15 @@ in {
br = interfaces: { interfaces = lib.mkDefault interfaces; rstp = false; };
in {
br-mgmt = br [ "en-int" ];
br-public = br [ "vl-int-public" ];
};
vlans.vl-int-public = {
id = 100;
interface = "en-int";
br-public = br [ (if config.my.blade.macAddress.public == null then "vl-int-public" else "en-public") ];
};
vlans = ({} //
(if config.my.blade.macAddress.public == null then {
vl-int-public = {
id = 100;
interface = "en-int";
};
} else {}));
interfaces.br-mgmt.ipv4.addresses = lib.mkBefore [{
address = "10.100.0.${toString (100 + config.my.blade.bay)}";
@ -132,6 +140,8 @@ in {
ATTR{address}=="${config.my.blade.macAddress.storage}", NAME="en-storage"
'') + (lib.optionalString (config.my.blade.macAddress.internet != null) ''
ATTR{address}=="${config.my.blade.macAddress.internet}", NAME="en-internet"
'') + (lib.optionalString (config.my.blade.macAddress.public != null) ''
ATTR{address}=="${config.my.blade.macAddress.public}", NAME="en-public"
'');
virtualisation.podman.enable = true;