You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I accidentally set ip address = 10.1.0.0
with a trailing space in /etc/warewulf/provision.conf. I noticed that there was a message in /etc/dhcp/dhcpd.conf about not having an entry for the node because it was not in the boot network. When I looked in line 288 (in my version, from OpenHPC 2.5) of /usr/share/perl5/vendor_perl/Warewulf/Provision/Dhcp/Isc.pm, I discovered that the test for matching networks if ($node_testnetwork ne $network) { is thrown off by the trailing space in $network. I guess this should be fixed in the code that extract the network value from the config file, but I have no idea where that is.
The text was updated successfully, but these errors were encountered:
The same function used to read that value out, is also used to read out the value of passwords... which could have an ending space. Or an ending space could be needed...
Around line 154 in ISC.pm should be where $network is set and right after you should be able to cut out any white space with:
$network =~ s/^\s+|\s+$//g
But Warewulf::Config->get() function is going to pull the value as is from the config file.
Edit: The whitespace thing is something that I initially ran into a few times, and since I've just gotten used to making sure there isn't any trailing spaces instead of putting in special conditions. And then maybe missing all the places that the change is needed.
Good point about the general parsing code, so I agree that if anything it belongs in Isc.pm, but it was very surprising to me. At least a slightly more verbose error message, which printed both sides of the test, would have helped.
I accidentally set
ip address = 10.1.0.0
with a trailing space in
/etc/warewulf/provision.conf
. I noticed that there was a message in/etc/dhcp/dhcpd.conf
about not having an entry for the node because it was not in the boot network. When I looked in line 288 (in my version, from OpenHPC 2.5) of/usr/share/perl5/vendor_perl/Warewulf/Provision/Dhcp/Isc.pm
, I discovered that the test for matching networksif ($node_testnetwork ne $network) {
is thrown off by the trailing space in$network
. I guess this should be fixed in the code that extract the network value from the config file, but I have no idea where that is.The text was updated successfully, but these errors were encountered: