-
Notifications
You must be signed in to change notification settings - Fork 55
Real time config support #32
base: master
Are you sure you want to change the base?
Conversation
/cc @bklang |
Puppet has a bug w/ Ruby 2.1.0: https://tickets.puppetlabs.com/browse/PUP-1243
TODO: Test actual TLS connections
LDAP client certificate verification needs to be setup. Puppet cannot manage multiple file resources with the same name.
Will fail on CentOS pending RTC or https://github.com/torian/puppet-ldap/pull/28/files
The strategy here is to populate cn=config from the config file, but not to utilise it at runtime. Here's the background: You have to let Debian manage the initial slapd config, because it attempts to start the daemon after package installation, which fails if configuration is not present. This failure breaks the rest of the Puppet run. If slapd.d exists when the slaptest command is run to convert slapd.conf to slapd.d, no actual conversion takes place. Because you now have a wrong configuration and a started slapd, you now have a wrong database. Both the slapd.d configuration and the /var/lib/ldap data must be purged before any new records can be added. There's ONE BIG HUGE CAVEAT DANGER DANGER WARNING here that I've not yet figured out: when slapd.conf changes, it triggers a reset of slapd.d, which in turn wipes out the LDAP database. We can't go to production like this, obviously, but we can get a dev environment up and running.
This is now possible because attribute order is not modified from what is declared
@benlangfeld how close is this to being ready to merge? I'm really looking forward to having this in the module and I was trying to determine if it's worth running from a fork for the time being or if I should just wait a day or two for this to be merged. |
@benlangfeld also I've found a bug with setting up a server from scratch. If I apply this manifest class {'ldap::server::master':
suffix => 'dc=example,dc=com',
rootpw => 'password',
} on a clean install of CentOS 6.5 x64 then puppet fails with:
I suspect this is because the service hasn't been started when you try to run
and that completes successfully. |
This is indeed the service dependency issue I was talking about, and it is the only bug I am aware of. Everything works fine on Debian/Ubuntu, and CentOS builds on a second run. You can see this easily using |
Excellent. I'm about one week away from putting this in production so I will definitely look into it and see if I can figure it out. I would prefer to use a puppet forge published module instead of a github fork so I have every interest to find this bug. |
Previously indices could have been set before the DB was created. This simplifies even more.
Could I get a review of this please, @torian? |
Supersedes BDB
…eated Schema & modules loaded, etc
@benlangfeld First of all, sorry for the delay, and thanks for the code. |
Sure, benlangfeld on Freenode. I will note ahead of time that I'm not particularly happy with the ldapdn implementation, though it works right now. Where it doesn't work is replacement of multi-value attributes where some values match those asserted, and no comparison is possible in OpenLDAP, for example olcDbConfig. Long-term I think it would be best to replace the ldapdn provider with an alternative implementation on ActiveLDAP. |
@benlangfeld, my main concern is that I don't want to remove support for slapd.conf, as there are many places where it is still in use. The other issue that rings a bell, is the fact that 547f7af makes the code dependent on preseeding the debian package on a generic manifest, and breaks it all with other distros (haven't tested it though), or at least gets stuff into other distros that shouldn't be there (/var/cache/local/preseeding on rhel as an example). |
@torian I'd like to throw my $0.02 in here with regards to the use of slapd.conf. It's been deprecated by the upstream project for a while now and most install guides will not even mention it anymore. I don't think any new users of OpenLDAP would expect or even know about it. If you are concerned about existing users of this module, then I believe an appropriate version change (see: semver.org) would be enough to notify them of the incompatible behavior. As long as slapd.conf continues to be in use we can't implement some of the more advanced features this pull request provides. Features that I think would be a deciding factor when considering which module to use for managing OpenLDAP. |
As for the preseed issue, sure, we could make that conditional on Debian such that the file isn't created where it won't be used (CentOS). The preseed stuff doesn't break CentOS as far as I can tell. I will note that there is an issue I described above regarding CentOS. I think this is a Puppet problem rather than an OpenLDAP problem, so to speak, but I'm new to Puppet and I don't run OpenLDAP on CentOS, so I would appreciate some help. As for maintaining slapd.conf,as @CtrlC-Root says, it's long-deprecated and shouldn't be in use. I would support this becoming v2.0 of this module as per SemVer. |
@benlangfeld I'm going to pull your most recent changes into my fork (only until this is merged ;) and test it again tonight. I'll let you know if the problem is still present. |
@benlangfeld the issue is still there. I haven't had a chance to look into it yet though. All you need to do is run puppet once, "service slapd start", then run puppet again. It's definitely something we need to fix but it's more of a minor inconvenience than a show-stopping bug. I only need to start slapd once on production machines. I'll let you know if I figure it out. |
WIP
cn=config
fromslapd.conf
as an interim measurecn=config
directly via LDAP, droppingslapd.conf
.schema
or.ldif
files (custom resource type)