-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using the DBUS to dynamically update protocols of export, changed from 3 to 3, 4, not in effect. #1128
Comments
The logs for updating export are as follows:
|
Interesting. That dbus command isn't intended to reload the main ganesha.conf, but to load extra config snippits containing just export config, so it may not work correctly. If you are reloading the main ganesha.conf, you can send a SIGHUP to the ganesha process, and it will reload all it's config. That said, there are two places that NFS version is configured: per export, like you have above, and in NFS_CORE_PARAMS. Is you do it in the core params, it will control which sockets are actually opened, and can only be done at startup. If the core params say only 3, for example, then the socket for NFSv4 isn't opened, and you can't connect on nfsv4 without restarting Ganesha. |
Is this a design convention? |
I have 3,4 configured in NFS_CORE_PARAMS, there is also a export that supports 3,4. Complete configuration: EXPORT { EXPORT { |
No, the sockets are opened based on the Protocols setting in NFS_CORE_PARAMS, which is 3,4, so the sockets should be open. Could you try reconfiguring via SIGHUP instead of DBUS, and see if that works? |
Sorry, is which a convention? There were several distinct things in those paragraphs. |
I see what the issue is. While the DBUS update export does do some of the update, it doesn't do the PseudoFS swizzling that an update caused by SIGHUP does. This code: ` generation = get_config_generation(in_config);
` I think it would work to just drop that in after the call to report_config_errors, but not sure. The DBUS interface has received less effort than the SIGHUP because it is harder to use in some environments. |
After I modified the protocol to 3, 4, using the command: kill -HUP $(pidof ganesha.nfsd) logs:
|
In the gsh_export_update_export function, I tried to add after report_config_errors:
But it's still not working. Also, SIGHUP is not working, and for now I can only get it to work by restarting the process. |
What version of Ganesha are you using? |
6-dev.11. |
static inline bool export_can_be_mounted(struct gsh_export *exp)
} can delete codition "options & EXPORT_OPTION_NFSV4) != 0" ? |
That check verifies that the export has been configured to be exported NFSv4 |
Removing this condition can fix this issue, but I don't know of any other effects. |
https://github.com/nfs-ganesha/nfs-ganesha/wiki/DBusExports According to the official documentation, D-Bus can only dynamically update exports and cannot change the protocol version of NFS. |
I need to commit to finding a proper solution for this issue. |
My ganesha version is 6-dev.11.
Configured as:
EXPORT { Export_Id = 1; Path = /nfs; Protocols = 3; Access_Type = RW; Squash = Root_Squash; Pseudo = /nfs; FSAL { Name = VFS; } }
After starting ganesha, change the configuration to:
EXPORT { Export_Id = 1; Path = /nfs; Protocols = 3,4; Access_Type = RW; Squash = Root_Squash; Pseudo = /nfs; FSAL { Name = VFS; } }
Then use the command to modify the protocol to 3, 4, command is:
dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.UpdateExport string:/etc/ganesha/ganesha.conf string:'EXPORT(Path=/nfs)'
method return time=1630442278.232412 sender=:1.273 -> destination=:1.278 serial=603 reply_serial=2
string "1 exports updated"
When I see this return value, I think the modification was successful, but when I use v4 mount, it says that the directory does not exist.
mount -t nfs -o vers=4 localhost:/nfs /mnt/nfs
mount.nfs: mounting localhost:/nfs failed, reason given by server: No such file or directory
v3 is ok.
Also, change from 4 to 3, 4 is normal,
The text was updated successfully, but these errors were encountered: