Backport/2024.1 lp2159965#888
Merged
MylesJP merged 2 commits intoJul 17, 2026
Merged
Conversation
With an external COS, the opentelemetry-collector COS relations are only created by IntegrateRemoteCosOffersStep after all agents are deployed, since the terraform juju provider cannot consume offers across controllers. The infra model agent deploy step introduced in eb3c568 waits for the collector to reach active status, which it can never do at that point, so `sunbeam enable observability external` on MAAS deployments timed out after 30 minutes and the COS offers were never consumed or related in any model. Accept blocked status for the infra agent deploy step, matching the other agent deploy steps in the external flow. The collector settles to active once the offers are integrated by the subsequent step. Closes-Bug: #2159965 Signed-off-by: Myles Penner <myles.penner@canonical.com> Assisted-by: Claude Fable 5 (cherry picked from commit 09baf98)
The migration from grafana-agent to opentelemetry-collector (f5fc0a1) kept the grafana-agent loki endpoint name logging-consumer, which does not exist on the opentelemetry-collector charm. Commit 7fdf5bd corrected it to send-loki-logs in IntegrateRemoteCosOffersStep but missed RemoveRemoteCosOffersStep, so disabling external observability silently skipped removing the loki relation and then waited for the collector to reach blocked status, which it may never do while the relation remains. Signed-off-by: Myles Penner <myles.penner@canonical.com> Assisted-by: Claude Fable 5 (cherry picked from commit eb0eead)
gboutry
self-requested a review
July 16, 2026 14:31
gboutry
approved these changes
Jul 17, 2026
Raven-182
self-requested a review
July 17, 2026 13:08
Raven-182
approved these changes
Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clean backport of #884 to stable/2024.1.
sunbeam enable observability external ...on MAAS deployments timed out after 30 minutes with theopentelemetry-collectorcharms stuck inblockedacross theopenstack,openstack-machines, andopenstack-inframodels, and the COS offers were never consumed or related.With an external COS, the collector's COS relations are only created by
IntegrateRemoteCosOffersStepafter all agents are deployed, since the terraform juju provider cannot consume offers across controllers (juju/terraform-provider-juju#119). The infra agent deploy step added in eb3c568 runs before that and waits for the collector to reachactive— which it can never do at that point. The enable therefore timed out at the infra step and aborted before any integrations were created, leaving every model's collector blocked.This PR contains two commits:
Accept
blockedstatus for the infra agent deploy step in the external flow, matching the other agent deploy steps which already pass["active", "blocked"]. The collector settles toactiveonceIntegrateRemoteCosOffersStepintegrates the offers. The embedded flow is unchanged.Fix the stale
logging-consumerendpoint inRemoveRemoteCosOffersStep, left behind by the grafana-agent → opentelemetry-collector migration (f5fc0a1, partially fixed in 7fdf5bd), so disabling external observability actually removes the loki relation instead of silently skipping it and then waiting for ablockedstatus that may never come.Both commits cherry-picked cleanly from main with no conflicts.
Assisted-By: Claude Fable 5
Closes-bug: #2159965
QA steps
openstack-inframodel exists).grafana-dashboards,receive-remote-write, andloki-loggingoffers, and register that controller on the Sunbeam client.sunbeam enable observability external <controller> <grafana-dashboard-offer-url> <prometheus-receive-remote-write-offer-url> <loki-logging-offer-url>.juju statusin theopenstack,openstack-machines, andopenstack-inframodels showsopentelemetry-collectoractivewith the consumed COS SaaS relations in place. Confirm metrics/dashboards/logs arrive in the external Grafana.sunbeam disable observability externaland verify it completes, with all three COS relations (including loki) removed in each model.Unit tests (
tox -e unit) and lint (tox -e pep8) pass on this branch, including theTestExternalObservabilityEnablePlansregression tests backported with the fix.Links
Jira card: OPEN-4643
Launchpad bug: LP#2159965
Original PR: #884