You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We added a cs_rsc_defaults section to our Pacemaker configuration. The section gets added to the shadow /var/cache/puppet/shadow.puppet file, but not to the live configuration.
What behaviour did you expect instead
We expect to see the following section in /var/lib/pacemaker/cib/cib.xml:
[root@host 08:08:04][host][~]# puppet agent -t --debug | grep cs_rsc_defaults -i
Debug: Puppet::Type::Cs_rsc_defaults::ProviderCrm: file crm does not exist
Debug: /Stage[main]/Corosync_local/Cs_rsc_defaults[record-pending]: Adding autorequire relationship with Service[corosync]
Debug: /Stage[main]/Corosync_local/Cs_rsc_defaults[record-pending]: Adding autorequire relationship with Service[pacemaker]
Debug: /Stage[main]/Corosync_local/Cs_rsc_defaults[failure-timeout]: Adding autorequire relationship with Service[corosync]
Debug: /Stage[main]/Corosync_local/Cs_rsc_defaults[failure-timeout]: Adding autorequire relationship with Service[pacemaker]
Debug: /Stage[main]/Corosync_local/Cs_rsc_defaults[timeout]: Adding autorequire relationship with Service[corosync]
Debug: /Stage[main]/Corosync_local/Cs_rsc_defaults[timeout]: Adding autorequire relationship with Service[pacemaker]
Debug: Prefetching pcs resources for cs_rsc_defaults
Debug: Puppet::Type::Cs_rsc_defaults::ProviderPcs: Executing ["/usr/sbin/pcs", "cluster", "cib"] in the CIB
Debug: Cs_rsc_defaults[record-pending](provider=pcs): {}
Notice: /Stage[main]/Corosync_local/Cs_rsc_defaults[record-pending]/ensure: created (corrective)
Debug: Puppet::Type::Cs_rsc_defaults::ProviderPcs: Executing ["/usr/sbin/pcs", "resource", "defaults", "record-pending=false", "-f", "/var/cache/puppet/shadow.puppet"] in the shadow CIB "puppet"
Debug: /Stage[main]/Corosync_local/Cs_rsc_defaults[record-pending]: The container Class[Corosync_local] will propagate my refresh event
Debug: Cs_rsc_defaults[failure-timeout](provider=pcs): {}
Notice: /Stage[main]/Corosync_local/Cs_rsc_defaults[failure-timeout]/ensure: created (corrective)
Debug: Puppet::Type::Cs_rsc_defaults::ProviderPcs: Executing ["/usr/sbin/pcs", "resource", "defaults", "failure-timeout=2h", "-f", "/var/cache/puppet/shadow.puppet"] in the shadow CIB "puppet"
Debug: /Stage[main]/Corosync_local/Cs_rsc_defaults[failure-timeout]: The container Class[Corosync_local] will propagate my refresh event
Debug: Cs_rsc_defaults[timeout](provider=pcs): {}
Notice: /Stage[main]/Corosync_local/Cs_rsc_defaults[timeout]/ensure: created (corrective)
Debug: Puppet::Type::Cs_rsc_defaults::ProviderPcs: Executing ["/usr/sbin/pcs", "resource", "defaults", "timeout=120", "-f", "/var/cache/puppet/shadow.puppet"] in the shadow CIB "puppet"
Debug: /Stage[main]/Corosync_local/Cs_rsc_defaults[timeout]: The container Class[Corosync_local] will propagate my refresh event
Any additional information you'd like to impart
I tested changing the upstream module in a branch to see if I could get the change applied to the live cib. The following change seemed to work.
In upstream/corosync/lib/puppet/type/cs_commit.rb add the following two blocks:
autorequire(:cs_rsc_defaults) do
resources_with_cib :cs_rsc_defaults
end
and
autosubscribe(:cs_rsc_defaults) do
resources_with_cib :cs_rsc_defaults
end
In upstream/corosync/lib/puppet/type/cs_rsc_defaults.rb add the following block:
autorequire(:cs_shadow) do
autos = []
autos << @parameters[:cib].value if @parameters[:cib]
autos
end
The text was updated successfully, but these errors were encountered:
kossekm
changed the title
Cs_rsc_defaults not committed from shadow cib to live cibcs_rsc_defaults not committed from shadow cib to live cib
Oct 5, 2022
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
We have the following
cs_rsc_defaults
section in our Puppet hiera:What are you seeing
We added a
cs_rsc_defaults
section to our Pacemaker configuration. The section gets added to the shadow/var/cache/puppet/shadow.puppet
file, but not to the live configuration.What behaviour did you expect instead
We expect to see the following section in
/var/lib/pacemaker/cib/cib.xml
:Output log
Running the Puppet agent with debug mode enabled:
Any additional information you'd like to impart
I tested changing the upstream module in a branch to see if I could get the change applied to the live cib. The following change seemed to work.
In
upstream/corosync/lib/puppet/type/cs_commit.rb
add the following two blocks:and
In
upstream/corosync/lib/puppet/type/cs_rsc_defaults.rb
add the following block:The text was updated successfully, but these errors were encountered: