[Bug 1187782] New: YaST2 NFS server does not export file shares
https://bugzilla.suse.com/show_bug.cgi?id=1187782 Bug ID: 1187782 Summary: YaST2 NFS server does not export file shares Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.3 Hardware: x86-64 OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Network Assignee: screening-team-bugs@suse.de Reporter: jm-hotmail@hotmail.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- At the conclusion of establishing a network share with YaST2 NFS server, one must manually export the share(s), either with the command exportfs -a (or -rav, etc.), or restart the server. The Reference manual does not mention this in section 22.3 (https://doc.opensuse.org/documentation/leap/reference/html/book-reference/ch...). Could the exportfs function be added to the YaST2 process? -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1187782
Chenzi Cao
https://bugzilla.suse.com/show_bug.cgi?id=1187782
Lukas Ocilka
https://bugzilla.suse.com/show_bug.cgi?id=1187782
https://bugzilla.suse.com/show_bug.cgi?id=1187782#c1
David Diaz
https://bugzilla.suse.com/show_bug.cgi?id=1187782
David Diaz
https://bugzilla.suse.com/show_bug.cgi?id=1187782
https://bugzilla.suse.com/show_bug.cgi?id=1187782#c2
--- Comment #2 from Joel Miller
https://bugzilla.suse.com/show_bug.cgi?id=1187782
https://bugzilla.suse.com/show_bug.cgi?id=1187782#c3
--- Comment #3 from David Diaz
��� systemctl status nfs-server ��� nfs-server.service - NFS server and services Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor preset: disabled) Drop-In: /usr/lib/systemd/system/nfs-server.service.d ������options.conf /run/systemd/generator/nfs-server.service.d ������order-with-mounts.conf Active: active (exited) since Wed 2021-07-07 12:09:17 WEST; 1h 45min ago
* Opening the YaST NFS Server module * Keeping Start selected in the first screen * Go Next * Add Directory * Finish * Check the nfs-server service status again
��� systemctl status nfs-server ��� nfs-server.service - NFS server and services Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor preset: disabled) Drop-In: /usr/lib/systemd/system/nfs-server.service.d ������options.conf /run/systemd/generator/nfs-server.service.d ������order-with-mounts.conf Active: active (exited) since Wed 2021-07-07 13:58:21 WEST; 16s ago
And as far as I can see, the service was restarted. Did I misunderstand the issue? [1] https://github.com/yast/yast-nfs-server/blob/4cd97f792b2ae0b088740cba0250378... [2] https://github.com/yast/yast-nfs-server/blob/4cd97f792b2ae0b088740cba0250378... -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1187782
https://bugzilla.suse.com/show_bug.cgi?id=1187782#c4
--- Comment #4 from Joel Miller
https://bugzilla.suse.com/show_bug.cgi?id=1187782
https://bugzilla.suse.com/show_bug.cgi?id=1187782#c5
--- Comment #5 from Joel Miller
https://bugzilla.suse.com/show_bug.cgi?id=1187782
https://bugzilla.suse.com/show_bug.cgi?id=1187782#c6
--- Comment #6 from Joel Miller
https://bugzilla.suse.com/show_bug.cgi?id=1187782
https://bugzilla.suse.com/show_bug.cgi?id=1187782#c7
--- Comment #7 from Joel Miller
https://bugzilla.suse.com/show_bug.cgi?id=1187782
https://bugzilla.suse.com/show_bug.cgi?id=1187782#c8
--- Comment #8 from David Diaz
David -
Can one edit a comment after submission? I thought I did this once, but can't remember how I did it.
Joel
Sadly, I would say no, you can't. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1187782
https://bugzilla.suse.com/show_bug.cgi?id=1187782#c9
--- Comment #9 from David Diaz
https://bugzilla.suse.com/show_bug.cgi?id=1187782
https://bugzilla.suse.com/show_bug.cgi?id=1187782#c10
Josef Reidinger
https://bugzilla.suse.com/show_bug.cgi?id=1187782
https://bugzilla.suse.com/show_bug.cgi?id=1187782#c11
--- Comment #11 from Joel Miller
I haven't been able to test it yet. It's in my to-do list :)
David - Does the test you mention in this comment refer to whether the NFS server performs an export function (in addition to writing to /etc/exports)? I have been reading up on this subject and it appears that exports may not instantly reach all of the clients on a network, perhaps not surprising given how machines configure themselves on boot-up, network registration and log-in, permissions, off-line considerations, etc. Perhaps it takes at least one re-boot on all all devices before the exports in the server's /etc/exports list reaches all of the clients. Joel -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1187782
https://bugzilla.suse.com/show_bug.cgi?id=1187782#c12
--- Comment #12 from Joel Miller
https://bugzilla.suse.com/show_bug.cgi?id=1187782
https://bugzilla.suse.com/show_bug.cgi?id=1187782#c13
David Diaz
https://bugzilla.suse.com/show_bug.cgi?id=1187782
https://bugzilla.suse.com/show_bug.cgi?id=1187782#c14
David Diaz
Josef -
The denial of access is on the client machine, not the server.
Here is the workflow sequence:
1. on the server machine, created a new nfs share /z/f in YaST and followed the dialog through to completion. /etc/exports now shows the new nfs share. No errors on the server; turned to the client machine.
2. on the client machine, edited fstab on the client for the new share, using the same syntax as used for the currently-working preexisting shares.
code: 192.168.1.223:/z/f/ mnt/m9nfs/f nfs noauto,nofail,x-systemd.automount,x-systemd.mount-timeout=10,_netdev,x- systemd.idle-timeout=5min 0 0
(Since I manually edited fstab, I did not receive the x-systemd.automount unknown option error; that only occurred when I went into the YaST NFS client dialog.)
3. added folder "f" to mnt/m9fs.
4. opened Dolphin and tried to access the new share "f" - Dophin reported, "mount.nfs: access denied by server while mounting."
At the moment I need to complete a critical project and hope to then return to this issue.
Joel
I tried to reproduce the issue again by creating some exports in the server (my host machine) and then adding manually the entries in the /etc/fstab as described in comment #12 (and using the same options) in the guest (an openSUSE Tumbleweed with KDE Desktop installed in a virtual machine).
10.0.0.1:/var/log /home/dgdavid/logs nfs noauto,nofail,x-systemd.automount,x-systemd.mount-timeout=10,_netdev,x-systemd.idle-timeout=5min 0 0
"Unfortunately", the only error I got from Dolphin is
mount.nfs: failed to prepare mount: Operation not permitted
when not using the "user" option. Adding it, Dolphin was able to mount the export right away after editing the /etc/fstab file as root user.
10.0.0.1:/var/log /home/dgdavid/logs nfs user,noauto,nofail,x-systemd.automount,x-systemd.mount-timeout=10,_netdev,x-systemd.idle-timeout=5min 0 0
So, still thinking that maybe there is something I didn't understand well or there are other reasons why it is failing for Joel. Anyway, somehow I had come to the conclusion that adding the execution of the `exportfs -a` command proposed in comment #1 might not hurt... until I realized that due to the service definition in the systemd unit file for nfs-server the `exportfs -au`, `exportfs -f`, and `exportfs -r` commands are already executed when restarting the service since
��� man systemd.service
...
Service restart requests are implemented as stop operations followed by start operations. This means that ExecStop= and ExecStopPost= are executed during a service restart operation.
...
and
��� cat /usr/lib/systemd/system/nfs-server.service
...
[Service] Type=oneshot RemainAfterExit=yes ExecStartPre=-/usr/sbin/exportfs -r ExecStart=/usr/sbin/rpc.nfsd ExecStop=/usr/sbin/rpc.nfsd 0 ExecStopPost=/usr/sbin/exportfs -au ExecStopPost=/usr/sbin/exportfs -f
ExecReload=-/usr/sbin/exportfs -r
...
So, I'm not sure if there is something we can do or even if the problem is the reported problem is really related to the `exportfs` command and/or how YaST restart the nfs-server service. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1187782
https://bugzilla.suse.com/show_bug.cgi?id=1187782#c15
--- Comment #15 from Joel Miller
https://bugzilla.suse.com/show_bug.cgi?id=1187782
Stefan Hundhammer
participants (1)
-
bugzilla_noreply@suse.com