juju 3.5 wrong uid for pebble daemon

Bug #2067870 reported by Guillaume Boutry
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
New
Undecided
Unassigned

Bug Description

Deploying a charm on juju 3.5.1 fails because pebble daemon does not have admin access.

New feature was added in 3.5, allowing to specify an uid for the pebble process: https://discourse.charmhub.io/t/file-metadata-yaml/5213/33?u=hpidcock.

This broke existing charm that had a Rock image specifying `run-user`. This made pebble start with the `_daemon_` (584792) while the `uid` and `gid` were not specified in charmcraft.yaml container definition.

This broke the charm because the charm operator tries to modify apache2 files in /etc, which requires more rights than `584792` has.

Juju: 3.5.1
Microk8s: 1.28
openstack-images-sync-k8s' charmcraft.yaml: https://opendev.org/openstack/sunbeam-charms/src/commit/ae165c95103555c2e7a3cd3408e56f82c6e11c34/charms/openstack-images-sync-k8s/charmcraft.yaml#L56

Reproduction step:
- have a juju 3.5.1 controller on a k8s cloud
- juju deploy <attached bundle> --trust
- once ready, openstack-images-sync-k8s will be error

-----------------------------------------------------------------------------------
juju ssh -m testing --container openstack-images-sync openstack-images-sync/0 bash
_daemon_@openstack-images-sync-0:/$ ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
_daemon_ 1 0.0 0.0 1234868 10392 ? Ssl 07:50 0:00 /charm/bin/pebble run --create-dirs --hold --http :38813 --verbose
_daemon_ 23 0.0 0.0 2892 1600 pts/0 Ss 07:54 0:00 sh -c bash
_daemon_ 30 0.0 0.0 4628 3520 pts/0 S 07:54 0:00 bash
_daemon_ 32 0.0 0.0 7064 2720 pts/0 R+ 07:54 0:00 ps aux

Revision history for this message
Guillaume Boutry (gboutry) wrote :
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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