From 94ccde134e5805e9adbc895d8b674514558d4533 Mon Sep 17 00:00:00 2001 From: Smail KOURTA Date: Thu, 5 Dec 2024 12:59:59 +0000 Subject: [PATCH] remove logs and redundant setting of the flag --- lib/charms/opensearch/v0/opensearch_base_charm.py | 4 ---- lib/charms/opensearch/v0/opensearch_relation_peer_cluster.py | 3 --- 2 files changed, 7 deletions(-) diff --git a/lib/charms/opensearch/v0/opensearch_base_charm.py b/lib/charms/opensearch/v0/opensearch_base_charm.py index 35dc16c79..6aecebfc0 100644 --- a/lib/charms/opensearch/v0/opensearch_base_charm.py +++ b/lib/charms/opensearch/v0/opensearch_base_charm.py @@ -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 @@ -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") diff --git a/lib/charms/opensearch/v0/opensearch_relation_peer_cluster.py b/lib/charms/opensearch/v0/opensearch_relation_peer_cluster.py index 9b2a6c57d..1506577e8 100644 --- a/lib/charms/opensearch/v0/opensearch_relation_peer_cluster.py +++ b/lib/charms/opensearch/v0/opensearch_relation_peer_cluster.py @@ -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))