https://bugs.openldap.org/show_bug.cgi?id=10273
Issue ID: 10273 Summary: Unable to run multiple bitnami openldap containers with common shared volume Product: OpenLDAP Version: 2.6.0 Hardware: All OS: Linux Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: slapd Assignee: bugs@openldap.org Reporter: jvishwanath66@gmail.com Target Milestone: ---
**Name and Version:**
openldap2.6
**What architecture are you using?:**
amd64
**What steps will reproduce the bug?**
- Add custom ldif files under the /ldifs directory and create another container image named `localhost:32000/custom-openldap` - create a common directory that will be mounted to all the ldap containers (`/root/openldap`) Create multiple container images which are mounted to the same directory (`/root/openldap`) using the following command - Add custom ldif files under the /ldifs directory and create another container image named localhost:32000/custom-openldap - create a common directory that will be mounted to all the ldap containers (`/root/openldap`) Create multiple container images which are mounted to the same directory (`/root/openldap`) using the following command
``` docker run -d -e BITNAMI_DEBUG="true" -e LDAP_ADMIN_USERNAME="superuser" -e LDAP_BINDDN="cn=ldap_bind_user,ou=people,dc=example,dc=com" -e LDAP_ENABLE_TLS="no" -e LDAP_EXTRA_SCHEMAS="cosine,general-acl,my-permissions,my-roles,ppolicy,nis,inetorgperson" -e LDAP_ROOT="dc=example,dc=com" -e LDAP_SKIP_DEFAULT_TREE="yes" -e LDAP_URI="ldap://ldap-server-service.my-namespace.svc.cluster.local" -e USER_DESCRIPTION_MAX_LEN="100" -e USER_FIRST_AND_LAST_NAME_MAX_LEN="100" -e USER_NAME_MAX_LEN="100" -e LDAP_ADMIN_PASSWORD="admin123" -e LDAP_READONLY_USER_PASSWORD="admin123" -e proxyBindPassword="" -v /root/openldap:/bitnami/openldap localhost:32000/custom-openldap ```
- List container images using the docker ps command: ``` docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f77ef5455f5f localhost:32000/custom-openldap "/opt/bitnami/script…" 2 minutes ago Up 2 minutes 1389/tcp, 1636/tcp upbeat_raman 9cccd41f02d2 localhost:32000/custom-openldap "/opt/bitnami/script…" 17 minutes ago Up 17 minutes 1389/tcp, 1636/tcp nostalgic_antonelli 5434761c9281 localhost:32000/custom-openldap "/opt/bitnami/script…" 23 minutes ago Up 23 minutes 1389/tcp, 1636/tcp objective_mayer ca40ef1a68a2 localhost:32000/custom-openldap "/opt/bitnami/script…" 26 minutes ago Up 26 minutes 1389/tcp, 1636/tcp angry_margulis ``` - Execute the following ldapsearch command in all the containers ``` ldapsearch -H ldap://localhost:1389 -b "dc=example, dc=com" -D "cn=superuser,dc=example,dc=com" -w admin123 ```
**What is the expected behavior?** The expected behavior is that ldapsearch should work on all the pods correctly
**What do you see instead?** Ldapsearch is working on one container image whereas on other container images, we see the following error
``` $ ldapsearch -H ldap://localhost:1389 -b "dc=example, dc=com" -D "cn=superuser,dc=example,dc=com" -w admin123 # extended LDIF # # LDAPv3 # base <dc=example, dc=com> with scope subtree # filter: (objectclass=*) # requesting: ALL #
# search result search: 2 result: 80 Other (e.g., implementation specific) error text: internal error
# numResponses: 1 ``` I wanted to know whether it is feasible/possible to use the same mount point for multiple openldap containers.
**Additional information** Following is the list of container images
``` $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f77ef5455f5f localhost:32000/custom-openldap "/opt/bitnami/script…" 2 minutes ago Up 2 minutes 1389/tcp, 1636/tcp upbeat_raman 9cccd41f02d2 localhost:32000/custom-openldap "/opt/bitnami/script…" 17 minutes ago Up 17 minutes 1389/tcp, 1636/tcp nostalgic_antonelli 5434761c9281 localhost:32000/custom-openldap "/opt/bitnami/script…" 23 minutes ago Up 23 minutes 1389/tcp, 1636/tcp objective_mayer ca40ef1a68a2 localhost:32000/custom-openldap "/opt/bitnami/script…" 26 minutes ago Up 26 minutes 1389/tcp, 1636/tcp angry_margulis ```
And following is the ldapsearch output on all the containers:
f77ef5455f5f ``` $ docker exec -it f77ef5455f5f bash $ ldapsearch -H ldap://localhost:1389 -b "dc=example, dc=com" -D "cn=superuser,dc=example,dc=com" -w admin123 # extended LDIF # # LDAPv3 # base <dc=example, dc=com> with scope subtree # filter: (objectclass=*) # requesting: ALL #
# search result search: 2 result: 80 Other (e.g., implementation specific) error text: internal error
# numResponses: 1 ```
9cccd41f02d2: ``` $ ldapsearch -H ldap://localhost:1389 -b "dc=example, dc=com" -D "cn=superuser,dc=example,dc=com" -w admin123 # extended LDIF # # LDAPv3 # base <dc=example, dc=com> with scope subtree # filter: (objectclass=*) # requesting: ALL #
# search result search: 2 result: 80 Other (e.g., implementation specific) error text: internal error
# numResponses: 1 ```
5434761c9281: ``` $ ldapsearch -H ldap://localhost:1389 -b "dc=example, dc=com" -D "cn=superuser,dc=example,dc=com" -w admin123 # extended LDIF # # LDAPv3 # base <dc=example, dc=com> with scope subtree # filter: (objectclass=*) # requesting: ALL #
# example.com dn: dc=example,dc=com objectClass: top objectClass: domain dc: example
# groups, example.com dn: ou=groups,dc=example,dc=com objectClass: top objectClass: organizationalUnit ou: groups ```
- ca40ef1a68a2 (Somehow LDAP bind failed on this container, there seems to be some environmental issue)
```$ ldapsearch -H ldap://localhost:1389 -b "dc=example, dc=com" -D "cn=superuser,dc=example,dc=com" -w admin123 ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)```
https://bugs.openldap.org/show_bug.cgi?id=10273
--- Comment #1 from Vishwanath Jadhav jvishwanath66@gmail.com --- The same question has been raised on the bitnami/openldap containers:
https://github.com/bitnami/containers/issues/73246
https://bugs.openldap.org/show_bug.cgi?id=10273
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED
--- Comment #2 from Howard Chu hyc@openldap.org --- There doesn't appear to be any OpenLDAP bug here. If you run a bunch of containers on the same storage, you must ensure that they each use unique pathnames for their database storage.
https://bugs.openldap.org/show_bug.cgi?id=10273
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED Keywords|needs_review |