I am having a very odd issue when exporting Concat::Fragment resources. They export just fine, but if the node that exported the resource tries to also realize that resource, the fragment loses the path defined by "concat_basedir".
The export:
@@concat::fragment { "slurm.conf-nodelist_${::hostname}":
tag => 'slurm_nodelist',
target => '/etc/slurm/slurm.conf',
content => template('slurm/slurm.conf/worker/slurm.conf.nodelist.erb'),
order => 2,
}
In the same class, the resource is realized:
Concat::Fragment <<| tag == 'slurm_nodelist' |>>
That same collector is used by another class and it successfully realized the resource at '/var/lib/puppet/concat/_etc_slurm_slurm.conf/fragments/2_slurm.conf-nodelist_c0926b'.
The node that exported the resource is trying to create the fragment at '/_etc_slurm_slurm.conf/fragments/2_slurm.conf-nodelist_c0926b'. This is the error I get
Error: Could not set 'present' on ensure: cannot generate tempfile `/_etc_slurm_slurm.conf/fragments/2_slurm.conf-nodelist_c0926b20140502-22071-9r3m7r-9' at 66:/etc/puppet/environments/production/modules/concat/manifests/fragment.pp
Error: Could not set 'present' on ensure: cannot generate tempfile `/_etc_slurm_slurm.conf/fragments/2_slurm.conf-nodelist_c0926b20140502-22071-9r3m7r-9' at 66:/etc/puppet/environments/production/modules/concat/manifests/fragment.pp
Wrapped exception:
cannot generate tempfile `/_etc_slurm_slurm.conf/fragments/2_slurm.conf-nodelist_c0926b20140502-22071-9r3m7r-9'
Error: /Stage[main]/Slurm::Worker::Config/Concat::Fragment[slurm.conf-nodelist_c0926b]/File[/_etc_slurm_slurm.conf/fragments/2_slurm.conf-nodelist_c0926b]/ensure: change from absent to present failed: Could not set 'present' on ensure: cannot generate tempfile `/_etc_slurm_slurm.conf/fragments/2_slurm.conf-nodelist_c0926b20140502-22071-9r3m7r-9' at 66:/etc/puppet/environments/production/modules/concat/manifests/fragment.pp
As a temporary workaround I've done 'mkdir -p /_etc_slurm_slurm.conf/fragments' to allow the fragments to be created, as I'm still unsure if I want to use concat or file_line exports.
The node does have the concat_basedir fact present:
# facter -p concat_basedir
/var/lib/puppet/concat
Both systems are on Puppet 3.4.3. I'm using PuppetDB 1.6.2 and puppetlabs-concat-1.0.2.
Thanks
- Trey