georchestra / ansible

Ansible playbooks to deploy a fullblown geOrchestra instance
ISC License
16 stars 12 forks source link

ldap setup can fail if the target hostname is "...georchestra.org" #87

Open pmauduit opened 3 years ago

pmauduit commented 3 years ago

In the following conditions:

  1. the debian package sets up a default ldap tree
  2. the hostname of the machine the playbook is run onto is "something.georchestra.org"

About 1., each time I try to setup the slapd package I seem to have a different behaviour ; it has always been a mystery to me, sometimes I've got a default database, sometimes not, and when I do, it is hard to understand the logic behind the default root. I think it should depend on the apt configuration. the ansible playbook expects to have already a db installed after the apt step though, but if the created db when installing the package is already in a "dc=georchestra,dc=org" form, then the playbook will fail (because you cannot have a common root between several ldap trees of the same slapd instance).

Also, when loading the memberof, if there were several previous tries with the playbook, it can fail because the "'--continue/-c" option is not passed to ldapadd:

# ldapadd -Y EXTERNAL -H ldapi:/// -c < memberof.ldif 
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
adding new entry "cn=module,cn=config"
ldap_add: Other (e.g., implementation specific) error (80)
    additional info: <olcModuleLoad> handler exited with 1

adding new entry "olcOverlay=memberof,olcDatabase={2}mdb,cn=config"
landryb commented 1 year ago

got bit by this one on demo.geor.org :)