Bug #24595
openEmpty puppet facts are discarded on upload
Description
Steps to Reproduce:
1. Create a custom fact with a value:
Facter.add(:custom_fact) do
setcode do
'not_empty'
end
end
2. Check the facter output on the host
[root@host72 ~]# facter -p | grep custom_fact
custom_fact => not_empty
3. Run puppet agent to report the custom fact.
4. Check the hammer host facts output: (or the facts from the foreman webui for the same host)
[root@foreman ~]# hammer host facts --name host72.example.com | grep custom_fact
5. Change the fact value
Facter.add(:custom_fact) do
setcode do
''
end
end
6. Check facter output on the host. It should now report a null value.
[root@host72 ~]# facter -p | grep custom
custom_fact =>
7. Run puppet agent to report the custom fact
8. Check the hammer host facts output: (or the facts from the foreman webui for the same host)
[root@foreman ~]# hammer host facts --name host72.example.com | grep custom_fact
[root@foreman ~]
So the custom fact key:value gets completely discarded.
Actual results:
custom facts get discarded completely
Expected results:
Foreman should indicate that custom fact has a null value. Something like:
[root@foreman ~]# hammer host facts --name host72.example.com | grep custom_fact
custom_fact | null
Updated by Ondřej Pražák over 5 years ago
- Subject changed from Empty puppet facts are discarded on upload to Empty puppet facts are discarded on upload
- Category changed from PuppetCA to Facts