mirror of
https://github.com/bitnami/containers.git
synced 2026-03-06 06:58:01 +08:00
[bitnami/solr] Check if basic auth is already enabled before trying to create the user. We have encountered the same issue as the following issue: https://github.com/bitnami/charts/issues/15356 In our case we run a multinode solr cloud with zookeper. If the cluster was already initialized and basic auth is configured in zk for solr cloud, auth enable cannot run again. In our case a disaster recovery happened and tried to rejoin the node with a new volume into the cluster, the lib tries to create the admin user, but get exit code 1 executing auth enable because solr responds auth is already enabled please disable it first. Because of this the script exits with error and the node never recovers. At the init phase we can get the security.json from zk and check if solr.BasicAuthPlugin already included or not and only create the user if basicAuth is not included yet altough it's the startup of the cluster. Signed-off-by: János Grásl <janos.grasl@gmail.com>