Skip to content

systemd-resolved not available after network-online.target #5650

@xnox

Description

@xnox

Submission type

  • Bug report
  • Request for enhancement (RFE)

systemd version the issue has been seen with

232

Used distribution

Ubuntu

Problem

For releases using systemd-resolved (yakkety and zesty); the unit configuration does not require that the service be active before allowing systemd to reach 'network-online.target' which is a special target used to allow other units which require networking access to run.

In some cases, units which run After=network-online.target may encounter DNS failures if systemd-resolved is not yet completely active.

Solutions

Currently a distro patch has been applied to add Before=network-online.target to the Unit directives
for systemd-resolved.service.

Alternatively, maybe Install section needs to be changed to specify WantedBy=network-online.target rather than just the multi-user.target.

Imho, it is reasonable to expect DNS resolution to work once network-online.target has been reached.

In case of bug report: Steps to reproduce the problem

  1. lxc launch ubuntu-daily:yakkety y1

  2. lxc exec y1 -- journalctl -o short-precise
    --unit systemd-resolved --unit network-online.target

  3. Check order of units; If 'Reached target Network is Online' is
    listed before 'Started Network Name Resolution', then DNS may not
    be up.

Further details at: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1673860

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFE 🎁Request for Enhancement, i.e. a feature requestresolve

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions