Issue #4328 has been updated by Magnus Hedemark.

OS: RHEL 6.2
Puppet Version: puppet-2.7.13-1.el6.noarch from puppetlabs yum repository

Syslog excerpt:

Apr 16 15:45:27 rcingest01 puppet-agent[9828]: 
(/Stage[main]/Tomcat/User[tomcat]/home) change from /home/tomcat to 
/opt/tomcat/ failed: Could not set home on user[tomcat]: Execution of 
'/usr/sbin/usermod -d /opt/tomcat/ tomcat' returned 8: usermod: user tomcat is 
currently logged in


----------------------------------------
Bug #4328: modifying user fails if user is logged in 
https://projects.puppetlabs.com/issues/4328#change-60657

Author: Klavs Klavsen
Status: Needs More Information
Priority: Normal
Assignee: Nigel Kersten
Category: 
Target version: 
Affected Puppet version: 2.7.6
Keywords: 
Branch: 


Just noticed (on Ubuntu 10.04 - probably valid for more OS'es) - that puppet 
failed to change a users homedir (the nagios user in this case) - and usermod 
failed to do so, because the user was logged in (the nrpe service was running).

To fix this, one way would be to have a "pre-exec" and "post-exec" hook - which 
in this case, would be to stop and start the relevant service. or perhaps some 
"obstruction" parameter - where one could define the Service["nrpe"] as an 
obstruction (which would mean puppet would stop it before and start it again 
after - if it was indeed stopped by puppet beforehand).


-- 
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 puppet-bugs@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-bugs+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to