RFC: Turning off change of subnet/domain from facts by default

I constantly need to solve issues around Foreman changing subnet or domain from facts. We have a setting for that but the default value is Yes, this was introduced probably before any provisioning. It causes pain to users who do not have networking correct or who move hosts into different VLANs. What’s worse is that these changes do not trigger orchestration, so it is creating DHCP and DNS conflicts

I would like to propose to extend the setting from Yes/No to “For unmanaged hosts only, For all hosts, No” defaulting to only for unmanaged hosts. This is a sane default that will work fine for users who only use Foreman without provisioning as an inventory. Also it can be implemented in a way that existing installations will stay on “Yes” so no change will be seen after upgrade. Only new installation would default to more sane “unmanaged hosts only”, because when a host is provisioned or registered via the new mechanism, then it’s more logical that the intention is to keep the host there.

Opinions?

Whoops, looks like I already proposed this :slight_smile:

Interestingly, I presented a different approach to solve the problem. Which one do you like more?

1 Like