Know when the provisioning of a host from the Foreman server is complete.

Problem:
Hi, I have an automatic device provisioning process in Foreman, but I need to control when it is finished.
Do you know if there is a way to see if the device is provisioned correctly from Foreman?

Foreman and Proxy versions:
Foreman 3.9.1

Foreman and Proxy plugin versions:
Katello 4.11

Distribution and version:
Red Hat Enterprise Linux release 8.8 (Ootpa)

Other relevant data:
I have seen that in the file /var/log/foreman/production.log it leaves some logs, but it is not clear to me what is the final provisioning message or if I should check other files.

1 Like

Hello, you can be checking the Build substatus of a host. When it is switched to Built, the installer has finished amd the machine is rebooting. There’s WIP to enhance this further and have a new explicit value of this state for after the Host rebooted. The Build substatus can be easily checked through the REST API.

1 Like

Thank you very much for the answer, I have obtained the result of the provisioning of the provisioned host going from Pending to Installed, but I can’t use this status, because after the provisioning, I make a series of configurations and until they are not finished we don’t consider the host as OK.
So I have set up a process using local parameters of the host to validate that the provisioning and configuration are OK, I have created a parameter as false that I modify when I start the provisioning process on the host and when I finish my configuration I set it as true, all this from triggered from the REST API.

Thanks for the background! Yeah, building workflow like this on top of Parameters is nice and relatively easy. If you were using Foreman’s configuration (puppet/ansible/salt) integration for the actual host configuration, you could probably rely on the built-in statuses too.

CC @lstejska and @Dyrkon as you’re currently looking at Build status, this is an interesting use case to know about.

2 Likes