diff --git a/lib/charms/opensearch/v0/constants_charm.py b/lib/charms/opensearch/v0/constants_charm.py index 4b852daef..d3bd25c9c 100644 --- a/lib/charms/opensearch/v0/constants_charm.py +++ b/lib/charms/opensearch/v0/constants_charm.py @@ -83,7 +83,6 @@ WaitingForOtherUnitServiceOps = "Waiting for other units to complete the ops on their service." NewIndexRequested = "new index {index} requested" RestoreInProgress = "Restore in progress..." -PluginConfigCheck = "Plugin configuration check." BackupSetupStart = "Backup setup started." BackupConfigureStart = "Configuring backup service..." BackupInDisabling = "Disabling backup service..." diff --git a/lib/charms/opensearch/v0/opensearch_base_charm.py b/lib/charms/opensearch/v0/opensearch_base_charm.py index 08533cf2c..bb466e192 100644 --- a/lib/charms/opensearch/v0/opensearch_base_charm.py +++ b/lib/charms/opensearch/v0/opensearch_base_charm.py @@ -26,7 +26,6 @@ OpenSearchUsers, PeerRelationName, PluginConfigChangeError, - PluginConfigCheck, RequestUnitServiceOps, SecurityIndexInitProgress, ServiceIsStopping, @@ -641,22 +640,16 @@ def _on_config_changed(self, event: ConfigChangedEvent): # noqa C901 event.defer() return - if self.unit.is_leader(): - self.status.set(MaintenanceStatus(PluginConfigCheck), app=True) - if self.plugin_manager.run() and not restart_requested: self._restart_opensearch_event.emit() except (OpenSearchPluginError, OpenSearchKeystoreNotReadyYetError) as e: - if self.unit.is_leader(): - self.status.clear(PluginConfigCheck, app=True) - if isinstance(e, OpenSearchPluginError): - self.status.set(BlockedStatus(PluginConfigChangeError), app=True) + if self.unit.is_leader() and isinstance(e, OpenSearchPluginError): + self.status.set(BlockedStatus(PluginConfigChangeError), app=True) event.defer() return if self.unit.is_leader(): - self.status.clear(PluginConfigCheck, app=True) self.status.clear(PluginConfigChangeError, app=True) def _on_set_password_action(self, event: ActionEvent):