From mboxrd@z Thu Jan 1 00:00:00 1970 From: maxim.cournoyer@gmail.com Subject: bug#39770: mount-file-system fails to mount NFS file system Date: Mon, 24 Feb 2020 14:39:13 -0500 Message-ID: <875zfvixlq.fsf@raisin.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:38951) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6JaE-0007IR-Vf for bug-guix@gnu.org; Mon, 24 Feb 2020 14:40:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6JaD-0003Rs-S4 for bug-guix@gnu.org; Mon, 24 Feb 2020 14:40:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48160) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6JaD-0003Rm-Ov for bug-guix@gnu.org; Mon, 24 Feb 2020 14:40:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j6JaD-0001Bh-Mg for bug-guix@gnu.org; Mon, 24 Feb 2020 14:40:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:38858) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6JZV-0006tz-09 for bug-guix@gnu.org; Mon, 24 Feb 2020 14:39:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6JZT-0002wy-Up for bug-guix@gnu.org; Mon, 24 Feb 2020 14:39:16 -0500 Received: from mail-qk1-x729.google.com ([2607:f8b0:4864:20::729]:43961) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6JZT-0002wV-QW for bug-guix@gnu.org; Mon, 24 Feb 2020 14:39:15 -0500 Received: by mail-qk1-x729.google.com with SMTP id p7so9733659qkh.10 for ; Mon, 24 Feb 2020 11:39:15 -0800 (PST) Received: from raisin ([2607:fad8:4:6:235e:8579:8464:aacc]) by smtp.gmail.com with ESMTPSA id t4sm6340404qkm.82.2020.02.24.11.39.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2020 11:39:14 -0800 (PST) List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: 39770@debbugs.gnu.org The mount-file-system call used in our init RAM disk (see: (gnu build file-systems)) doesn't produce the correct system call as can be demontstrated by the following C program: --8<---------------cut here---------------start------------->8--- #include #include #include #include /* int mount(const char *source, const char *target, */ /* const char *filesystemtype, unsigned long mountflags, */ /* const void *data); */ int main() { //char *src = "192.168.51.34:/mnt/scratch/yocto-sstate"; char *src = "192.168.51.34:/mnt/scratch/yocto-sstate"; char *target = "/mnt/scratch/yocto-sstate"; char *type = "nfs"; unsigned long mountflags = 0; char *data = "addr=192.168.51.34"; //file system specific options int ret = 0; ret = mount(src, target, type, mountflags, data); if (ret == -1); { int errsv = errno; printf("mount() failed with error: %s\n", strerror(errsv)); } } --8<---------------cut here---------------end--------------->8--- Running the program with strace, we can see that it failed with a connection refused error: --8<---------------cut here---------------start------------->8--- /* mount("192.168.51.34:/mnt/scratch/yocto-sstate", "/mnt/scratch/yocto-sstate", "nfs", 0, "addr=192.168.51.34") = -1 ECONNREFUSED (Connection refused) */ --8<---------------cut here---------------end--------------->8--- When having nfs-utils installed and tracing mount.nfs with: --8<---------------cut here---------------start------------->8--- strace -f -s320 mount j1-slave1.sfl.team:/mnt/scratch/yocto-dldir /mnt/scratch/yocto-dldir -t nfs --8<---------------cut here---------------end--------------->8--- We can see that the working invocation reads as: --8<---------------cut here---------------start------------->8--- mount("j1-slave1.sfl.team:/mnt/scratch/yocto-dldir", "/mnt/scratch/yocto-dldir", "nfs", 0, "vers=4.2,addr=192.168.51.34,clientaddr=192.168.49.249") --8<---------------cut here---------------end--------------->8--- It seems we're missing either a "vers" (doubtful) or more likely the "clientaddr" option. Maxim