Skip to content

Commit

Permalink
remove logs and redundant setting of the flag
Browse files Browse the repository at this point in the history
  • Loading branch information
skourta committed Dec 5, 2024
1 parent 03186e8 commit 94ccde1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
4 changes: 0 additions & 4 deletions lib/charms/opensearch/v0/opensearch_base_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ def cleanup():
# when "data" node joins -> start cluster-manager via _on_peer_cluster_relation_changed
# cluster-manager notifies "data" node via refresh of peer cluster relation data
# "data" node starts and initializes security index
logger.info(f"Deployment description at on start: {deployment_desc}")
if (
deployment_desc.typ == DeploymentType.MAIN_ORCHESTRATOR
and not deployment_desc.start == StartMode.WITH_GENERATED_ROLES
Expand Down Expand Up @@ -1063,9 +1062,6 @@ def _post_start_init(self, event: _StartOpenSearch): # noqa: C901
"""Initialization post OpenSearch start."""
# initialize the security index if needed (and certs written on disk etc.)
# this happens only on the first data node to join the cluster
logger.debug(
f"is_leader: {self.unit.is_leader()}, security_index_initialised: {self.peers_data.get(Scope.APP, 'security_index_initialised')}, roles: {self.opensearch_peer_cm.deployment_desc().config.roles}, start: {self.opensearch_peer_cm.deployment_desc().start}"
)
if (
self.unit.is_leader()
and not self.peers_data.get(Scope.APP, "security_index_initialised")
Expand Down
3 changes: 0 additions & 3 deletions lib/charms/opensearch/v0/opensearch_relation_peer_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,9 +663,6 @@ def _set_security_conf(self, data: PeerClusterRelData) -> None:
)

self.charm.peers_data.put(Scope.APP, "admin_user_initialized", True)
logger.debug(f"PeerClusterRelData: {data.to_dict()}")
if data.security_index_initialised:
self.charm.peers_data.put(Scope.APP, "security_index_initialised", True)

if s3_creds := data.credentials.s3:
self.charm.secrets.put_object(Scope.APP, "s3-creds", s3_creds.to_dict(by_alias=True))
Expand Down

0 comments on commit 94ccde1

Please sign in to comment.