canonical / opensearch-operator

OpenSearch operator
Apache License 2.0
9 stars 5 forks source link

[BUG] `internal_users.yaml` is not syncronized across units #246

Closed juditnovak closed 2 months ago

juditnovak commented 2 months ago

Steps to reproduce

Start up a 2-members cham cluster and check with juju ssh opensearch/? sudo cat /var/snap/opensearch/current/etc/opensearch/opensearch-security/internal_users.yml

Expected behavior

In order to safely switch leader anytime (potentially re-initializing the security index), these local users must be the same on all nodes.

Now what happens is: on the leader on leader-elecetd event we

  1. wipe out the internal_users.yml file
  2. add back the users that we need

This process has to run on all units.

github-actions[bot] commented 2 months ago

https://warthogs.atlassian.net/browse/DPE-4168

juditnovak commented 2 months ago

More precisely: this code is only executed on the leader, while it's supposed to be run on each unit.

Mehdi-Bendriss commented 2 months ago

Fixed in https://github.com/canonical/opensearch-operator/pull/216