Open jabl opened 5 years ago
Warewulf's initrd also doesn't have a concept of VLANs/IB partitions, eg: https://github.com/warewulf/warewulf3/blob/development/provision/initramfs/init#L73
Oh, right. Definitely not as easy to fix as just tweaking the regexp, it seems.
Does your use case include booting from a VLAN or IB partition device, or do you need to use it in a template to create a ifcfg-ib0.80a1 or similar?
For now at least, no need to boot from it. I just need to create the ifcfg files and bring up the interfaces at some point during boot, which would then allow me to mount Lustre.
(I could of course duct tape something together with a shell script launched from /etc/rc.local, but it would of course be nice if the 'obvious' thing would work)
A workaround for VLANs at least, assuming RHEL, is to use vlan<id>
named interfaces with the PHYSDEV
attribute specified in the ifcfg file.
Alternatively you can name your VLAN interfaces anything at all if you specify VID=<ID>
via an ifcfg file like:
DEVICE=pub0
IPADDR="%{NETDEVS::PUB0::IPADDR}"
NETMASK="%{NETDEVS::PUB0::NETMASK}"
ONBOOT=yes
BOOTPROTO=none
VLAN=yes
VID=123
MTU=%{NETDEVS::PUB0::MTU}
PHYSDEV=eno1
Logic for parsing ifcfg scripts is found in /etc/sysconfig/network-scripts/ifup, around line 77 for VLAN configs, at least in RHEL 7.6.
Note, using Warewulf's file functionality the %{...} template will be replaced with whatever is configured for the host, eg. wwsh node set --netdev=pub0 ...
in the above case.
I started looking at allowing the traditional eno1.<vlan_id>
device names in Warewulf, but not booting from them. Fixing the regexs is easy enough, but there's some additional code around node name that assumes there's no periods as well.
Trying to configure a device for for an IB partition fails with
The same error occurs if I try to setup a device for an eth VLAN, which are named similarly (e.g. 'eno1.100' for VLAN 100 on the device eno1).
The problem seems to be that the regexp check in common/lib/Warewulf/Module/Cli/Node.pm is a bit too strict.