Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If a push fails, prometheus may never be reload even though config changed (theoretical edge-case) #369

Closed
sed-i opened this issue Sep 22, 2022 · 2 comments

Comments

@sed-i
Copy link
Contributor

sed-i commented Sep 22, 2022

If some files were pushed but others failed, when _configure re-enters then should_reload may be false without prometheus ever reloading.

try:
# Need to reload if config or alerts changed.
# (Both functions need to run so cannot use the short-circuiting `or`.)
should_reload = any(
[
self._generate_prometheus_config(self.container),
self._set_alerts(self.container),
]
)
except PebbleError as e:
logger.error("Failed to push updated config/alert files: %s", e)
self.unit.status = early_return_statuses["push_fail"]
return

@PietroPasotti
Copy link
Contributor

we should probably let the error bubble up in this case, assuming the caller checked container.can_connect before this happens. Error state seems appropriate because this really shouldn't happen.

@simskij
Copy link
Member

simskij commented Nov 11, 2024

Issue has been stale for more than a year, and it's relevance today is thus debatable. Closing for now. Create a new issue or reopen this one if this is affecting you.

@simskij simskij closed this as completed Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants