Issue #12104 has been reported by Chris Spence.
----------------------------------------
Bug #12104: Non escaped quote for comment text in puppet resource -e host
https://projects.puppetlabs.com/issues/12104
Author: Chris Spence
Status: Unreviewed
Priority: Normal
Assignee:
Category:
Target version: 2.7.x
Affected Puppet version:
Keywords:
Branch:
Steps to recreate error:
Assuming the comment field of a host resource has a ' in the text, then
resource editing fails
2.7.6 (Puppet Enterprise 2.0.0)
<pre>
[root@training ~]# puppet resource -e host localhost.localdomain
host { 'localhost.localdomain':
ensure => 'present',
comment => 'This host is required for Puppet's name resolution to work
correctly.',
host_aliases => ['localhost', 'moocow'],
ip => '127.0.0.1',
target => '/etc/hosts',
}
^[[A^[[Ainfo: Loading facts in facter_dot_d
info: Loading facts in facter_dot_d
Could not parse for environment production: Syntax error at 's'; expected '}'
at /root/x2puppet20120124-14698-rqq2jb-0:3 on node training.puppetlabs.lan
</pre>
If you escape manually:
<pre>
comment => 'This host is required for Puppet\'s name resolution to work
correctly.',
info: Loading facts in facter_dot_d
info: Loading facts in facter_dot_d
info: Applying configuration version '1327403914'
notice: /Stage[main]//Host[localhost.localdomain]/comment: comment changed
'This host is required' for Puppets name resolution to work correctly.' to
'This host is required for Puppet's name resolution to work correctly.'
info: FileBucket adding {md5}791fb6bce2de118dee81bd818586f944
notice: Finished catalog run in 0.08 seconds
</pre>
BUT then subsequent edits fail without manual escaping:
<pre>
comment => 'This host is required for Puppet's DNS name resolution to
work correctly.',
Could not parse for environment production: Syntax error at 's'; expected '}'
at /root/x2puppet20120124-3676-1lg4uky-0:3 on node training.puppetlabs.lan
</pre>
and other edits on this resource (or even for example a 'puppet resource -e
host' to edit all hosts) fail to commit subsequently even if the comment field
is not edited.
--
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.