I'm running Foreman + Puppet, and I'm trying to track down some
customization that's been done in our environment. I'm having trouble
pinpointing exactly where the change is occurring. I'm assuming it's
something unique to our environment, but I can't tell if the change has
been made in Puppet, or in Foreman. I apologize if this isn't directly
related, but I thought it might be a good place to get some assistance.
Here's what happens. I notice on each puppet run, the host's operating
system in Foreman is updated. For example, if I have a Red Hat 6.7 server
and manually change it to "Red Hat 5.11" in the Foreman WebUI, after the
following puppet run, the host record is changed back to "Red Hat 6.7".
Facts on the client appear to be used to change the operating system type
within Foreman.
I can see this from a puppet run on the client as follows:
-
puppet agent --test --debug
- …
- Info: Loading facts in /var/lib/puppet/lib/facter/hosts_additional.rb
- Info: Loading facts in /var/lib/puppet/lib/facter/hardware_hostname.rb
- *** redacted lots of facts loading ***
- Info: Loading facts in /var/lib/puppet/lib/facter/ip6tables_version.rb
- Debug: catalog supports formats: pson b64_zlib_yaml yaml dot raw
- Debug: Executing '/bin/rpm --version'
- Debug: Executing '/bin/rpm --version'
- Debug: Executing '/bin/rpm --version'
- Debug: Executing '/bin/rpm --version'
- Debug: Executing '/bin/rpm -ql rpm'
- Info: Caching catalog for myhost.mydomain.com
- …
- …catalog applied…
- …
The OS change happens around, or just after, execution of line #6.
I started by looking through all of our Puppet code, including the
manifests, and any customized Puppet functions. After literally a day of
pouring over that code, I don't see anything I think is making the change.
Next, I looked at our ENC script to verify it wasn't responsible.
Afterwards, I went through our Foreman hooks (we run the Foreman hooks
plugin). I was even looking for things like triggers/stored procedures on
our database. Nada. I can't figure out what's doing it.
I know there are a lot of possibilities here, but I'm wondering if I'm
missing an obvious place to look for something (in Foreman) that has been
customized in this way.