unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Bruno Victal <mirai@makinata.eu>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: 62986@debbugs.gnu.org
Subject: bug#62986: Guix System cannot shutdown when there are NFS mounts
Date: Thu, 18 May 2023 19:13:36 +0100	[thread overview]
Message-ID: <c980a04d-df8b-4d4f-d2d8-1ee1fa020765@makinata.eu> (raw)
In-Reply-To: <87edodyjpi.fsf@gmail.com>

Hi Maxim,

On 2023-04-21 04:53, Maxim Cournoyer wrote:
> Hello,
> 
> This has been reported by others in #guix as well, although we're
> currently short on details.
> 
> When an NFS mount is active at the time a shutdown is requested, the
> system hangs, and doesn't shut down.  The power button must be
> long-pressed to power off the machine.

I suspect this is because 'networking is disengaged before the NFS mount is unmounted.
Supposing that a NFS volume is mounted at /x/y/z (either manually or via a shepherd service),
probably what's happening is that the parent shepherd service of that path (be it /x/y, /x or /)
never unmounts due to the NFS child path.
It can't unmount the NFS path because:

a. manual NFS mount, 'networking has no knowledge of this and is already gone;
b. if provisioned through operating-system, since it doesn't support adding arbitrary shepherd dependencies
and it does not add 'networking to its 'requires' field, 'networking is already gone by the time it reaches here. [1]

If the NFS volume is manually unmounted (or there's some mechanism in place to unmount it before 'networking)
then no hang should occur.


[1]: Though it's tempting to simply add a 'networking dependency to any file-system-type = “nfs”, this
is not the best idea since:

a. not every service has a way to indicate that 'networking is ready (NFS mounts will fail to be automatically
mounted but in theory they should be able to unmount without interaction)
b. Interfaces that are configured outside of the 'networking service (be it manually, via custom shepherd service, etc.)
or that do not “depend” on the general idea of 'networking, such as NFS mounts using interface scoped Link-Local addresses.


Cheers,
Bruno




      reply	other threads:[~2023-05-18 18:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21  3:53 bug#62986: Guix System cannot shutdown when there are NFS mounts Maxim Cournoyer
2023-05-18 18:13 ` Bruno Victal [this message]

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=c980a04d-df8b-4d4f-d2d8-1ee1fa020765@makinata.eu \
    --to=mirai@makinata.eu \
    --cc=62986@debbugs.gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).