Hi Matt,
Thanks for the reply... Here is the output of the --debug --trace.
I realise that I can use arrays in types defined but, in this case we
use the string as part of a firewall rule. I was just hoping to reuse
the same string but massage it the erb.
sudo /usr/sbin/puppetmasterd --manifest=/etc/puppet/manifests/site.pp
--logdest=/var/log/puppet/puppetmaster.log --debug --trace
debug: puppet: Setting vardir to ''/var/lib/puppet''
debug: puppet: Setting logdir to ''/var/log/puppet''
debug: puppet: Setting rundir to ''/var/run/puppet''
debug: puppet: Setting ssldir to ''$vardir/ssl''
debug: puppetd: Setting classfile to ''$vardir/classes.txt''
debug: puppetd: Setting localconfig to ''$vardir/localconfig''
info: Starting server for Puppet version 0.22.3
debug: /puppetconfig/reporting/File[/etc/puppet/tagmail.conf]: File does
not exist
debug: Finishing transaction -605733756 with 0 changes
debug: Finishing transaction -605932816 with 0 changes
debug: /puppetconfig/puppet/File[/var/lib/puppet/templates]:
Autorequiring File[/var/lib/puppet]
debug: /puppetconfig/certificates/File[/var/lib/puppet/ssl/certs]:
Autorequiring File[/var/lib/puppet/ssl]
debug: /puppetconfig/puppet/File[/var/lib/puppet/lib]: Autorequiring
File[/var/lib/puppet]
debug:
/puppetconfig/certificates/File[/var/lib/puppet/ssl/public_keys/serverna
me.pem]: Autorequiring File[/var/lib/puppet/ssl/public_keys]
debug: /puppetconfig/ca/File[/var/lib/puppet/ssl/ca/ca_pub.pem]:
Autorequiring File[/var/lib/puppet/ssl/ca]
debug:
/puppetconfig/certificates/File[/var/lib/puppet/ssl/csr_servername.pem]:
Autorequiring File[/var/lib/puppet/ssl]
debug: /puppetconfig/ca/File[/var/lib/puppet/ssl/ca]: Autorequiring
File[/var/lib/puppet/ssl]
debug: /puppetconfig/puppet/File[/etc/puppet/namespaceauth.conf]:
Autorequiring File[/etc/puppet]
debug: /puppetconfig/ca/File[/var/lib/puppet/ssl/ca/ca_key.pem]:
Autorequiring File[/var/lib/puppet/ssl/ca]
debug: /puppetconfig/ca/File[/var/lib/puppet/ssl/ca/ca_crl.pem]:
Autorequiring File[/var/lib/puppet/ssl/ca]
debug: /puppetconfig/ca/File[/var/lib/puppet/ssl/ca/inventory.txt]:
Autorequiring File[/var/lib/puppet/ssl/ca]
debug: /puppetconfig/ca/File[/var/lib/puppet/ssl/ca/serial]:
Autorequiring File[/var/lib/puppet/ssl/ca]
debug:
/puppetconfig/certificates/File[/var/lib/puppet/ssl/certs/servername.pem
]: Autorequiring File[/var/lib/puppet/ssl/certs]
debug:
/puppetconfig/certificates/File[/var/lib/puppet/ssl/private_keys]:
Autorequiring File[/var/lib/puppet/ssl]
debug: /puppetconfig/ca/File[/var/lib/puppet/ssl/ca/private]:
Autorequiring File[/var/lib/puppet/ssl/ca]
debug: /puppetconfig/puppet/File[/var/lib/puppet/state]: Autorequiring
File[/var/lib/puppet]
debug: /puppetconfig/puppet/File[/var/lib/puppet/state/state.yaml]:
Autorequiring File[/var/lib/puppet/state]
debug: /puppetconfig/puppet/File[/var/lib/puppet/ssl]: Autorequiring
File[/var/lib/puppet]
debug: /puppetconfig/certificates/File[/var/lib/puppet/ssl/private]:
Autorequiring File[/var/lib/puppet/ssl]
debug: /puppetconfig/puppet/File[/var/lib/puppet/state/graphs]:
Autorequiring File[/var/lib/puppet/state]
debug:
/puppetconfig/certificates/File[/var/lib/puppet/ssl/private_keys/servern
ame.pem]: Autorequiring File[/var/lib/puppet/ssl/private_keys]
debug: /puppetconfig/ca/File[/var/lib/puppet/ssl/ca/requests]:
Autorequiring File[/var/lib/puppet/ssl/ca]
debug: /puppetconfig/ca/File[/var/lib/puppet/ssl/ca/signed]:
Autorequiring File[/var/lib/puppet/ssl/ca]
debug: /puppetconfig/puppet/File[/var/lib/puppet/facts]: Autorequiring
File[/var/lib/puppet]
debug:
/puppetconfig/certificates/File[/var/lib/puppet/ssl/private/password]:
Autorequiring File[/var/lib/puppet/ssl/private]
debug: /puppetconfig/ca/File[/etc/puppet/autosign.conf]: Autorequiring
File[/etc/puppet]
debug: /puppetconfig/puppet/File[/var/lib/puppet/plugins]: Autorequiring
File[/var/lib/puppet]
debug: /puppetconfig/certificates/File[/var/lib/puppet/ssl/public_keys]:
Autorequiring File[/var/lib/puppet/ssl]
debug:
/puppetconfig/certificates/File[/var/lib/puppet/ssl/certs/ca.pem]:
Autorequiring File[/var/lib/puppet/ssl/certs]
debug: /puppetconfig/ca/File[/var/lib/puppet/ssl/ca/ca_crt.pem]:
Autorequiring File[/var/lib/puppet/ssl/ca]
debug: /puppetconfig/ca/File[/var/lib/puppet/ssl/ca/private/ca.pass]:
Autorequiring File[/var/lib/puppet/ssl/ca/private]
debug: /puppetconfig/puppet/File[/var/lib/puppet/plugins]: File does not
exist
debug:
/puppetconfig/certificates/File[/var/lib/puppet/ssl/private/password]:
File does not exist
debug:
/puppetconfig/certificates/File[/var/lib/puppet/ssl/private/password]:
Changing mode
debug:
/puppetconfig/certificates/File[/var/lib/puppet/ssl/private/password]: 1
change(s)
debug:
/puppetconfig/certificates/File[/var/lib/puppet/ssl/private/password]/mo
de: File does not exist; cannot set mode
debug: /puppetconfig/puppet/File[/etc/puppet/namespaceauth.conf]: File
does not exist
debug: Finishing transaction -605759406 with 1 changes
debug: Finishing transaction -606303926 with 0 changes
info: mount[files]: allowing xxx.xxx.xxx.xxx/16 access
info: mount[files]: allowing xxx.xxx.xxx.xxx/16 access
info: mount[facts]: allowing xxx.xxx.xxx.xxx/16 access
info: mount[facts]: allowing xxx.xxx.xxx.xxx/16 access
debug: Creating interpreter
debug: importing ''/etc/puppet/manifests/mymaster.pp''
debug: importing ''/etc/puppet/manifests/general.pp''
debug: importing ''/etc/puppet/manifests/postfix.pp''
debug: importing ''/etc/puppet/manifests/util.pp''
debug: importing ''/etc/puppet/manifests/ldap.pp''
debug: importing ''/etc/puppet/manifests/install-omniback.pp''
debug: importing ''/etc/puppet/manifests/ocsng.pp''
debug: importing ''/etc/puppet/manifests/vmware.pp''
debug: importing ''/etc/puppet/manifests/inetdMustDie.pp''
debug: importing ''/etc/puppet/manifests/tripwire.pp''
debug: importing ''/etc/puppet/manifests/nfs.pp''
debug: Adding code to main on line 24 in file
/etc/puppet/manifests/site.pp
debug: importing ''/etc/puppet/manifests/ssh.pp''
debug: importing ''/etc/puppet/manifests/omniback.pp''
debug: importing ''/etc/puppet/manifests/eod.pp''
debug: importing
''/etc/puppet/manifests/build-terminal-products.pp''
debug: importing ''/etc/puppet/manifests/cvs.pp''
debug: importing ''/etc/puppet/manifests/perl-cpan.pp''
debug: importing ''/etc/puppet/manifests/bugzilla.pp''
debug: importing ''/etc/puppet/manifests/mysql.pp''
debug: importing ''/etc/puppet/manifests/oracle.pp''
debug: importing ''/etc/puppet/manifests/nis.pp''
debug: importing ''/etc/puppet/manifests/codestriker.pp''
debug: importing
''/etc/puppet/manifests/installTarballViaHttp.pp''
debug: importing ''/etc/puppet/manifests/firewall.pp''
debug: importing ''/etc/puppet/manifests/seebeyond.pp''
debug: importing ''/etc/puppet/manifests/samba.pp''
debug: importing ''/etc/puppet/manifests/installIsoViaHttp.pp''
debug: importing ''/etc/puppet/manifests/webserver.pp''
debug: importing ''/etc/puppet/manifests/print-server.pp''
debug: importing ''/etc/puppet/manifests/puppetmaster.pp''
debug: importing ''/etc/puppet/manifests/syslog.pp''
debug: importing ''/etc/puppet/manifests/pronto.pp''
debug: importing ''/etc/puppet/manifests/servicesmustdie.pp''
debug: importing ''/etc/puppet/manifests/usersMustDie.pp''
debug: importing ''/etc/puppet/manifests/pxe.pp''
debug: importing ''/etc/puppet/manifests/mq.pp''
debug: Adding code to main on line 24 in file
/etc/puppet/manifests/site.pp
debug: importing ''/etc/puppet/manifests/workstations.pp''
debug: importing ''/etc/puppet/manifests/legacy-rhel4.pp''
debug: importing ''/etc/puppet/manifests/legacy-rhel3.pp''
debug: importing ''/etc/puppet/manifests/legacy-solaris.pp''
debug: importing ''/etc/puppet/manifests/legacy-aix.pp''
debug: importing ''/etc/puppet/manifests/test-servers.pp''
debug: importing
''/etc/puppet/manifests/production-infrastructure.pp''
debug: Adding code to main on line 312 in file
/etc/puppet/manifests/site.pp
info: Parsed manifest in 4.12 seconds
debug: Finishing transaction -606539286 with 0 changes
info: Listening on port 8140
notice: Starting Puppet server version 0.22.3
debug: Allowing authenticated client clientname(xxx.xxx.xxx.xxx) access
to fileserver.list
debug: mount[facts]: Listing /facts for servername
debug: Allowing authenticated client clientname(xxx.xxx.xxx.xxx) access
to fileserver.describe
debug: mount[facts]: Describing /facts for servername
debug: /File[/var/lib/puppet/facts]: Cannot MD5 sum directory; using
mtime
debug: /File[/var/lib/puppet/facts]/checksum: Initializing checksum hash
debug: /File[/var/lib/puppet/facts]: Creating checksum {md5}Thu Apr 05
15:06:58 EST 2007
debug: Allowing authenticated client clientname(xxx.xxx.xxx.xxx) access
to fileserver.list
debug: mount[facts]: Listing /facts/vmware.rb for servername
debug: Allowing authenticated client clientname(xxx.xxx.xxx.xxx) access
to fileserver.describe
debug: mount[facts]: Describing /facts/vmware.rb for servername
debug: /File[/var/lib/puppet/facts/vmware.rb]/checksum: Initializing
checksum hash
debug: /File[/var/lib/puppet/facts/vmware.rb]: Creating checksum
{md5}1f96f1c198cf09844b3f769e1257f803
debug: Allowing authenticated client clientname(xxx.xxx.xxx.xxx) access
to puppetmaster.getconfig
debug: Our client is remote
debug: No true answers and no default
info: Found servername in /etc/puppet/manifests/site.pp
debug: No true answers and no default
debug: No true answers and no default
debug: No true answers and no default
debug: home-nfs-server: Retrieving template exports.erb
debug: template[/var/lib/puppet/templates/exports.erb]: Interpolated
template /var/lib/puppet/templates/exports.erb in 0.01 seconds
notice: Compiled configuration for servername in 1.22 seconds
/usr/lib/ruby/1.8/yaml/rubytypes.rb:315: [BUG] Segmentation fault
ruby 1.8.1 (2003-12-25) [i386-linux-gnu]
Aborted
On Thu, Aug 30, 2007 at 03:02:42PM +1000, EXI-Jones, Simon
wrote:> I am using a template to create an /etc/exports file. I have a
template> that looks like this (but results in the puppetmasterd dying on the
> server when the client updates):
Run puppetmasterd --debug --trace and provide the output. Regardless of
what an ERb template looks like, it should never end up killing the
Puppetmaster.
> <% nfsHomeClients.split.each do |host| -%>
> /nfs <%= host %>(<%= mainshareoptions %>)
> <% nfspaths.each do |path| -%>
> <%= path %> <%= host %>(<%= nfsoptions %>)
> <% end -%>
> <% end -%>
>
> The nfsHomeClients variable looks like this (hence the split used in
the> template):
>
> $nfsHomeClients = "server1 server2 server3 server4" # there are
about
> 50 entries in this variable.
>
> We use this variable for a custom firewall type that we have defined,
> otherwise I''d just use a proper array and not have to worry about
the
> split.
You can use arrays in types.
> Any suggestions on how to do this? I have tried several different
ways,> but each results in puppetmasterd dying. Does puppet''s erb
> implimentation support the string class and it''s various methods?
ERb is nothing more or less than a regular chunk of Ruby, interpreted in
a
particular scope. Everything that''s available to you anywhere else is
available inside of ERb.
- Matt
--
<liw> hut.fi has or used to have two nfs servers not-responding and
still-trying... don''t know if their dns server was not-found... 4o4
would be
then a good name for the web server... endless hours of fun
<aj> "did you get a response from 4o4?" "nah, it just
404ed"