jp-gouin / helm-openldap

Helm chart of Openldap in High availability with multi-master replication and PhpLdapAdmin and Ltb-Passwd
Apache License 2.0
205 stars 120 forks source link

Default Chart not Starting #26

Closed kgibcc closed 3 years ago

kgibcc commented 3 years ago

I was working with customized values.yaml and was running into issue, so I tried plain defaults and recieved same error:

***  INFO   | 2021-05-05 19:43:14 | CONTAINER_LOG_LEVEL = 3 (info)
***  INFO   | 2021-05-05 19:43:14 | Search service in CONTAINER_SERVICE_DIR = /container/service :
***  INFO   | 2021-05-05 19:43:14 | link /container/service/:ssl-tools/startup.sh to /container/run/startup/:ssl-tools
***  INFO   | 2021-05-05 19:43:14 | link /container/service/slapd/startup.sh to /container/run/startup/slapd
***  INFO   | 2021-05-05 19:43:14 | link /container/service/slapd/process.sh to /container/run/process/slapd/run
***  INFO   | 2021-05-05 19:43:14 | Environment files will be proccessed in this order :
Caution: previously defined variables will not be overriden.
/container/environment/99-default/default.startup.yaml
/container/environment/99-default/default.yaml

To see how this files are processed and environment variables values,
run this container with '--loglevel debug'
***  INFO   | 2021-05-05 19:43:14 | Running /container/run/startup/:ssl-tools...
***  INFO   | 2021-05-05 19:43:14 | Running /container/run/startup/slapd...
***  INFO   | 2021-05-05 19:43:14 | openldap user and group adjustments
***  INFO   | 2021-05-05 19:43:14 | get current openldap uid/gid info inside container
***  INFO   | 2021-05-05 19:43:14 | -------------------------------------
***  INFO   | 2021-05-05 19:43:14 | openldap GID/UID
***  INFO   | 2021-05-05 19:43:14 | -------------------------------------
***  INFO   | 2021-05-05 19:43:14 | User uid: 911
***  INFO   | 2021-05-05 19:43:14 | User gid: 911
***  INFO   | 2021-05-05 19:43:14 | uid/gid changed: false
***  INFO   | 2021-05-05 19:43:14 | -------------------------------------
***  INFO   | 2021-05-05 19:43:14 | updating file uid/gid ownership
***  INFO   | 2021-05-05 19:43:14 | No certificate file and certificate key provided, generate:
***  INFO   | 2021-05-05 19:43:14 | /container/run/service/slapd/assets/certs/tls.crt and /container/run/service/slapd/assets/certs/tls.key
2021/05/05 19:43:14 [INFO] generate received request
2021/05/05 19:43:14 [INFO] received CSR
2021/05/05 19:43:14 [INFO] generating key: ecdsa-384
2021/05/05 19:43:14 [INFO] encoded CSR
2021/05/05 19:43:14 [INFO] signed certificate with serial number 116630929021868969892101848881681016104120383985
mv: cannot move '/tmp/cert.pem' to '/container/run/service/slapd/assets/certs/tls.crt': No such file or directory
mv: cannot move '/tmp/cert-key.pem' to '/container/run/service/slapd/assets/certs/tls.key': No such file or directory
***  INFO   | 2021-05-05 19:43:14 | Link /container/service/:ssl-tools/assets/default-ca/default-ca.pem to /container/run/service/slapd/assets/certs/ca.crt
ln: failed to create symbolic link '/container/run/service/slapd/assets/certs/ca.crt': No such file or directory
Generating DH parameters, 2048 bit long safe prime, generator 2
This is going to take a long time

**** CERT GENERATES ***

*** WARNING | 2021-05-05 19:45:02 | An error occurred. Aborting.
***  INFO   | 2021-05-05 19:45:02 | Shutting down /container/run/startup/slapd (PID 11)...
*** WARNING | 2021-05-05 19:45:02 | Init system aborted.
***  INFO   | 2021-05-05 19:45:02 | Killing all processes...

Can be recreated by

helm repo add helm-openldap https://jp-gouin.github.io/helm-openldap/
helm install openldap helm-openldap/openldap-stack-ha -n my-namespace
jp-gouin commented 3 years ago

Hi, I wasn't able to reproduce the issue.

This is what i got :

k logs -f openldap-openldap-stack-ha-0
***  INFO   | 2021-05-06 07:11:52 | CONTAINER_LOG_LEVEL = 3 (info)
***  INFO   | 2021-05-06 07:11:52 | Search service in CONTAINER_SERVICE_DIR = /container/service :
***  INFO   | 2021-05-06 07:11:52 | link /container/service/:ssl-tools/startup.sh to /container/run/startup/:ssl-tools
***  INFO   | 2021-05-06 07:11:52 | link /container/service/slapd/startup.sh to /container/run/startup/slapd
***  INFO   | 2021-05-06 07:11:52 | link /container/service/slapd/process.sh to /container/run/process/slapd/run
***  INFO   | 2021-05-06 07:11:52 | Environment files will be proccessed in this order :
Caution: previously defined variables will not be overriden.
/container/environment/99-default/default.startup.yaml
/container/environment/99-default/default.yaml

To see how this files are processed and environment variables values,
run this container with '--loglevel debug'
***  INFO   | 2021-05-06 07:11:52 | Running /container/run/startup/:ssl-tools...
***  INFO   | 2021-05-06 07:11:52 | Running /container/run/startup/slapd...
***  INFO   | 2021-05-06 07:11:52 | openldap user and group adjustments
***  INFO   | 2021-05-06 07:11:52 | get current openldap uid/gid info inside container
***  INFO   | 2021-05-06 07:11:52 | -------------------------------------
***  INFO   | 2021-05-06 07:11:52 | openldap GID/UID
***  INFO   | 2021-05-06 07:11:52 | -------------------------------------
***  INFO   | 2021-05-06 07:11:52 | User uid: 911
***  INFO   | 2021-05-06 07:11:52 | User gid: 911
***  INFO   | 2021-05-06 07:11:52 | uid/gid changed: false
***  INFO   | 2021-05-06 07:11:52 | -------------------------------------
***  INFO   | 2021-05-06 07:11:52 | updating file uid/gid ownership
***  INFO   | 2021-05-06 07:11:52 | Database and config directory are empty...
***  INFO   | 2021-05-06 07:11:52 | Init new ldap server...
  Backing up /etc/ldap/slapd.d in /var/backups/slapd-2.4.57+dfsg-1~bpo10+1... done.
  Creating initial configuration... done.
  Creating LDAP directory... done.
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of restart.
***  INFO   | 2021-05-06 07:11:55 | Start OpenLDAP...
***  INFO   | 2021-05-06 07:11:56 | Waiting for OpenLDAP to start...
***  INFO   | 2021-05-06 07:11:56 | Add bootstrap schemas...
config file testing succeeded
***  INFO   | 2021-05-06 07:11:56 | Add image bootstrap ldif...
***  INFO   | 2021-05-06 07:11:56 | Add custom bootstrap ldif...
***  INFO   | 2021-05-06 07:11:56 | Add TLS config...
***  INFO   | 2021-05-06 07:11:56 | No certificate file and certificate key provided, generate:
***  INFO   | 2021-05-06 07:11:56 | /container/service/slapd/assets/certs/tls.crt and /container/service/slapd/assets/certs/tls.key
2021/05/06 07:11:57 [INFO] generate received request
2021/05/06 07:11:57 [INFO] received CSR
2021/05/06 07:11:57 [INFO] generating key: ecdsa-384
2021/05/06 07:11:57 [INFO] encoded CSR
2021/05/06 07:11:57 [INFO] signed certificate with serial number 586550495953918760275620257165260198259767913922
***  INFO   | 2021-05-06 07:11:57 | Link /container/service/:ssl-tools/assets/default-ca/default-ca.pem to /container/service/slapd/assets/certs/ca.crt
Generating DH parameters, 2048 bit long safe prime, generator 2
This is going to take a long time

and then

k get po
NAME                                     READY   STATUS             RESTARTS   AGE
openldap-ltb-passwd-5f8787c9df-9p75p     1/1     Running            0          2m44s
openldap-openldap-stack-ha-0             1/1     Running            0          2m44s
openldap-openldap-stack-ha-1             1/1     Running            0          2m2s
openldap-openldap-stack-ha-2             1/1     Running            0          77s
openldap-phpldapadmin-6b57dcdfd8-2njqk   1/1     Running            0          2m44s

What is your environment ?

kgibcc commented 3 years ago

thanks, it must've been using the values file in my chart directory. I was able to deploy with sample values successfully.