[Bug 2059197] Re: mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x' are used together

2024-04-25 Thread Launchpad Bug Tracker
This bug was fixed in the package nfs-utils - 1:1.3.4-2.5ubuntu3.7

---
nfs-utils (1:1.3.4-2.5ubuntu3.7) focal; urgency=medium

  * Fix minor version parsing when '-t nfs4' and '-o vers=4.x' or
'-o vers=4,minorversion=x' are all used together. This fixes a
regression caused by the changes to version negotiation included
in the previous release. (LP: #2059197)
- d/p/lp-2059197-1-mount-move-handling-of-t-nfs4-into-nfs_nfs_version.patch
- d/p/lp-2059197-2-mount-Fix-problems-with-parsing-minorversion.patch
- d/p/lp-2059197-3-mount.nfs-minorversion-setting-is-being-ignored-wit.patch
- d/p/lp-2059197-4-mount.nfs-Fix-auto-protocol-negotiation.patch

 -- Matthew Ruffell   Wed, 03 Apr 2024
14:57:55 +1300

** Changed in: nfs-utils (Ubuntu Focal)
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2059197

Title:
  mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x'
  are used together

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/2059197/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 2059197] Re: mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x' are used together

2024-04-25 Thread Andreas Hasenack
Your verification showed "permission denied" when NFSv3 was attempted,
which I expect when -t nfs4 is used, but not in the -t nfs case, or when
"-t" is not used at all.

Since this is a quick check, I ran these tests:

root@j-nfs-server:~# cat /proc/fs/nfsd/versions 
-2 +3 -4 -4.0 -4.1 -4.2

Autonegotiation falls back to 3.0:
root@f-nfs-client:~# mount -t nfs j-nfs-server.vms:/storage /mnt 
root@f-nfs-client:~# mount|grep nfs
j-nfs-server.vms:/storage on /mnt type nfs 
(rw,relatime,vers=3,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.122.149,mountvers=3,mountport=42872,mountproto=udp,local_lock=none,addr=192.168.122.149)


And when the server supports them all, and I request v3 specifically, that also 
works:

root@j-nfs-server:~# cat /proc/fs/nfsd/versions 
-2 +3 +4 +4.1 +4.2

root@f-nfs-client:~# mount -t nfs j-nfs-server.vms:/storage /mnt  -o vers=3
root@f-nfs-client:~# mount | grep nfs
j-nfs-server.vms:/storage on /mnt type nfs 
(rw,relatime,vers=3,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.122.149,mountvers=3,mountport=40448,mountproto=udp,local_lock=none,addr=192.168.122.149)


And autonegotiation also still works and selects 4.2 when I just use "-t nfs" 
(not -t nfs4):
root@f-nfs-client:~# mount -t nfs j-nfs-server.vms:/storage /mnt
root@f-nfs-client:~# mount|grep nfs
j-nfs-server.vms:/storage on /mnt type nfs4 
(rw,relatime,vers=4.2,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.122.242,local_lock=none,addr=192.168.122.149)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2059197

Title:
  mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x'
  are used together

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/2059197/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 2059197] Re: mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x' are used together

2024-04-25 Thread Ryan S
This fixes my issue! https://bugs.launchpad.net/ubuntu/+source/util-
linux/+bug/2063381

nfs-common/focal-proposed,now 1:1.3.4-2.5ubuntu3.7 amd64 [installed]

Installed from proposed repo.

Mounted via pam_mount upon ssh login using krb5p; NFSv4 successful mount
with vers=4.0 which I could not do before upgrading from focal-updates
1:1.3.4-2.5ubuntu3.6

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2059197

Title:
  mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x'
  are used together

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/2059197/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 2059197] Re: mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x' are used together

2024-04-18 Thread Matthew Ruffell
Performing verification for Focal.

I started two VMs, one Jammy, which is the nfs server, and one Focal,
which is the client. I used the instructions in the testcase sections of
this bug, and also bug 2049262.

The Focal VM has nfs-common 1:1.3.4-2.5ubuntu3.6 from -updates.

Let's try the testcase for this bug, covering the regression.

$ sudo mount -t nfs4 -o vers=4.2 -vvv jammy-nfs-server:/ /mnt
mount.nfs4: timeout set for Fri Apr 19 03:12:50 2024
mount.nfs4: trying text-based options 
'vers=4.2,addr=192.168.122.109,clientaddr=192.168.122.161'
$ sudo umount /mnt
$ sudo mount -t nfs4 -o vers=4.1 -vvv jammy-nfs-server:/ /mnt
mount.nfs4: timeout set for Fri Apr 19 03:13:23 2024
mount.nfs4: trying text-based options 
'vers=4.2,addr=192.168.122.109,clientaddr=192.168.122.161'
$ sudo umount /mnt
$ sudo mount -t nfs4 -o vers=4.0 -vvv jammy-nfs-server:/ /mnt
mount.nfs4: timeout set for Fri Apr 19 03:13:30 2024
mount.nfs4: trying text-based options 
'vers=4.2,addr=192.168.122.109,clientaddr=192.168.122.161'
$ sudo umount /mnt
$ sudo mount -t nfs4 -o vers=4,minorversion=2 -vvv jammy-nfs-server:/ /mnt
mount.nfs4: timeout set for Fri Apr 19 03:13:36 2024
mount.nfs4: trying text-based options 
'minorversion=2,vers=4.2,addr=192.168.122.109,clientaddr=192.168.122.161'
$ sudo umount /mnt
$ sudo mount -t nfs4 -o vers=4,minorversion=1 -vvv jammy-nfs-server:/ /mnt
mount.nfs4: timeout set for Fri Apr 19 03:13:41 2024
mount.nfs4: trying text-based options 
'minorversion=1,vers=4.2,addr=192.168.122.109,clientaddr=192.168.122.161'
$ sudo umount /mnt
$ sudo mount -t nfs4 -o vers=4,minorversion=0 -vvv jammy-nfs-server:/ /mnt
mount.nfs4: timeout set for Fri Apr 19 03:13:47 2024
mount.nfs4: trying text-based options 
'minorversion=0,vers=4.2,addr=192.168.122.109,clientaddr=192.168.122.161'
$ sudo umount /mnt

This behaviour is wrong, as even when we specify the minorversion as .1
or .0, we always get .2, no matter what. We can reproduce the issue.

I then enabled -proposed, and installed nfs-common 1:1.3.4-2.5ubuntu3.7.

Let's retry the testcase.

$ sudo mount -t nfs4 -o vers=4.2 -vvv jammy-nfs-server:/ /mnt
mount.nfs4: timeout set for Fri Apr 19 03:17:28 2024
mount.nfs4: trying text-based options 
'vers=4.2,addr=192.168.122.109,clientaddr=192.168.122.161'
$ sudo umount /mnt
$ sudo mount -t nfs4 -o vers=4.1 -vvv jammy-nfs-server:/ /mnt
mount.nfs4: timeout set for Fri Apr 19 03:17:35 2024
mount.nfs4: trying text-based options 
'vers=4.1,addr=192.168.122.109,clientaddr=192.168.122.161'
$ sudo umount /mnt
$ sudo mount -t nfs4 -o vers=4.0 -vvv jammy-nfs-server:/ /mnt
mount.nfs4: timeout set for Fri Apr 19 03:17:40 2024
mount.nfs4: trying text-based options 
'vers=4.0,addr=192.168.122.109,clientaddr=192.168.122.161'
$ sudo umount /mnt
$ sudo mount -t nfs4 -o vers=4,minorversion=2 -vvv jammy-nfs-server:/ /mnt
mount.nfs4: timeout set for Fri Apr 19 03:17:48 2024
mount.nfs4: trying text-based options 
'vers=4,vers=4.2,addr=192.168.122.109,clientaddr=192.168.122.161'
$ sudo umount /mnt
$ sudo mount -t nfs4 -o vers=4,minorversion=1 -vvv jammy-nfs-server:/ /mnt
mount.nfs4: timeout set for Fri Apr 19 03:17:54 2024
mount.nfs4: trying text-based options 
'vers=4,vers=4.1,addr=192.168.122.109,clientaddr=192.168.122.161'
$ sudo umount /mnt
$ sudo mount -t nfs4 -o vers=4,minorversion=0 -vvv jammy-nfs-server:/ /mnt
mount.nfs4: timeout set for Fri Apr 19 03:18:01 2024
mount.nfs4: trying text-based options 
'vers=4,vers=4.0,addr=192.168.122.109,clientaddr=192.168.122.161'
$ sudo umount /mnt

This looks much better. When we specify both '-t nfs4' and '-o vers=4.x'
we get the version we asked for. The version in -proposed fixes the
issue.

Again, I will run through the original testcase for bug, 2049262:

$ sudo cat /proc/fs/nfsd/versions
-2 +3 +4 +4.1 +4.2

$ sudo mount -o vers=4 -vvv jammy-nfs-server:/ /mnt
mount.nfs: timeout set for Fri Apr 19 03:22:14 2024
mount.nfs: trying text-based options 
'vers=4.2,addr=192.168.122.109,clientaddr=192.168.122.161'
$ sudo umount /mnt
$ sudo mount -o vers=4.2 -vvv jammy-nfs-server:/ /mnt
mount.nfs: timeout set for Fri Apr 19 03:22:22 2024
mount.nfs: trying text-based options 
'vers=4.2,addr=192.168.122.109,clientaddr=192.168.122.161'
$ sudo umount /mnt
$ sudo mount -o vers=4.1 -vvv jammy-nfs-server:/ /mnt
mount.nfs: timeout set for Fri Apr 19 03:22:28 2024
mount.nfs: trying text-based options 
'vers=4.1,addr=192.168.122.109,clientaddr=192.168.122.161'
$ sudo umount /mnt
$ sudo mount -o vers=4.0 -vvv jammy-nfs-server:/ /mnt
mount.nfs: timeout set for Fri Apr 19 03:22:34 2024
mount.nfs: trying text-based options 
'vers=4.0,addr=192.168.122.109,clientaddr=192.168.122.161'
$ sudo umount /mnt

Looks OK.

$ sudo cat /proc/fs/nfsd/versions
-2 +3 +4 -4.0 +4.1 +4.2

$ sudo mount -o vers=4 -vvv jammy-nfs-server:/ /mnt
mount.nfs: timeout set for Fri Apr 19 03:24:31 2024
mount.nfs: trying text-based options 
'vers=4.2,addr=192.168.122.109,clientaddr=192.168.122.161'
$ sudo umount /mnt
$ sudo mount -o vers=4.2 -vvv 

[Bug 2059197] Re: mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x' are used together

2024-04-18 Thread Andreas Hasenack
Thanks for the detailed -o vers=x.y tests. I think we are just missing
the default case, with nothing fancy specified in the command-line.
Please also include in the test a normal without-options mount attempt,
i.e., the default.

Something like a series of these, verifying which version it ended up
using (and that the mount worked, of course):

mount server:/path /otherpath

mount -t nfs4 server:/otherpath

mount -t nfs  server:/otherpath

And also include v3 mounts please, in particular when the server does
not support v4 and the default mount command is used, without specifying
a version.

All of these could be DEP8 tests I suppose. I won't require it, but it
would be really helpful given the amount of details and checks that have
to be done manually :) Later versions of the package have more such
tests, but they were done for v2 of nfs-utils, so I'm not sure they are
straightforward backports.


** Changed in: nfs-utils (Ubuntu Focal)
   Status: In Progress => Fix Committed

** Tags added: verification-needed verification-needed-focal

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2059197

Title:
  mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x'
  are used together

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/2059197/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 2059197] Re: mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x' are used together

2024-04-11 Thread Heitor Alves de Siqueira
Thanks for the revised debdiff, Matthew! And nice work on the extensive
sanity check for the version laddering.

The new debdiff looks good, I've sponsored it for Focal. Thanks!

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2059197

Title:
  mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x'
  are used together

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/2059197/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 2059197] Re: mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x' are used together

2024-04-10 Thread Matthew Ruffell
Thanks for pointing out the missing patch Heitor. I was indeed missing
it.

Please review and sponsor the V2 debdiff.

Thanks,
Matthew

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2059197

Title:
  mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x'
  are used together

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/2059197/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 2059197] Re: mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x' are used together

2024-04-10 Thread Matthew Ruffell
Sanity testing the test package:

https://launchpad.net/~mruffell/+archive/ubuntu/lp2059197-test

nfs-common 1:1.3.4-2.5ubuntu3.6+lp2059197v20240411b1

Testcase for this bug, i.e. the regression.

$ sudo mount -t nfs4 -o vers=4.2 -vvv jammy-nfs-server:/ /mnt
mount.nfs4: timeout set for Thu Apr 11 05:14:52 2024
mount.nfs4: trying text-based options 
'vers=4.2,addr=192.168.122.14,clientaddr=192.168.122.249'

$ sudo mount -t nfs4 -o vers=4.1 -vvv jammy-nfs-server:/ /mnt
mount.nfs4: timeout set for Thu Apr 11 05:10:26 2024
mount.nfs4: trying text-based options 
'vers=4.1,addr=192.168.122.14,clientaddr=192.168.122.249'

$ sudo mount -t nfs4 -o vers=4.0 -vvv jammy-nfs-server:/ /mnt
mount.nfs4: timeout set for Thu Apr 11 05:15:02 2024
mount.nfs4: trying text-based options 
'vers=4.0,addr=192.168.122.14,clientaddr=192.168.122.249'

$ sudo mount -t nfs4 -o vers=4,minorversion=2 -vvv jammy-nfs-server:/ /mnt
mount.nfs4: timeout set for Thu Apr 11 05:15:48 2024
mount.nfs4: trying text-based options 
'vers=4,vers=4.2,addr=192.168.122.14,clientaddr=192.168.122.249'

$ sudo mount -t nfs4 -o vers=4,minorversion=1 -vvv jammy-nfs-server:/ /mnt
mount.nfs4: timeout set for Thu Apr 11 05:13:33 2024
mount.nfs4: trying text-based options 
'vers=4,vers=4.1,addr=192.168.122.14,clientaddr=192.168.122.249'

$ sudo mount -t nfs4 -o vers=4,minorversion=0 -vvv jammy-nfs-server:/ /mnt
mount.nfs4: timeout set for Thu Apr 11 05:15:54 2024
mount.nfs4: trying text-based options 
'vers=4,vers=4.0,addr=192.168.122.14,clientaddr=192.168.122.249'

Looks OK.

Testcase for the original bug, 2049262:

$ sudo cat /proc/fs/nfsd/versions
-2 +3 +4 +4.1 +4.2

$ sudo mount -o vers=4 -vvv jammy-nfs-server:/ /mnt
mount.nfs: timeout set for Thu Apr 11 05:17:55 2024
mount.nfs: trying text-based options 
'vers=4.2,addr=192.168.122.14,clientaddr=192.168.122.249'
$ sudo umount /mnt
$ sudo mount -o vers=4.2 -vvv jammy-nfs-server:/ /mnt
mount.nfs: timeout set for Thu Apr 11 05:18:01 2024
mount.nfs: trying text-based options 
'vers=4.2,addr=192.168.122.14,clientaddr=192.168.122.249'
$ sudo umount /mnt
$ sudo mount -o vers=4.1 -vvv jammy-nfs-server:/ /mnt
mount.nfs: timeout set for Thu Apr 11 05:18:05 2024
mount.nfs: trying text-based options 
'vers=4.1,addr=192.168.122.14,clientaddr=192.168.122.249'
$ sudo umount /mnt
$ sudo mount -o vers=4.0 -vvv jammy-nfs-server:/ /mnt
mount.nfs: timeout set for Thu Apr 11 05:18:12 2024
mount.nfs: trying text-based options 
'vers=4.0,addr=192.168.122.14,clientaddr=192.168.122.249'

Looks OK.

$ sudo cat /proc/fs/nfsd/versions
-2 +3 +4 -4.0 +4.1 +4.2

$ sudo mount -o vers=4 -vvv jammy-nfs-server:/ /mnt
mount.nfs: timeout set for Thu Apr 11 05:20:40 2024
mount.nfs: trying text-based options 
'vers=4.2,addr=192.168.122.14,clientaddr=192.168.122.249'
$ sudo umount /mnt
$ sudo mount -o vers=4.2 -vvv jammy-nfs-server:/ /mnt
mount.nfs: timeout set for Thu Apr 11 05:20:47 2024
mount.nfs: trying text-based options 
'vers=4.2,addr=192.168.122.14,clientaddr=192.168.122.249'
$ sudo umount /mnt
$ sudo mount -o vers=4.1 -vvv jammy-nfs-server:/ /mnt
mount.nfs: timeout set for Thu Apr 11 05:20:53 2024
mount.nfs: trying text-based options 
'vers=4.1,addr=192.168.122.14,clientaddr=192.168.122.249'
$ sudo umount /mnt
$ sudo mount -o vers=4.0 -vvv jammy-nfs-server:/ /mnt
mount.nfs: timeout set for Thu Apr 11 05:21:02 2024
mount.nfs: trying text-based options 
'vers=4.0,addr=192.168.122.14,clientaddr=192.168.122.249'
mount.nfs: mount(2): Protocol not supported
mount.nfs: Protocol not supported

Looks OK.

$ sudo cat /proc/fs/nfsd/versions
-2 +3 +4 -4.0 +4.1 -4.2

$ sudo mount -o vers=4 -vvv jammy-nfs-server:/ /mnt
mount.nfs: timeout set for Thu Apr 11 05:22:32 2024
mount.nfs: trying text-based options 
'vers=4.2,addr=192.168.122.14,clientaddr=192.168.122.249'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 
'vers=4.1,addr=192.168.122.14,clientaddr=192.168.122.249'
$ sudo umount /mnt
$ sudo mount -o vers=4.2 -vvv jammy-nfs-server:/ /mnt
mount.nfs: timeout set for Thu Apr 11 05:22:38 2024
mount.nfs: trying text-based options 
'vers=4.2,addr=192.168.122.14,clientaddr=192.168.122.249'
mount.nfs: mount(2): Protocol not supported
mount.nfs: Protocol not supported
$ sudo umount /mnt
umount: /mnt: not mounted.
$ sudo mount -o vers=4.1 -vvv jammy-nfs-server:/ /mnt
mount.nfs: timeout set for Thu Apr 11 05:22:44 2024
mount.nfs: trying text-based options 
'vers=4.1,addr=192.168.122.14,clientaddr=192.168.122.249'
$ sudo umount /mnt
$ sudo mount -o vers=4.0 -vvv jammy-nfs-server:/ /mnt
mount.nfs: timeout set for Thu Apr 11 05:22:49 2024
mount.nfs: trying text-based options 
'vers=4.0,addr=192.168.122.14,clientaddr=192.168.122.249'
mount.nfs: mount(2): Protocol not supported
mount.nfs: Protocol not supported

Looks OK.

$ sudo cat /proc/fs/nfsd/versions
-2 +3 +4 -4.1 -4.2

$ sudo mount -o vers=4 -vvv jammy-nfs-server:/ /mnt
mount.nfs: timeout set for Thu Apr 11 05:23:46 2024
mount.nfs: trying text-based options 

[Bug 2059197] Re: mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x' are used together

2024-04-10 Thread Matthew Ruffell
Attached is a new debdiff which includes the missing patch. I did
another look upstream, but I think we are okay now.

** Patch added: "Debdiff for nfs-utils on Focal V2"
   
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/2059197/+attachment/5763564/+files/lp2059197_focal_V2.debdiff

** Changed in: nfs-utils (Ubuntu Focal)
   Status: Incomplete => In Progress

** Description changed:

  [Impact]
  
  When specifying both '-t nfs4' and '-o vers=4.x' on the mount command
  line, mount.nfs ignores any specific version set with '-o vers=4.x' or
  '-o vers=4,minorversion=x', and simply attempts version negotiation,
  which due to my recent changes in bug 2049262, would land on the highest
  supported nfs version, likely 4.2.
  
  Users who specify what version they want should get the version they ask
  for, and thus, this is a regression introduced in 1:1.3.4-2.5ubuntu3.6.
  
  A workaround is to drop '-t nfs4' and to use mount.nfs directly instead,
  i.e.:
  
  $ sudo mount.nfs -o vers=4.1 -vvv jammy-nfs-server:/ /mnt
  
  [Testcase]
  
  Create two VMs, one jammy and one focal.
  
  The jammy VM will be the server.
  
  Server VM:
  $ sudo hostnamectl set-hostname jammy-nfs-server
  $ sudo apt update && sudo apt upgrade -y
  $ sudo apt install nfs-kernel-server
  $ sudo mkdir /export
  $ sudo mkdir /export/users
  $ sudo mkdir /home/users
  $ sudo vi /etc/fstab # add the following line:
  /home/users /export/users none bind 0 0
  $ sudo mount -a
  $ sudo vi /etc/exports # add the following lines:
  /export 192.168.122.0/24(rw,fsid=0,no_subtree_check,sync)
  /export/users 192.168.122.0/24(rw,nohide,insecure,no_subtree_check,sync)
  $ sudo systemctl restart nfs-server.service
  
  Focal VM:
  $ sudo hostnamectl set-hostname focal-nfs-client
  $ sudo apt update && sudo apt upgrade -y
  $ sudo apt install nfs-common
  
  And then try mounting with both '-t nfs4' and '-o vers=4.1':
  
  $ sudo mount -t nfs4 -o vers=4.1 -vvv jammy-nfs-server:/ /mnt
  mount.nfs4: timeout set for Wed Apr  3 00:51:23 2024
  mount.nfs4: trying text-based options 
'vers=4.2,addr=192.168.122.217,clientaddr=192.168.122.9'
  
  and then try with both '-t nfs4' and '-o vers=4,minorversion=1':
  
  $ sudo mount -t nfs4 -o vers=4,minorversion=1 -vvv jammy-nfs-server:/ /mnt
  mount.nfs4: timeout set for Wed Apr  3 02:19:03 2024
  mount.nfs4: trying text-based options 
'minorversion=1,vers=4.2,addr=192.168.122.217,clientaddr=192.168.122.9'
  
  In each of those mounts, it incorrectly uses protocol version 4.2,
  instead of requested 4.1.
  
  If you install the test packages in the following ppa:
  
  https://launchpad.net/~mruffell/+archive/ubuntu/lp2059197-test
  
  then vers should always be 4.1, instead of 4.2.
  
  [Where problems can occur]
  
  It is quite clear now that changing version negotiation and parsing is
  quite problematic, after the number of regressions the previous
  1:1.3.4-2.5ubuntu3.6 caused the community, and the sheer number of
  commits upstream took to resolve lingering issues.
  
  We need to be careful, to make sure we don't introduce any further
  regressions.
  
  This time, we are only changing how mount.nfs parses and processes
  command line arguments for version specification, and not changing
  version negotiation itself. This could impact NFS clients, when they go
  to mount NFS filesystems.
  
  If a regression were to occur, then users might have to manually mount
  their NFS filesystems or look into autofs. There should be no breaking
  changes to any behaviour when mounting NFS filesystems.
  
  There are no changes to nfs server.
  
  [Other Info]
  
  This was fixed multiple times, across the following three commits:
  
  commit 1e3ca7fe199531a372bb8e1c1033d8973097be50
  Author: NeilBrown 
  Date:   Wed Jul 26 13:47:42 2017 -0400
  Subject: mount: move handling of "-t nfs4" into nfs_nfs_version()
  Link: 
https://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commitdiff;h=1e3ca7fe199531a372bb8e1c1033d8973097be50
- 
+ 
  commit 050153ef6a86ff5ab06ef65be36336824a323779
  Author: NeilBrown 
  Date:   Wed Jul 26 13:51:51 2017 -0400
  Subject: mount: Fix problems with parsing minorversion=
  Link: 
https://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commitdiff;h=050153ef6a86ff5ab06ef65be36336824a323779
- 
+ 
  commit 71b807e1a69940beb31fdeb481c2e54509e8bd32
  Author: Steve Dickson 
  Date:   Thu Mar 1 13:52:47 2018 -0500
  Subject: mount.nfs: minorversion setting is being ignored with the -t flag
  Link: 
https://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commitdiff;h=71b807e1a69940beb31fdeb481c2e54509e8bd32
  
+ commit 5f32083c759b468f5b0cb9302e4fe2848d37cc5b
+ From: Steve Dickson 
+ Date: Tue, 10 Apr 2018 10:25:40 -0400
+ Subject: mount.nfs: Fix auto protocol negotiation
+ Link: 
https://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commitdiff;h=5f32083c759b468f5b0cb9302e4fe2848d37cc5b
+ 
  Jammy has all of these, and does not need any fixes.

-- 
You received this bug notification 

[Bug 2059197] Re: mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x' are used together

2024-04-10 Thread Matthew Ruffell
** Patch removed: "Debdiff for nfs-utils on Focal"
   
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/2059197/+attachment/5761398/+files/lp2059197_focal.debdiff

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2059197

Title:
  mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x'
  are used together

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/2059197/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 2059197] Re: mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x' are used together

2024-04-10 Thread Heitor Alves de Siqueira
Hi Matthew,

thanks for the quick follow-up on the regression! Being the sponsor for
the original patch in bug 2049262, I wanted to give this one some deeper
attention. Version parsing seems to have been a difficult area upstream,
with several follow-up fixes indeed, so thank you for detailing the
required commits.

I've done a double-check upstream, and noticed an additional fix that
doesn't seem to be on your list:

https://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commit;h=5f32083c759b
- 5f32083c mount.nfs: Fix auto protocol negotiation

$ git describe --contains 5f32083c759b
nfs-utils-2-3-2-rc2~9

This fixes a regression with falling back to NFSv3 on servers that don't
support v4, and was introduced by 71b807e1. Could you please confirm
whether we need to pull it in with the ones you already listed for
Focal? It's already present in Jammy and newer.

** Changed in: nfs-utils (Ubuntu Focal)
   Status: In Progress => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2059197

Title:
  mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x'
  are used together

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/2059197/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 2059197] Re: mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x' are used together

2024-04-03 Thread Jeff
Hi Matthew,

Its no problem, I can see how changing the version negotiation would be
tricky, thanks for looking at it so quickly.

Using the workaround and everything working correctly, no dramas

Thanks again,
Jeffrey

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2059197

Title:
  mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x'
  are used together

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/2059197/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 2059197] Re: mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x' are used together

2024-04-02 Thread Matthew Ruffell
Hi Jeff,

Again, I apologise for introducing this regression, but we are on our
way to getting this fixed.

The fixes are:

commit 1e3ca7fe199531a372bb8e1c1033d8973097be50
Author: NeilBrown 
Date:   Wed Jul 26 13:47:42 2017 -0400
Subject: mount: move handling of "-t nfs4" into nfs_nfs_version()
Link: 
https://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commitdiff;h=1e3ca7fe199531a372bb8e1c1033d8973097be50

commit 050153ef6a86ff5ab06ef65be36336824a323779
Author: NeilBrown 
Date:   Wed Jul 26 13:51:51 2017 -0400
Subject: mount: Fix problems with parsing minorversion=
Link: 
https://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commitdiff;h=050153ef6a86ff5ab06ef65be36336824a323779

commit 71b807e1a69940beb31fdeb481c2e54509e8bd32
Author: Steve Dickson 
Date:   Thu Mar 1 13:52:47 2018 -0500
Subject: mount.nfs: minorversion setting is being ignored with the -t flag
Link: 
https://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commitdiff;h=71b807e1a69940beb31fdeb481c2e54509e8bd32

I have built these into a test package, if you are interested in taking
a look.

Please note this package is NOT SUPPORTED by Canonical, and is for TESTING
PURPOSES ONLY. ONLY Install in a dedicated test environment.

Instructions to install (On a Focal system):
1) sudo add-apt-repository ppa:mruffell/lp2059197-test
2) sudo apt update
3) sudo apt install nfs-common
4) sudo apt-cache policy nfs-common | grep Installed
Installed: 1:1.3.4-2.5ubuntu3.6+lp2059197v20240403b1

If you try mount your share with the version specified, it should work.

I'll write back once we have a package in -proposed with the fix.

Thanks,
Matthew

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2059197

Title:
  mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x'
  are used together

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/2059197/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs