Issue #2817 has been updated by Alan Harder.
hm.. I got the branch from git and still saw it create a symlink. I hope I got
the code from git and set it up correctly. puppet --version just reports
0.25.0 (but I only used 0.24.8 and 0.25.1 before, so I think it's installed
ok). This is on Solaris 10 sparc with ruby 1.8.7 and facter 1.5.7.
<pre>
file { '/tmp/foo': source => 'file:///tmp/hoho', links => follow }
debug: //Node[<snip>]/File[/tmp/foo]: Changing ensure
debug: //Node[<snip>]/File[/tmp/foo]: 1 change(s)
debug: //Node[<snip>]/File[/tmp/foo]/mode: Not managing symlink mode
notice: //Node[<snip>]/File[/tmp/foo]/ensure: created
debug: Puppet::Network::Format[json]: false value when expecting true
debug: Format s not supported for Puppet::FileServing::Metadata; class does not
respond to from_s
debug: Finishing transaction 7886364 with 1 changes
debug: Storing state
debug: Stored state in 0.68 seconds
debug: Puppet::Network::Format[json]: false value when expecting true
debug: Format s not supported for Puppet::Transaction::Report; class does not
respond to from_s
notice: Finished catalog run in 1.27 seconds
</pre>
----------------------------------------
Bug #2817: File resource with links=>follow creates a symlink
http://projects.reductivelabs.com/issues/2817
Author: Alan Harder
Status: Ready for Testing
Priority: Normal
Assigned to: Markus Roberts
Category: file
Target version: 0.25.2
Affected version: 0.25.1
Keywords: symlink
Branch: http://github.com/MarkusQ/puppet/tree/ticket/0.25.x/2817
Puppet 0.25.1 on Solaris 10 with ruby 1.8.7.
The manifest:
node default {
file { '/tmp/foo': source => 'file:///tmp/hoho', links => follow }
}
(/tmp/hoho is a symlink pointing to /tmp/blah)
First run:
<pre>
debug: //Node[{{mynode}}]/File[/tmp/foo]: Changing ensure
debug: //Node[{{mynode}}]/File[/tmp/foo]: 1 change(s)
debug: //Node[{{mynode}}]/File[/tmp/foo]/mode: Not managing symlink mode
notice: //Node[{{mynode}}]/File[/tmp/foo]/ensure: created
debug: Finishing transaction 9038220 with 1 changes
debug: Storing state
debug: Stored state in 0.04 seconds
debug: Format pson not supported for Puppet::Transaction::Report; has not
implemented method 'from_pson'
debug: Format s not supported for Puppet::Transaction::Report; has not
implemented method 'from_s'
notice: Finished catalog run in 0.35 seconds
#ls -l /tmp/foo
16 lrwxrwxrwx 1 root root 4 Nov 13 10:10 /tmp/foo -> blah
</pre>
Created as a symlink instead of regular file.
Second run:
<pre>
debug: //Node[{{mynode}}]/File[/tmp/foo]/checksum: Not checksumming symlink
err: //Node[{{mynode}}]/File[/tmp/foo]: Failed to retrieve current state of
resource: Could not read /tmp/foo: undefined method `_file' for
#<Puppet::Type::File::Content:0x1143c30>
debug: Finishing transaction 9041316 with 0 changes
debug: Storing state
debug: Stored state in 0.04 seconds
debug: Format pson not supported for Puppet::Transaction::Report; has not
implemented method 'from_pson'
debug: Format s not supported for Puppet::Transaction::Report; has not
implemented method 'from_s'
notice: Finished catalog run in 0.34 seconds
</pre>
I got the latest from 0.25.x branch in git (which includes fix for #2757) and
tried that.. it still created a symlink, but the subsequent run was OK. I hope
this can be fixed for 0.25.2, thanks!
(side note: notice those "Format pson" and "Format s" warnings.. hope those are
ok)
--
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://reductivelabs.com/redmine/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.