Skip to content

fix: properly granting observability model access to Juju users#809

Merged
hemanthnakkina merged 1 commit into
canonical:mainfrom
himax16:fix/2155095
Jun 5, 2026
Merged

fix: properly granting observability model access to Juju users#809
hemanthnakkina merged 1 commit into
canonical:mainfrom
himax16:fix/2155095

Conversation

@himax16
Copy link
Copy Markdown
Member

@himax16 himax16 commented Jun 4, 2026

In MAAS deployment, one Juju user is shared across all of the nodes. Previously, we use the nodes' names to grant access.

Closes-Bug: #2155095

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to fix observability model permission grants in MAAS deployments where a single Juju user is shared across nodes (so granting access by node hostname is incorrect).

Changes:

  • Switch post-enable access grants from iterating cluster nodes to iterating Juju users.
  • Update the username used for JujuGrantModelAccessStep and related warning logs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 887 to +891
# Grant all existing Juju users access to the observability model
client = deployment.get_client()
jhelper = JujuHelper(deployment.juju_controller)

for node in client.cluster.list_nodes():
node_name = node["name"]
for user in client.cluster.list_juju_users():
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the intended change.

Comment thread sunbeam-python/sunbeam/features/observability/feature.py
In MAAS deployment, one Juju user is shared across all of the nodes. Previously, we use the nodes' names to grant access.

Closes-Bug: #2155095
Signed-off-by: Himawan Winarto <himawan.winarto@canonical.com>
@hemanthnakkina hemanthnakkina merged commit 843f423 into canonical:main Jun 5, 2026
6 checks passed
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

Successfully merging this pull request may close these issues.

3 participants