2024-10-11T12:04:56 [W|app|31bcb6e9] ERF42-9911 [Foreman::Exception]: Host is pending for Build
2024-10-11T12:04:56 [I|app|31bcb6e9] Backtrace for 'ERF42-9911 [Foreman::Exception]: Host is pending for Build' error (Foreman::Exception): ERF42-9911 [Foreman::Exception]: Host is pending for Build
Could you go to the webinterface, find the foreman.example.com host and cancel it being built (whyever and however it got into that state)?
I would assume this should unblock the installer going forward.
And then we gotta find out how the heck the host ended up in build mode.
Still the same error. This time with -l DEBUG added:
2024-10-11 18:13:18 [DEBUG ] [configure] /Stage[main]/Foreman::Register/Foreman_host[foreman-foreman.example.com]: Starting to evaluate the resource (1438 of 1543)
2024-10-11 18:13:18 [DEBUG ] [configure] Foreman_host[foreman-foreman.example.com](provider=rest_v3): Making post request to https://foreman.example.com/api/v2/hosts/facts
2024-10-11 18:13:18 [DEBUG ] [configure] Foreman_host[foreman-foreman.example.com](provider=rest_v3): Received response 422 from request to https://foreman.example.com/api/v2/hosts/facts
2024-10-11 18:13:18 [ERROR ] [configure] Error making POST request to Foreman at https://foreman.example.com/api/v2/hosts/facts: Response: 422 Unprocessable Content
2024-10-11 18:13:18 [ERROR ] [configure] /Stage[main]/Foreman::Register/Foreman_host[foreman-foreman.example.com]/ensure: change from 'absent' to 'present' failed: Error making POST request to Foreman at https://foreman.example.com/api/v2/hosts/facts: Response: 422 Unprocessable Content
2024-10-11 18:13:18 [DEBUG ] [configure] /Stage[main]/Foreman::Register/Foreman_host[foreman-foreman.example.com]: Evaluated in 0.07 seconds
Okay. That’s super weird.
What would be setting the host into build mode?!
Can you get us another round of production.log please, whether it’s visible what moved it to “build” now?
After that, you can edit /usr/share/foreman-installer/config/foreman.hiera/common.yaml and change foreman::register::force_fact_upload: true to foreman::register::force_fact_upload: false, this should allow you to run the installer (I hope), but will be erased on the next update again.
Sorry, I was off over the weekend. I changed the settings so the installer could complete, then changed it back. As I expected I get the same error. I don’t want to leave it in a broken state, but I don’t know where else to look.
I have some hard deadlines I have to meet over the next couple of weeks and don’t know when I’ll be able to dig deeper. Anyway, temporarily I’ve added the setting to /etc/foreman-installer/custom-hiera.yaml. That should get us moving and let us launch our other project next week.