Skip to content

Commit

Permalink
debug 503 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
carlcsaposs-canonical committed Apr 12, 2024
1 parent 4e4193f commit 590410f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/charms/opensearch/v0/opensearch_base_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@ def _start_opensearch(self, event: _StartOpenSearch) -> None: # noqa: C901
self._post_start_init(event)
except (OpenSearchHttpError, OpenSearchNotFullyReadyError):
event.defer()
logger.exception("FOOBAR start")
return

if not self._can_service_start():
Expand Down Expand Up @@ -787,6 +788,7 @@ def _post_start_init(self, event: EventBase):
# may be thrown when calling a node - we want to ensure this node is perfectly ready
# before marking it as ready
if not self.opensearch.is_node_up():
logger.warning("FOO not ready")
raise OpenSearchNotFullyReadyError("Node started but not full ready yet.")

# cleanup bootstrap conf in the node
Expand Down
1 change: 1 addition & 0 deletions lib/charms/opensearch/v0/opensearch_distro.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ def call(url: str) -> requests.Response:
raise OpenSearchHttpError(response_text=str(e))

if resp_status_code:
logger.exception(f"FOO {e.response.status_code}")
return e.response.status_code

raise OpenSearchHttpError(
Expand Down

0 comments on commit 590410f

Please sign in to comment.