Skip to content

nspawn: systemd-networkd stopped working in containers without -U in 242 #12313

Description

@enku

systemd version the issue has been seen with

systemd-242

Used distribution

Gentoo Linux

Expected behaviour you didn't see

If not passing -U to systemd-nspawn, systemd-networkd does not start successfully in a container where systemd-242 is running on the host.

Unexpected behaviour you saw

# systemctl status systemd-networkd
● systemd-networkd.service - Network Service
   Loaded: loaded (/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: >
   Active: inactive (dead)
Condition: start condition failed at Sun 2019-04-14 06:33:18 PDT; 13s ago
           └─ ConditionCapability=CAP_NET_ADMIN was not met
     Docs: man:systemd-networkd.service(8)

Steps to reproduce the problem

  1. Prepare a container directory that doesn't have owners shifted
  2. Run the container w/o using -U. E.g. systemd-nspawn --quiet --boot --link-journal=try-guest --network-veth --settings=override --machine=testu
  3. Attempt to start systemd-networkd in the container

However, if I run the above command with -U it works. Oddly enough, if I switch the container back to non-private users (--private-users=0 --private-users-chown) and re-run the container with --private-users=no then systemd-networkd will start successfully in the container.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Programming errors, that need preferential fixingnetworknspawn

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions