Skip to content

Commit

Permalink
1 to 3 units of opensearch and fix for truststore password
Browse files Browse the repository at this point in the history
  • Loading branch information
AmberCharitos committed Jul 19, 2024
1 parent c96585d commit cce0aa1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,10 @@ def _configure_ranger_admin(self, container):
context: Environment variables for pebble plan.
"""
db_conn = self._state.database_connection
self._state.truststore_pwd = (
self._state.truststore_pwd or generate_password()
)
if self.unit.is_leader():
self._state.truststore_pwd = (
self._state.truststore_pwd or generate_password()
)
self.set_truststore_password(container)
opensearch = self._state.opensearch or {}
if opensearch.get("is_enabled") and not container.exists(
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_opensearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ async def deploy_opensearch(lxd_model: Model):
lxd_model: The LXD model.
"""
await asyncio.gather(
lxd_model.deploy("ch:opensearch", num_units=1, channel="2/edge"),
lxd_model.deploy("ch:opensearch", num_units=3, channel="2/edge"),
lxd_model.deploy(
"self-signed-certificates", num_units=1, channel="edge"
),
Expand Down

0 comments on commit cce0aa1

Please sign in to comment.