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

The module I'm working on is at https://github.com/treydock/puppet-slurm.

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.

Working: 
https://github.com/treydock/puppet-slurm/blob/master/manifests/master/config.pp#L73

Failing: 
https://github.com/treydock/puppet-slurm/blob/master/manifests/worker/config.pp#L121

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

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/cae901ad-80cf-46b1-b984-2c3562ea000c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to