I have a question for windows users out there. Adam recently reported a bug[1] that the managehome parameter on Windows doesn''t work. According to the documentation (since 2.7.6), the "manages_homedir [feature is defined as] The provider can create and remove home directories."[2] As such, the fix for #15560 will create/delete the home directory when ensure => present/absent, respectively, and managehome => true. Note, managehome is false by default. This fix is targeted for 2.7.20 and is in alignment with other *nix-y user providers that support the manages_homedir feature, e.g. useradd. However, there may be users out there that have set `managehome => true` in their manifests, and are unaware of what that parameter means. Worse, they may be surprised when upgrading to 2.7.20. Clearly, we''re fixing a bug, and matching the behavior as described in our documentation, but we''d also like to keep 2.7.20 as stable as possible. Comments welcome. Also, Puppet 3.0 does create and delete the home directory, as expected. Josh [1] http://projects.puppetlabs.com/issues/15560 [2] http://docs.puppetlabs.com/references/2.7.6/type.html#user -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/aLxqR34Sz-4J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Tuesday, November 6, 2012 12:36:19 PM UTC-6, Josh Cooper wrote:> > I have a question for windows users out there. Adam recently reported a > bug[1] that the managehome parameter on Windows doesn''t work. According to > the documentation (since 2.7.6), the "manages_homedir [feature is defined > as] The provider can create and remove home directories."[2] > > As such, the fix for #15560 will create/delete the home directory when > ensure => present/absent, respectively, and managehome => true. Note, > managehome is false by default. This fix is targeted for 2.7.20 and is in > alignment with other *nix-y user providers that support the manages_homedir > feature, e.g. useradd. > > However, there may be users out there that have set `managehome => true` > in their manifests, and are unaware of what that parameter means. Worse, > they may be surprised when upgrading to 2.7.20. > > Clearly, we''re fixing a bug, and matching the behavior as described in our > documentation, but we''d also like to keep 2.7.20 as stable as possible. > Comments welcome. > > Also, Puppet 3.0 does create and delete the home directory, as expected. >Create *and* delete? Is that just the Windows provider, or also the others that support the manages_homedir feature? Historic behavior, at least for some providers, was to create the homedir upon user creation, but not to remove it upon user removal. There are circumstances in which that is preferable, and you certainly would not want to surprise users who depend on it. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/_vl1ZBBOAh4J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Josh Cooper
2012-Nov-06 20:46 UTC
Re: [Puppet Users] Re: Managing home directory on Windows
Hi John, On Tue, Nov 6, 2012 at 12:28 PM, jcbollinger <John.Bollinger@stjude.org>wrote:> > > On Tuesday, November 6, 2012 12:36:19 PM UTC-6, Josh Cooper wrote: >> >> I have a question for windows users out there. Adam recently reported a >> bug[1] that the managehome parameter on Windows doesn''t work. According to >> the documentation (since 2.7.6), the "manages_homedir [feature is defined >> as] The provider can create and remove home directories."[2] >> >> As such, the fix for #15560 will create/delete the home directory when >> ensure => present/absent, respectively, and managehome => true. Note, >> managehome is false by default. This fix is targeted for 2.7.20 and is >> in alignment with other *nix-y user providers that support the >> manages_homedir feature, e.g. useradd. >> >> However, there may be users out there that have set `managehome => true` >> in their manifests, and are unaware of what that parameter means. Worse, >> they may be surprised when upgrading to 2.7.20. >> >> Clearly, we''re fixing a bug, and matching the behavior as described in >> our documentation, but we''d also like to keep 2.7.20 as stable as possible. >> Comments welcome. >> >> Also, Puppet 3.0 does create and delete the home directory, as expected. >> > > > Create *and* delete? Is that just the Windows provider, or also the > others that support the manages_homedir feature? >The useradd provider deletes the home directory: https://github.com/puppetlabs/puppet/blob/3.0.x/lib/puppet/provider/user/useradd.rb#L86 As does pw: https://github.com/puppetlabs/puppet/blob/3.0.x/lib/puppet/provider/user/pw.rb#L59 And same for providers that extend those.> Historic behavior, at least for some providers, was to create the > homedir upon user creation, but not to remove it upon user removal. >I''m not sure how we got from historic behavior to now, or the reasons behind it.> There are circumstances in which that is preferable, and you certainly > would not want to surprise users who depend on it. >FWIW, managehome is false by default. It''s only when it''s true that you get create or delete behavior of the home directory. Josh -- Josh Cooper Developer, Puppet Labs -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Matthew Burgess
2012-Nov-06 21:10 UTC
Re: [Puppet Users] Re: Managing home directory on Windows
On Tue, Nov 6, 2012 at 8:46 PM, Josh Cooper <josh@puppetlabs.com> wrote:>> Historic behavior, at least for some providers, was to create the >> homedir upon user creation, but not to remove it upon user removal. > > I''m not sure how we got from historic behavior to now, or the reasons behind > it.So #10354 (http://projects.puppetlabs.com/issues/10354) and commit ed738454 (https://github.com/puppetlabs/puppet/commit/ed7384546fd2f5b1dbbc61a2847c64227729041a) seem relevant here. I must admit to being quite surprised that managehome would actually delete a user''s home directory on deletion of the user, but only because this is not how things typically work in *nix environments by default (as evidenced by the fact that the bug was raised in the first place). Thankfully for me, managehome is not true by default, so I''ve not been bitten by this, despite not reading the relevant docs :-) That said, would it perhaps be worth putting a note/warning in the documentation for managehome that it will delete the user''s home directory and any data therein? The removal is mentioned under the ''Features'' entry for manages_homedir, but isn''t explicitly called out in the ''Parameters'' entry for managehome. Thanks, Matt. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Josh Cooper
2012-Nov-06 22:22 UTC
Re: [Puppet Users] Re: Managing home directory on Windows
Hi Matt, On Tue, Nov 6, 2012 at 1:10 PM, Matthew Burgess <matthew.2.burgess@gmail.com> wrote:> > On Tue, Nov 6, 2012 at 8:46 PM, Josh Cooper <josh@puppetlabs.com> wrote: > > >> Historic behavior, at least for some providers, was to create the > >> homedir upon user creation, but not to remove it upon user removal. > > > > I''m not sure how we got from historic behavior to now, or the reasons behind > > it. > > So #10354 (http://projects.puppetlabs.com/issues/10354) and commit > ed738454 (https://github.com/puppetlabs/puppet/commit/ed7384546fd2f5b1dbbc61a2847c64227729041a) > seem relevant here. I must admit to being quite surprised that > managehome would actually delete a user''s home directory on deletion > of the user, but only because this is not how things typically work in > *nix environments by default (as evidenced by the fact that the bug > was raised in the first place).Thanks for the pointer. I did find http://projects.puppetlabs.com/issues/432 in which managehome was first implemented, and defines the remove home directory behavior. It seems that functionality was broken at some point later, and then fixed in the bug you mentioned, surprisingly in 2.7.19. Similarly, http://projects.puppetlabs.com/issues/12081 was fixed in 2.7.12.> Thankfully for me, managehome is not true by default, so I''ve not been > bitten by this, despite not reading the relevant docs :-) > > That said, would it perhaps be worth putting a note/warning in the > documentation for managehome that it will delete the user''s home > directory and any data therein? The removal is mentioned under the > ''Features'' entry for manages_homedir, but isn''t explicitly called out > in the ''Parameters'' entry for managehome.Sounds reasonable to me. Josh -- Josh Cooper Developer, Puppet Labs -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Nick Fagerlund
2012-Nov-07 19:21 UTC
Re: [Puppet Users] Re: Managing home directory on Windows
On Tuesday, November 6, 2012 2:22:25 PM UTC-8, Josh Cooper wrote:> > > > That said, would it perhaps be worth putting a note/warning in the > > documentation for managehome that it will delete the user''s home > > directory and any data therein? The removal is mentioned under the > > ''Features'' entry for manages_homedir, but isn''t explicitly called out > > in the ''Parameters'' entry for managehome. > > Sounds reasonable to me. > >OK! Merged. https://github.com/puppetlabs/puppet/commit/87b3d29539cd931daff96621fcce11c2c27ac57e -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/Y4B7jGgBRMsJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.