From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EG8LEa4np2PhywAAbAwnHQ (envelope-from ) for ; Sat, 24 Dec 2022 17:24:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qDwyEa4np2P/NwAA9RJhRA (envelope-from ) for ; Sat, 24 Dec 2022 17:24:14 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 88EECDE13 for ; Sat, 24 Dec 2022 17:24:13 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p97Jc-0000TU-8N; Sat, 24 Dec 2022 11:24:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p97Ja-0000Sz-Qu for bug-guix@gnu.org; Sat, 24 Dec 2022 11:24:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p97Ja-00039U-Io for bug-guix@gnu.org; Sat, 24 Dec 2022 11:24:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p97Ja-0000Hz-13 for bug-guix@gnu.org; Sat, 24 Dec 2022 11:24:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#60300: Premature networking started status with NetworkManager Resent-From: mirai Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 24 Dec 2022 16:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60300 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 60300@debbugs.gnu.org X-Debbugs-Original-To: bug-guix Received: via spool by submit@debbugs.gnu.org id=B.16718990081042 (code B ref -1); Sat, 24 Dec 2022 16:24:01 +0000 Received: (at submit) by debbugs.gnu.org; 24 Dec 2022 16:23:28 +0000 Received: from localhost ([127.0.0.1]:46998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p97J2-0000Gk-3O for submit@debbugs.gnu.org; Sat, 24 Dec 2022 11:23:28 -0500 Received: from lists.gnu.org ([209.51.188.17]:33706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p97Iz-0000Gc-PE for submit@debbugs.gnu.org; Sat, 24 Dec 2022 11:23:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p97Iz-0000EG-K3 for bug-guix@gnu.org; Sat, 24 Dec 2022 11:23:25 -0500 Received: from smtpm5.myservices.hosting ([185.26.105.236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p97Iy-00033V-07 for bug-guix@gnu.org; Sat, 24 Dec 2022 11:23:25 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.172]) by smtpm5.myservices.hosting (Postfix) with ESMTP id B8C0E2050A for ; Sat, 24 Dec 2022 17:23:10 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 443D780096 for ; Sat, 24 Dec 2022 17:23:10 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-1.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id IkmXNXWhDd9C for ; Sat, 24 Dec 2022 17:23:09 +0100 (CET) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id BDA7B80093 for ; Sat, 24 Dec 2022 17:23:09 +0100 (CET) Message-ID: Date: Sat, 24 Dec 2022 16:23:09 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Content-Language: en-US From: mirai Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=185.26.105.236; envelope-from=mirai@makinata.eu; helo=smtpm5.myservices.hosting X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, BITCOIN_SPAM_02=0.546, PDS_BTC_ID=0.293, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671899053; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=cHV2ufL6eRfRnwCByu3fve6QbpJf/xsoy7VcJb8+s7o=; b=uOaM6aurkqAL/jX8ln91q3Q6fH0ax0CKlb/kSLD9cApmqNE06+45aeIhNGD4CD6AnV4tsh KQnO+6a61+bfvqlf8TqqALKEU2rvv+6EuMY0j37Nh71ES0xa4bfix0Avj+6kgKADJ+0OXm vbUISQoJ0+w/qudEE1SKNyW/8d6hVWvrGeKlknnSzbT1mC+rfRVWF463NpAjAQRVh43ojc tGuoa0A3+xtsgKFsB5WEOW6RSIJmsthlSJg+RYs/+SOUhtHrn4t4I8M8NUyfQsesb9H4Qx 3/GMyL8lLMy+X9xuoG4PYjGnNkTxf8y+56QSYRA3asg4bTq2cdg6C2kWQ8ya3w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671899053; a=rsa-sha256; cv=none; b=C4GipRbd37dAn/dG0wIhyH4tNtrW2jYFafb4Dqj41GvwV+yvdU5kekH/M3Nxxxk2RPfTxO qJBoRmRZy6q3xihcAilA1h+cwDdHKUpfvk/q3Oxqwx0rNanv+tjg8n3KU18PTQ5+ckW1Hk 80yRET0DxsnLbB4r/42Q41ioKhkKb00aHfeX7+NxwEXJXN8LLnmCSJ9NTMPgQoUq+FI2EL k37BdE17AzfP4mFowNoF47yyynqlMMOkON6sFlZkA7qWHowD6YK7rd9w6tYjn29pUh3CCH /XjJDtotIR+ip34yQRIW6Lsrz7iYNeyhqw6iN6yxDouqauZGNCG6f7GXJ+GXEw== X-Spam-Score: -1.71 X-Migadu-Queue-Id: 88EECDE13 Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -1.71 X-TUID: rWzd+SsYdy3D 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]: [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]: [1671661141.6331] Read config: /gnu/store/3cp48fvxfivj2255bbxj7363qj33ajs9-NetworkManager.conf Dec 21 22:19:01 localhost NetworkManager[473]: [1671661141.6340] bus-manager: acquired D-Bus service "org.freedesktop.NetworkManager" Dec 21 22:19:01 localhost NetworkManager[473]: [1671661141.6353] manager[0xc85080]: monitoring kernel firmware directory '/lib/firmware'. Dec 21 22:19:01 localhost NetworkManager[473]: [1671661141.6357] hostname: hostname: couldn't get property from hostnamed Dec 21 22:19:01 localhost NetworkManager[473]: [1671661141.6358] hostname: static hostname changed from (none) to "doll" Dec 21 22:19:01 localhost NetworkManager[473]: [1671661141.6363] dns-mgr: init: dns=default,systemd-resolved rc-manager=resolvconf (auto) Dec 21 22:19:01 localhost NetworkManager[473]: [1671661141.6365] manager[0xc85080]: rfkill: Wi-Fi hardware radio set enabled Dec 21 22:19:01 localhost NetworkManager[473]: [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]: [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]: [1671661170.2995] device (enp4s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed') Dec 21 22:19:30 localhost NetworkManager[473]: [1671661170.2996] device (enp4s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed') Dec 21 22:19:30 localhost NetworkManager[473]: [1671661170.2998] manager: NetworkManager state is now CONNECTED_SITE Dec 21 22:19:30 localhost NetworkManager[473]: [1671661170.2999] device (enp4s0): Activation: successful, device activated. Dec 21 22:19:30 localhost NetworkManager[473]: [1671661170.3001] manager: NetworkManager state is now CONNECTED_GLOBAL Dec 21 22:19:30 localhost NetworkManager[473]: [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".