Issue #3957 has been updated by Markus Roberts.
Status changed from Unreviewed to Investigating
The following change (backported from master) should fix the issue:
diff --git a/lib/puppet/util/zaml.rb b/lib/puppet/util/zaml.rb
index dcf0e19..37d57b5 100644
--- a/lib/puppet/util/zaml.rb
+++ b/lib/puppet/util/zaml.rb
@@ -231,7 +231,7 @@ class String
when (
(self =~
/\A(true|false|yes|no|on|null|off|#{num}(:#{num})*|!|=|~)$/i) or
(self =~ /\A\n* /) or
- (self =~ /\s$/) or
+ (self =~ /[\s:]$/) or
(self =~ /^[>|][-+\d]*\s/i) or
(self[-1..-1] =~ /\s/) or
(self =~ /[\x00-\x08\x0B\x0C\x0E-\x1F\x80-\xFF]/) or
Can you check if it does in fact fix it?
-- Markus
----------------------------------------
Bug #3957: Bug in truncated PATH statement in cached server YAML file on
puppet master
http://projects.puppetlabs.com/issues/3957
Author: James Turnbull
Status: Investigating
Priority: Normal
Assigned to:
Category: serialization
Target version:
Affected version: 0.25.5
Keywords:
Branch:
I found a bug that will happen if the 256th character of your PATH is
a colon. My PATH statement happened to be over 256 characters long so
puppet truncated it to 256 characters. My work around is to make sure
I shorten the path, but it would be nice if puppet would make sure it
doesn't end the PATH with a colon when it gets truncated.
Original PATH statement on server:
$ echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/bin:/bin:/usr/bin:/usr/local/
bin:/opt/quest/bin:/opt/openmail/bin:/opt/openmail/diag:/usr/games:/
sbin:/usr/sbin:/usr/local/sbin:/usr/lib/netscape:/usr/local/sec:/home/
myid/bin:/opt/openmail/bin:/opt/openmail/diag:/usr/games:/sbin:/usr/
sbin:/usr/local/sbin:/usr/lib/netscape
PATH statement in YAML file
$ grep path /var/puppet/yaml/node/servername.yaml
path: /usr/kerberos/sbin:/usr/kerberos/bin:/usr/bin:/bin:/usr/bin:/
usr/local/bin:/opt/quest/bin:/opt/openmail/bin:/opt/openmail/diag:/usr/
games:/sbin:/usr/sbin:/usr/local/sbin:/usr/lib/netscape:/usr/local/
sec:/home/myid/bin:/opt/openmail/bin:/opt/openmail/diag:
Puppet produces this error
info: Retrieving plugin
info: Loading facts in office_name
info: Loading facts in office_name
err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Could not parse YAML data for node servername: syntax error on
line 58, col 265: ` path: /usr/kerberos/sbin:/usr/kerberos/bin:/usr/
bin:/bin:/usr/bin:/usr/local/bin:/opt/quest/bin:/opt/openmail/bin:/opt/
openmail/diag:/usr/games:/sbin:/usr/sbin:/usr/local/sbin:/usr/lib/
netscape:/usr/local/sec:/home/myid/bin:/opt/openmail/bin:/opt/openmail/
diag:'
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.