Some hosts dont have Entry in Foreman

hi all,

Puppetserver works well and the client pull the new/edit files from the Puppetserver, but when I search the Host in Foreman I dont find it. so the Host doenst have entry in database, is there a way to recreate the Host in Foreman ?

Thanks in advance

Foreman and Proxy versions: foreman 3.6.1 , foreman-proxy 3.6.1

Distribution and version: Ubuntu 20.04.4 LTS

node.rb hostx I get result for the host, but on UI I dont find it!

This is typically an issue with taxonomies, maybe the host got created with wrong/missing organization/location. If node.rb returns data for the host, it is in Foreman.
Have you tried switching to any/any for org/loc for searching the host?

1 Like

Thanks for your answer @areyus , yes its already any/any, I saw that there is a same hostname but with different suffix.

before it was host1 how its host11 and all other setting are same, like ip-address.
I think I hade one time database issue and this happens…
I have to test this if it works fine

One question please do you use postgresql version 10 or 12 with your Foreman 3.6.1 version?

A little off topic, but we are still on Foreman 3.2 due to being caught in the EL7->EL8 migration for smart-proxies while also doing some architectural redesign. But we are running Postgres12 on EL8.

so I delete the host1 which is not found in UI from database ( of course from all tables which habe the host id) , then I rename the host11 to host1 and it works find :slight_smile: thanks @areyus

As I told you we had the problem with database, so Foreman 3.6 use porsgres 10! and thats not okay because Foreman use already version 12. and After every reboot for the server Foreman start version 12 as default, so I have to stop version 12 and start 10. and this is not right!

Is there a way to migrate the version 10 to 12 ? and not lose data

In our case, the migration to postgres12 was by either foreman-installer or the EL8 in-place migration, so it went pretty much automatically for us.
Though, Postgresql 10 is still supported: Foreman :: Manual
If you want to keep using 10 and not trouble yourself with the migration, that should be fine for now. You probably only need to configure your SystemD Services correctly to start version 10 on boot instead of 12.
If you still want to upgrade, there is an official documentation from postgres and I found this stackoverflow post which looks somewhat sane, those might help you figure it out. Both guides make some assumptions about the existing setup I believe, so double-check everything they are doing if it fits your setup and adjust accordingly. Also, remember to ensure you have a proper backup/snapshot beforehand :wink:

1 Like

This is my rule1 when I edit or install something :smiley: thanks a alot.

Very helpful informations, I want use 12 its better for next few years.

And I will check both links. Thank you so much :-).

1 Like