[systemd-devel] Container restart issue: Failed to attach 1 to compat systemd cgroup

Michal Koutný mkoutny at suse.com
Thu Jan 12 17:17:08 UTC 2023


On Thu, Jan 12, 2023 at 03:31:25PM +0000, Lewis Gaul <lewis.gaul at gmail.com> wrote:
> Could you suggest commands to run to do this?

# systemd-analyze set-log-level debug
# logger MARK-BEGIN
# ...whatever restart commands
# ...wait for the failure
# logger MARK-END
# systemd-analyze set-log-level info
# journalctl -b | sed -n '/MARK-BEGIN/,/MARK-END/p'

> Should we be suspicious of the host systemd version and/or the fact that
> the host is in 'legacy' mode while the container (based on the systemd
> version being higher) is in 'hybrid' mode? Maybe we should try telling the
> container systemd to run in 'legacy' mode somehow?

I'd be wary of the legacy at host and {hybrid,unified}@container combo.
Also the old versions on the host could mean that the cgroup setup may
be buggy.
(I only have capacity to look into the recent code but the debug logs
above may show something obvious.)

Ideally, you should tell both host and container to run in the unified
mode ;-)

Michal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: Digital signature
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20230112/a24c0ed1/attachment.sig>


More information about the systemd-devel mailing list