TritonDataCenter / smartos-live

For more information, please see http://smartos.org/ For any questions that aren't answered there, please join the SmartOS discussion list: https://smartos.topicbox.com/groups/smartos-discuss
1.56k stars 244 forks source link

NFS mounting broken on newish LX images #994

Open sjorge opened 2 years ago

sjorge commented 2 years ago

I noticed NFS share mounting was broken when trying to upgrade to a new Ubuntu 20.04 images from 16.04 (new image, not an in place upgrade)

OS Image Provider Host Result
Ubuntu 20.04 Joyent SmartOS 20210426T094839Z Broken
Ubuntu 20.04 Joyent Omnios Bloody Broken
Ubuntu 20.04 OmniOS Omnios Bloody Broken
Ubuntu 18.04 OmniOS Omnios Bloody OK
Ubuntu 16.04 Joyent SmartOS 20210426T094839Z OK
Ubuntu 16.04 Joyent Omnios Bloody OK
Debian 9 Joyent SmartOS 20210426T094839Z OK
Debian 9 Joyent Omnios Bloody OK
Debian 10 OmniOS Omnios Bloody Broken

Doesn't look to be SmartOS specific as OmniOS has the same problem,

I noticed on I noticed rpc.statd fails to start according to systemd, however the process is running when checking with ps. I also noticed that on Ubuntu 20.04 lx_lockd isn't started, but it runs fine manually. I think mount -t nfs never gets to the state where we start lx_lockd.

I also noticed the rpc.statd failure on Ubuntu 18.04 on OmniOS but there mounting works fine. I'm guessing it's a mix of systemd and nfs-common changes that is causing the failure.

sjorge commented 2 years ago

Poke @papertigers

papertigers commented 2 years ago

I think I recall seeing something similar, I will try and trace down what's happening and how viable a fix might be.

sjorge commented 2 years ago

I think the rpc.statd one is a systemd related change https://github.com/systemd/systemd/commit/db256aab13d8a89d583ecd2bacf0aca87c66effc but I don't think that is the problem here, as it works fine in 18.04 which also has the rpc.statd issue.

papertigers commented 2 years ago

Okay I have setup one OmniOS sparse zone sharing a directory and one ubuntu 20.04 lx zone. sharemgr share -F nfs -o anon=1000,ro /share root@ubuntu20:~# mount -t nfs -o vers=4,ro 192.168.50.13:/share /share

root@ubuntu20:/share# ls
hello

How are you attempting to setup the share via systemd or /etc/fstab?

papertigers commented 2 years ago

Spoke with @sjorge over irc. It seems that mount attempts versions 4.2, 4.1, 4.0, and 3. Specifying -o vers=4 is a workaround for now. Need to do a refresh into how lx_lockd is triggered and what might be happening.

sjorge commented 2 years ago

And trying all them manually, only vers=4 works the others fail.

Adel-Magebinary commented 2 years ago

https://github.com/TritonDataCenter/smartos-live/blob/7d7d17326ae62b15612b66abb7e3d0fc504ad9f0/src/dockerinit/src/dockerinit.c#L1293

This might help?