sunbeam inspect fails with --client: Error: Insufficient permissions to run sunbeam commands

Bug #2066541 reported by Nobuto Murata
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Snap
Fix Released
High
Guillaume Boutry

Bug Description

$ snap list openstack
Name Version Rev Tracking Publisher Notes
openstack 2024.1 507 2024.1/edge canonical✓ -

In the MAAS scenario described in:
https://microstack.run/docs/multi-node-maas
the client is set up with `sunbeam prepare-node-script --client`

However, it doesn't contain necessary steps to run `sunbeam inspect`.

$ sunbeam inspect
Error: Insufficient permissions to run sunbeam commands
Add the user 'ubuntu' to the 'snap_daemon' group:

    sudo usermod -a -G snap_daemon ubuntu

After this, reload the user groups either via a reboot or by running 'newgrp snap_daemon'.

[w/ --client]

$ sunbeam prepare-node-script --client | grep snap_daemon

[w/o --client]

$ sunbeam prepare-node-script | grep snap_daemon
# Add $USER to the snap_daemon group supporting interaction
sudo usermod --append --groups snap_daemon $USER

Tags: open-2186
Revision history for this message
James Page (james-page) wrote :

This is due to an errant check in the codebase rather than the need to actually have this permission.

Changed in snap-openstack:
status: New → Triaged
importance: Undecided → High
tags: added: open-2186
Changed in snap-openstack:
status: Triaged → In Progress
assignee: nobody → Guillaume Boutry (gboutry)
Revision history for this message
Andre Ruiz (andre-ruiz) wrote :

Just for the record, this also happens on the 'configure' part.

17:06:58 + sunbeam configure --openrc /home/ubuntu/demo-openrc
17:07:01 > Checking if user ubuntu is member of group snap_daemon ...
17:07:01 Error: Insufficient permissions to run sunbeam commands
17:07:01 Add the user 'ubuntu' to the 'snap_daemon' group:
17:07:01 sudo usermod -a -G snap_daemon ubuntu
17:07:01 After this, reload the user groups either via a reboot or by running 'newgrp snap_daemon'.

Changed in snap-openstack:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.