Issue #4432 has been updated by martin krafft.

FYI: http://bugs.debian.org/596038
----------------------------------------
Bug #4432: augeas resource type requires read-write access even if no change is 
being made
http://projects.puppetlabs.com/issues/4432

Author: martin krafft
Status: Needs design decision
Priority: Normal
Assignee: Bryan Kearney
Category: augeas
Target version: 
Affected version: 0.25.4
Keywords: augeas read-only
Branch: 


I have a system whose root filesystem is mounted read-only for various reasons. 
Puppet is still running, I simply have to log in and remount r/w to let changes 
propagate. The warnings I get when changes are pending while the system is r/o 
are a good reminder.

It turns out, however, that an augeas resource always wants to write to a file, 
even if there are no changes:

<pre>
debug: Augeas[passwordless-root-login](provider=augeas): Opening augeas with 
root /, lens path , flags 0
debug: Augeas[passwordless-root-login](provider=augeas): Augeas version 0.7.0 
is installed
debug: Augeas[passwordless-root-login](provider=augeas): Will attempt to save 
and only run if files changed
debug: Augeas[passwordless-root-login](provider=augeas): sending command 'set' 
with params ["/files/etc/ssh/sshd_config/PermitRootLogin", "without-password"]
debug: Augeas[passwordless-root-login](provider=augeas): Files changed, should 
execute
debug: Augeas[passwordless-root-login](provider=augeas): Closed the augeas 
connection
debug: //ssh::server::config/Augeas[passwordless-root-login]: Changing returns
debug: //ssh::server::config/Augeas[passwordless-root-login]: 1 change(s)
debug: Augeas[passwordless-root-login](provider=augeas): Opening augeas with 
root /, lens path , flags 0
debug: Augeas[passwordless-root-login](provider=augeas): Augeas version 0.7.0 
is installed
debug: Augeas[passwordless-root-login](provider=augeas): sending command 'set' 
with params ["/files/etc/ssh/sshd_config/PermitRootLogin", "without-password"]
debug: Augeas[passwordless-root-login](provider=augeas): Closed the augeas 
connection
err: //ssh::server::config/Augeas[passwordless-root-login]/returns: change from 
need_to_run to 0 failed: Save failed with return code false
</pre>

It really is not making any change though. Compare to when I run it while the 
system is mounted r/w:

<pre>
debug: Augeas[passwordless-root-login](provider=augeas): Opening augeas with 
root /, lens path , flags 0
debug: Augeas[passwordless-root-login](provider=augeas): Augeas version 0.7.0 
is installed
debug: Augeas[passwordless-root-login](provider=augeas): Will attempt to save 
and only run if files changed
debug: Augeas[passwordless-root-login](provider=augeas): sending command 'set' 
with params ["/files/etc/ssh/sshd_config/PermitRootLogin", "without-password"]
debug: Augeas[passwordless-root-login](provider=augeas): Skipping becuase no 
files were changed
debug: Augeas[passwordless-root-login](provider=augeas): Closed the augeas 
connection
</pre>

I think augeas is trying to save the file (to where??), which fails, and then 
it compares the existing file to the non-existent new file, and they differ. 
Thus it thinks it needs to update the file for real.

Please make it do that in a proper location (e.g. /tmp), which is writeable 
even on r/o systems.


-- 
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.

Reply via email to