Uploading Custom image - snap cgroup issue

On my Ubuntu server terminal, after maas login I am attempting to upload an image with:

maas admin boot-resources create name=custom/rhel8 title=RHEL8TEST architecture=amd64/generic filetype=tgz content@=/home/me/rhel8.tar.gz

and receive

/user.slice/user-0.slice/session-172.scope is not a snap cgroup for tag snap.maas.maas

This is being done on my general user ‘me’. On root user, it gives permission denied. I think maas wants general user, I have uploaded images in the past on a different setup where I discovered this.

My understanding, is that “snap.maas.maas” is old and uses a different naming now?

systemd-cgls | grep -E 'snap\.maas|session-172'

│ │ ├─session-172.scope
│ │ │ └─478605 grep --color=auto -E snap\.maas|session-172
  ├─snap.maas-test-db.postgres.service
  ├─snap.maas.pebble.service


systemd-cgls | grep -E 'snap.maas.maas'
│ │ │ └─481712 grep --color=auto -E snap.maas.maas

How do I fix this and make it reference the right tag, which I assume is snap.maas.pebble?

snap version
snap 2.77.1
snapd 2.77.1
ubuntu 24.04

snap list maas
maas 3.7.3-18030-g.9122eee68  42453  3.7/stable  canonical✓

Or, is there a way to make maas happy with uploading with the root user?

The problem looks like snap confinement, not MAAS itself

Can you show where your profile actually lives? (mind the credentials)

maas list
sudo maas list

If admin appears under sudo maas list, that means that MAAS has been driven as root

“admin” does appear under maas list. You are correct, I was convinced this was related to maas but it appears to be related to “snap”.

From what I learned my problem came from being SSH into computer I am using, and not using “root” user, because MAAS is being driven by root

This relieved the issue:

export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(id -u)/bus"

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.