Domain not registered when changing NIC from unmanaged to managed

Problem:
I have a host for which I’ve created a unmanaged NIC. This managed NIC is actually a tunnel interface that will be added later, via an ansible script. However, to make life easier for my colleagues, I’ve already filled in the name and domain of this NIC (but still, managed is unchecked).

after a single run of an ansible script, gets all script nicely filled in, e.g. ip-address (which is for us, the most important data)

The idea is that, as soon as the host is deployed in the field, we should communicate to this host via this tunnel interface. Since we now have a domain + name (which I have entered beforehand) and the IP address (added because of the uploaded ansible facts) it’s now ultra-easy for my colleagues to switch to this interface: check both “managed” and “remote execution” and you’re good to go!

However, it doesn’t register the FQDN in my domain server and I’m very curious to why? I have to execute “rebuild config” afterwards which is very cumbersome.

Expected outcome:
I expected that, as soon as I select managed interface and save my changes, that the domain is registered in my DNS. However, I have to run “rebuild config” before this actually works.

Foreman and Proxy versions:

Foreman and Proxy plugin versions:

Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)
The log does not give me any details why this hasn’t worked!

Probably relevant log:

 Completed 200 OK in 14ms (Views: 0.8ms | ActiveRecord: 2.3ms)
2019-09-30T10:31:00 [I|aud|c47df9e1] Host::Base (128) update event on disk ,
2019-09-30T10:31:00 [I|aud|c47df9e1] Host::Base (128) update event on comment ,
2019-09-30T10:31:00 [I|aud|c47df9e1] Host::Base (128) update event on pxe_loader , PXELinux BIOS
2019-09-30T10:31:00 [I|aud|c47df9e1] Nic::Bond (531) update event on name ,
2019-09-30T10:31:00 [I|aud|c47df9e1] Nic::Managed (528) update event on execution true, false
2019-09-30T10:31:00 [I|aud|c47df9e1] Nic::Managed (529) update event on name ,
2019-09-30T10:31:00 [I|aud|c47df9e1] Nic::Managed (529) update event on ip6 ,
2019-09-30T10:31:00 [I|aud|c47df9e1] Nic::Managed (530) update event on name ,
2019-09-30T10:31:00 [I|aud|c47df9e1] Nic::Managed (530) update event on ip6 ,
2019-09-30T10:31:00 [I|aud|c47df9e1] Nic::Managed (532) update event on execution false, true
2019-09-30T10:31:00 [I|aud|c47df9e1] Nic::Managed (532) update event on managed false, true

There are bugs, specifically bugs around changing from managed to unmanaged and vice versa.

Hey @lzap, thanks for coming back on this topic. I’ll try to investigate further and try and file a patch for this scenario instead :slight_smile: Just wanted to check if my observation could be correct and that this is a bug and not a feature :stuck_out_tongue:

1 Like

One from “orchestration bugs” category. AKA can of worms :slight_smile: