canonical / canonical/microceph

snap.microceph.osd.service startup fails with "Operation not permitted"

Open
#612 6 comments 0 reactions 0 assignees View on GitHub
question stale
Dominant language
Go
Stars
396
Forks
74
Avg merge
2d 20h
Merged PRs (30d)
7

Description

Startup of snap.microceph.osd.service fails with the following error message left in journalctl:

```
... microceph.osd[1127]: realpath: /var/snap/microceph/1395/..: Operation not permitted
... microceph.osd[1100]: /snap/microceph/1395/commands/osd.start: line 6: /current/run/ceph-osd.pid: No such file or directory
```

The issue seems to be that in https://github.com/canonical/microceph/blob/5f545a9b544a9207739ff96275f6d066796204ad/snapcraft/commands/osd.start#L5 an attempt is made to lookup a path which is outside of the sandbox.

Version information:
```
# Raspberry Pi 5
# uname -a
Linux raspi5-1 6.12.34+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1~bookworm (2025-06-26) aarch64 GNU/Linux
# snap --version
snap version: snap 2.61.4ubuntu0.16.04.1+esm1
snapd 2.61.4ubuntu0.16.04.1+esm1
series 16
debian 12
kernel 6.12.34+rpt-rpi-2712
# snap list
Name Version Rev Tracking Publisher Notes
core 16-2.61.4-20250508 17215 latest/stable canonical✓ core
core20 20250526 2603 latest/stable canonical✓ base
core24 20250618 1059 latest/stable canonical✓ base
microceph 19.2.0+snapab139d4a1f 1395 squid/stable canonical✓ held
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with journalctl and inspect snapcraft/commands/osd.start, especially line 5 where the path lookup occurs. Confirm the service startup behavior and the sandbox boundary; done means snap.microceph.osd.service starts without the reported errors and the expected Ceph OSD PID path is available.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, shell
Domain
infrastructure, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.