xcat-core
xcat-core copied to clipboard
networks.mgtifname !remote! documentation wrong?
I think the documentation for networks.mgtifname is wrong.
!remote!<nicname> doesn't work for me, !remote! does.
See below:
$ man networks | grep 'mgtifname '
mgtifname The interface name of the management/service node facing this network. !remote!<nicname> indicates a non-local network on a specific nic for relay DHCP.
# Network looks like this:
$ lsdef -t network admin3-user
Object name: admin3-user
dhcpserver=172.24.134.33
dynamicrange=172.24.151.1-172.24.151.253
gateway=172.24.151.254
mask=255.255.252.0
mgtifname=!remote!eth0
mtu=1500
net=172.24.148.0
tftpserver=172.24.134.33
$ makedhcp -n
Renamed existing dhcp configuration file to /etc/dhcp/dhcpd.conf.xcatbak
# No entry in dhcpd.conf (wrong)
$ grep 172.24.148.0 /etc/dhcp/dhcpd.conf
$
# check again with !remote! only
$ chdef -t network admin3-user mgtifname='!remote!'
$ makedhcp -n
# Entry in dhcpd.conf (correct)
$ grep 172.24.148.0 /etc/dhcp/dhcpd.conf
subnet 172.24.148.0 netmask 255.255.252.0 {
filename = "http://172.24.134.33/tftpboot/xcat/xnba/nets/172.24.148.0_22";
filename = "http://172.24.134.33/tftpboot/xcat/xnba/nets/172.24.148.0_22.uefi";
option conf-file = "http://172.24.134.33/tftpboot/pxelinux.cfg/p/172.24.148.0_22";
} # 172.24.148.0/255.255.252.0 subnet_end
hi @Obihoernchen, thanks your pointing this out. I want to confirm : Could mgtifname='!remote!' can find the right eth0 in your scenario?
Will look into it in the future.
Yes everything works as expected with mgtifname='!remote!'.
But the server only has one interface which is eth0, so it can't find anything else.
@Obihoernchen, thanks your quick response.
As an FYI this also only works if there are not dhcpinterfaces defined in the site table. If there is then '!remote!' is never added to activenics which causes every vnet "non-local" network to be skipped because of this line in process_request. I think this logic should really be removed to fix this issue. I'm putting in a pull request.
if (!defined($activenics{"!remote!"})) {
next;