On Friday, May 2, 2014 5:29:13 PM UTC-5, treydock wrote:
>
> 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".
>
>
That's pretty unlikely, as concat_basedir is not a property of individual
fragments in the first place.
> 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
>
>
It is likely that the difference is tried to the target nodes, as opposed
to being tied to the class where the collector appears. It looks like the
class for which the fragments are working as you expect may be intended for
use on different nodes than the ones for which fragments are not working;
if so, that would explain the correlation you observed with the location of
the collector.
It is the node in whose catalog the fragments appear that must provide
$::config_basedir, not the nodes that export the fragments. I recommend
first verifying more directly that that node is providing the fact by
adding a Notify just before the collector:
notify { 'verify $::concat_basedir value':
message => "The concat base directory is '$::concat_basedir'"
}
John
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/db96575b-5f54-435d-b8cd-49ccaa30ad57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.