-
Notifications
You must be signed in to change notification settings - Fork 16
Description
In the scenario where certname is not FQDN, (in my case it's the AWS EC2 instance-id)...
I've encountered an issue where depending on where a report or facts are received first, a new host ends up appearing twice in Foreman. I can 'fix' this by turning off Create new host when report is uploaded
and just leaving Create new host when facts are uploaded
on, but the root cause appears to be the difference in how reports and facts are processed.
It would appear that the report processor always use the agent's certname, but the fact upload feature of enc.rb
use the fqdn
fact, (and only falls back to certname is fqdn doesn't exist??).
If a host exists in Foreman with its name set to the FQDN, then a report sent to Foreman using the certname still magically gets added to the right host, but the reverse is not true (a host with the name eg. i-1234567890
will never get any facts added to it).