all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: mirai <mirai@makinata.eu>
To: 60300@debbugs.gnu.org
Subject: bug#60300: Premature networking started status with NetworkManager
Date: Sat, 24 Dec 2022 16:23:09 +0000	[thread overview]
Message-ID: <e5e14d3e-cec8-d55d-ccf7-6708c415ff08@makinata.eu> (raw)

If a service has a requirement on 'networking
(either from accepting a shepherd-requirements field from its configuration record-type or
from the service-type definition) and networking is provided by NetworkManager, it will not
work as intended. This is because networking is prematurely flagged as started before
NetworkManager can finish its startup.

Some of the visible consequences resulting from this is service startup failure
for OpenSMTPD when it's configured with a non-loopback interface and has a dependency on 'networking
placed using shepherd-requirement field.
A similar situation happens with nginx, failure to start the service or ignored directives that
want to resolve domains over DNS.

These failures do not happen if one creates a one-shot simple-service that puts a dependency on networking
and simply waits approx. 10-30 seconds and have nginx-service-type or opensmptd-service-type depend on it
instead.

From /var/log/messages (truncated to relevant parts):

--8<---------------cut here---------------start------------->8---
Dec 21 22:19:01 localhost shepherd[1]: Service networking has been started. 
Dec 21 22:19:01 localhost NetworkManager[473]: <info>  [1671661141.6330] NetworkManager (version 1.41.2) is starting... (asserts:100, boot:502a84f9-92cc-47a9-a86c-97ec819fb23a)
Dec 21 22:19:01 localhost NetworkManager[473]: <info>  [1671661141.6331] Read config: /gnu/store/3cp48fvxfivj2255bbxj7363qj33ajs9-NetworkManager.conf
Dec 21 22:19:01 localhost NetworkManager[473]: <info>  [1671661141.6340] bus-manager: acquired D-Bus service "org.freedesktop.NetworkManager"
Dec 21 22:19:01 localhost NetworkManager[473]: <info>  [1671661141.6353] manager[0xc85080]: monitoring kernel firmware directory '/lib/firmware'.
Dec 21 22:19:01 localhost NetworkManager[473]: <info>  [1671661141.6357] hostname: hostname: couldn't get property from hostnamed
Dec 21 22:19:01 localhost NetworkManager[473]: <info>  [1671661141.6358] hostname: static hostname changed from (none) to "doll"
Dec 21 22:19:01 localhost NetworkManager[473]: <info>  [1671661141.6363] dns-mgr: init: dns=default,systemd-resolved rc-manager=resolvconf (auto)
Dec 21 22:19:01 localhost NetworkManager[473]: <info>  [1671661141.6365] manager[0xc85080]: rfkill: Wi-Fi hardware radio set enabled
Dec 21 22:19:01 localhost NetworkManager[473]: <info>  [1671661141.6365] manager[0xc85080]: rfkill: WWAN hardware radio set enabled
[...]
Dec 21 22:19:30 localhost shepherd[1]: Service nscd has been started. 
Dec 21 22:19:30 localhost shepherd[1]: [NetworkManager] Service nscd has been stopped. 
Dec 21 22:19:30 localhost shepherd[1]: [NetworkManager] Service nscd has been started. 
Dec 21 22:19:30 localhost dbus-daemon[470]: [system] Activating service name='org.freedesktop.nm_dispatcher' requested by ':1.1' (uid=0 pid=473 comm="/gnu/store/ghf1miwbxfcz33mx9bccllgf257vvfhp-networ") (using servicehelper)
Dec 21 22:19:30 localhost NetworkManager[473]: <info>  [1671661170.2951] device (enp4s0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Dec 21 22:19:30 localhost dbus-daemon[470]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Dec 21 22:19:30 localhost NetworkManager[473]: <info>  [1671661170.2995] device (enp4s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Dec 21 22:19:30 localhost NetworkManager[473]: <info>  [1671661170.2996] device (enp4s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Dec 21 22:19:30 localhost NetworkManager[473]: <info>  [1671661170.2998] manager: NetworkManager state is now CONNECTED_SITE
Dec 21 22:19:30 localhost NetworkManager[473]: <info>  [1671661170.2999] device (enp4s0): Activation: successful, device activated.
Dec 21 22:19:30 localhost NetworkManager[473]: <info>  [1671661170.3001] manager: NetworkManager state is now CONNECTED_GLOBAL
Dec 21 22:19:30 localhost NetworkManager[473]: <info>  [1671661170.3003] manager: startup complete
--8<---------------cut here---------------end--------------->8---


It's apparent that 'networking should be flagged started only after NetworkManager logs "startup complete".




             reply	other threads:[~2022-12-24 16:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-24 16:23 mirai [this message]
     [not found] ` <handler.60300.B.16718990081042.ack@debbugs.gnu.org>
2022-12-27 16:24   ` bug#60300: (Premature networking started status with NetworkManager) mirai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e5e14d3e-cec8-d55d-ccf7-6708c415ff08@makinata.eu \
    --to=mirai@makinata.eu \
    --cc=60300@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.