Appreciate the suggestion, lzap. Unfortunately that didn’t appear to solve the issue.
Could you point me in the direction as to what function is triggered when the ‘Build’ button is pressed within the gui?
It’s almost appearing that since the realm/hostname is not changing between builds (as it’s simply a re-build of an existing host) the realm_update function is not being called. I’m not seeing any evidence in logs pointing to a failure to update the realm on re-build either.
If you investigate the file I sent you, that’s what’s being actually called. In the “queue” method, there might be something missing so it does not get queued. Enable debug mode to see which actions are in the queue.
I enabled debug-level logging on foreman and confirmed that the realm task is not getting queued on host re-build.
Also, digging through some of the code, I saw that there is a method in /app/models/host/managed.rb that sets: set_realm :rebuild => true. However, outside of logging, :rebuild isn’t defined in realm.rb