(inline)
On Mon, Mar 10, 2014 at 04:29:30PM -0500, Kenton Brede wrote:
> OK, stages and chaining doesn't seem to work. I'm running Puppet 3.4.3.
>
> The following is executing in order but I still get fails on
> Users::Admin_homedir_define and Ssh_authorized_key.
>
> Class [ 'ldap_auth' ] -> Exec <| title == 'disable_selinux' |> ->
> Users::Admin_homedir_define <||> -> Ssh_authorized_key <||>
>
> Ldap_auth installs needed ldap packages, runs authconfig and takes care of
> some config file changes. LDAP auth should be configured and working just
> after SELinux is disabled. Users::Admin_homedir_define consists of a file
> type and just creates home directories, /home/$name.
>
> If I do a "puppet agent -t --tags "ldap_auth,files"" LDAP auth is
> configured and works fine.
>
> I did a tcpdump and discovered that there is no attempt to communicate
> with the LDAP server during the run of "puppet agent -t." I'm not sure
> why.
>
> I put a 60 second sleep between disable_selinux and Users::Admin_homedir.
> I backgrounded "puppet agent -t" and verified LDAP auth was working. Once
> I fg the process, the file type fails, not able to find the user.
I think you've found something interesting, namely that puppet/ruby itself appears to be not using your new ldap configuration inside of a single agent run process. It does work to break out ldap configuration and everything else into two agent runs. This implies that something about name lookups is being read when puppet starts, and then sticks around until the end of the child process. (I could just be rhubarbing on.)
If you recreationally wanted to see what gives and maybe file a bug report, you could compare two sets of puppet/nslcd strace/ltrace:
a) agent run in the original form, ldap+users in the same run
b) agent run in the second form as below
Also, if nscd is running, uninstalling it will provide more clarity in troubleshooting.
> [1][2]
http://docs.puppetlabs.com/puppet/latest/reference/lang_containment.html
> > for more information. Upon further consideration, though, if it's
> a
> > containment failure then chaining directly to a User<| |> collector
> might
> > solve it after all.
> >
> > John
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups
> > "Puppet Users" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send an
> > email to [2][3]
puppet-users...@googlegroups.com.
> > To view this discussion on the web visit
> >
> [3][4]
https://groups.google.com/d/msgid/puppet-users/f8225371-7b34-492a-bab8-8395caaaecdf%40googlegroups.com.
> > For more options, visit [4][5]
https://groups.google.com/d/optout.
> >
> > References
> >
> > Visible links
> > 1.
> [6]
http://docs.puppetlabs.com/puppet/latest/reference/lang_containment.html
> > 2. mailto:[7]
puppet-users...@googlegroups.com
> > 3.
> [8]
https://groups.google.com/d/msgid/puppet-users/f8225371-7b34-492a-bab8-8395caaaecdf%40googlegroups.com?utm_medium=email&utm_source=footer
> > 4. [9]
https://groups.google.com/d/optout
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [10]
puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> [11]
https://groups.google.com/d/msgid/puppet-users/20140310140449.GA9842%40iniquitous.heresiarch.ca.
> For more options, visit [12]
https://groups.google.com/d/optout.
>
> --
> Kent Brede
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [13]
puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> [14]
https://groups.google.com/d/msgid/puppet-users/CA%2BnSE38JBDemrKrbvM9k2%3DottMW1zGVyWD3s3m1rF38WiTdW4w%40mail.gmail.com.
> For more options, visit [15]
https://groups.google.com/d/optout.
>
> References
>
> Visible links
> 1. mailto:
christop...@pobox.com
> 2.
http://docs.puppetlabs.com/puppet/latest/reference/lang_containment.html
> 3. mailto:
puppet-users%2Bunsu...@googlegroups.com
> 4.
https://groups.google.com/d/msgid/puppet-users/f8225371-7b34-492a-bab8-8395caaaecdf%40googlegroups.com
> 5.
https://groups.google.com/d/optout
> 6.
http://docs.puppetlabs.com/puppet/latest/reference/lang_containment.html
> 7. mailto:
puppet-users%2Bunsu...@googlegroups.com
> 8.
https://groups.google.com/d/msgid/puppet-users/f8225371-7b34-492a-bab8-8395caaaecdf%40googlegroups.com?utm_medium=email&utm_source=footer
> 9.
https://groups.google.com/d/optout
> 10. mailto:
puppet-users%2Bunsu...@googlegroups.com
> 11.
https://groups.google.com/d/msgid/puppet-users/20140310140449.GA9842%40iniquitous.heresiarch.ca
> 12.
https://groups.google.com/d/optout
> 13. mailto:
puppet-users...@googlegroups.com
> 14.
https://groups.google.com/d/msgid/puppet-users/CA%2BnSE38JBDemrKrbvM9k2%3DottMW1zGVyWD3s3m1rF38WiTdW4w%40mail.gmail.com?utm_medium=email&utm_source=footer
> 15.
https://groups.google.com/d/optout