When using Cobbler as Puppet's External Node Classifier, the Kictstart Metadata parameters configured in Cobbler override those derived from Puppet (e.g. using facts).
Cobbler Metadata example
[root@cobblerserver ~]# cobbler distro report --name=centos7.4-x86_64 | grep Metadata
Kickstart Metadata : {'operatingsystemrelease': '7.2.1511'}
This distro is attached to the profile used by the linuxclient node. The operatingsystemrelease
parameter is inherited by the node.
What the node sees
[root@linuxclient ~]# facter operatingsystemrelease
7.4.1708
As you can see, the actual OS release installed is 7.4.1708
Puppetserver error
When compiling the catalog, the puppet server looks at the parameters configured within the external node classifier and overrides the params discovered as facts.
[root@puppetserver puppetserver]# tail -f puppetserver.log
2017-10-02 15:05:26,528 INFO [qtp1935869009-4672] [puppet-server] Puppet Caching facts for linuxclient
2017-10-02 15:05:26,547 WARN [qtp1935869009-4672] [puppet-server] Puppet The node parameter 'operatingsystemrelease' for node 'linuxclient' was already set to '7.2.1511'. It could not be set to '7.4.1708'
2017-10-02 15:05:26,547 INFO [qtp1935869009-4672] [puppet-server] Puppet Caching node for linuxclient
How to resolve this
In this situation, we had some further templates relying on this particular parameter which weren't deployed correctly, as the paramteter set in Cobbler (which is used for kickstart templating) is the same name as the fact collected for puppet templating.
I can automate the Cobbler profiling so it matches the actual system state (e.g. when upgrading, also ensure Cobbler is updated).
I could instead use a different parameter name in Cobbler.