xcat2/confluent

Setting net.mgt.ipv4_gateway to an empty value stops network discovery configuration on a flat network

Closed this issue · 2 comments

On a flat network you may not have a default gateway.
If you attempt to configure a device like a Lenovo D2 chassis SMM it will set the correct IP address and subnet mask but leave the default gateway.
Example:

nodeconfig smm001

smm001: bmc.ipv4_address: 172.30.23.98/20
smm001: bmc.ipv4_method: Static
smm001: bmc.ipv4_gateway: 192.168.0.1

It would be useful to set the gateway to nothing if we do not have one.

If you set a blank gateway:
nodegroupattrib everything net.mgt.ipv4_gateway=

restarting confluent will cause all discoveries to fail:
Jan 24 16:24:12 {"error": "Error encountered trying to set up smm001, [Errno -2] Name or service not known"}

I expect this is due to it expecting a proper gateway IP address and being set to blank does not help.
Maybe we are doing something stupid but for consistency not having mixed IP network ranges on the SMM is useful.

As a work-around we can set the gateway to something on the network (e.g. the management server).

On this one, the closest is probably '0.0.0.0'. I should fix it, but the likely result is 'no change to configuration' rather than setting it to 0.0.0.0 (in the underlying interface, some value must be provided, unlike linux network where gateway can be added or deleted, the net structure expects a value, so no gateway is done through an invalid value...

addressed in e7a70f3

Sorry there's no 'verify', just close here....