xcp-ng / xcp

Entry point for issues and wiki. Also contains some scripts and sources.
https://xcp-ng.org
1.23k stars 73 forks source link

NFS default version is hardcoded #134

Closed MrMEEE closed 5 years ago

MrMEEE commented 5 years ago

As by design, the RPM package manager overwrites all files (removes and writes new) if a package with the same name (and different, preferably newer version) is installed. Files can be "protected" from changes by using the %config parameter when creating the RPM package. This means that the files tagged as config will only be replaced, if they have not changed since installation.

The problem here is that the nfs.py contains the "DEFAULT_NFSVERSION = '3'" which defines the version of NFS you want to use. This means that if the package is updated, the configuration change will be discarded

Using %config on nfs.py will only partly solve the issue, as the file then will see no updates at all, so my suggestion would be:

1. that the file /etc/sysconfig/xensm would be created and added as a config file to the sm package, containing the line "DEFAULT_NFSVERSION = '3'". (and probably more configuration in the future)

2. nfs.py should read configuration from this file, using something like https://docs.python.org/3.4/library/configparser.html should make it pretty easy

I will see if I can get this done and pushed upstream..

MrMEEE commented 5 years ago

https://github.com/xcp-ng/xcp/issues/130#issuecomment-461398612

MrMEEE commented 5 years ago

Yeah.. it's pretty ugly..

That value is basically what defines which version the NFS share are mounted with...

Another issue is that you can't have two NFS storage shares with different versions of NFS..

MrMEEE commented 5 years ago

@stormi Do you have a timeline for when this (the stack) will be replaced?

stormi commented 5 years ago

@stormi Do you have a timeline for when this (the stack) will be replaced?

Short answer: no :)

As far as I can tell, XenServer team has been working on it for some times on smapi v3 (or v5 or whatever the current version) for some time and for example support for GFS2 relies on it. The problem is that most new developments in this area are tending to get close-sourced.

This is one of the topics our developers will address during 2019, but not all of them have been recruited yet and we're not ready to hasard any dates for the first results.

stormi commented 5 years ago

More information: SMAPI v3's code is located at https://github.com/xapi-project/xapi-storage This code is free software. However XenServer 7.6 contains a xapi-storage-plugins package that uses this new stack and is proprietary.

MrMEEE commented 5 years ago

After re-reading nfs.py, I have come to the conclusion that the functionality is already available.. but seems undocumented...

xe pbd-params-set other-config:nfsversion=4.1 should work.. I will retest and confirm this..

XOA does this already to allow NFS4.. we just have to add functionality for NFS4.1 as well

olivierlambert commented 5 years ago

@MrMEEE so please create the issue on XO repo :) Thanks!

MrMEEE commented 5 years ago

https://github.com/vatesfr/xen-orchestra/issues/3951

MrMEEE commented 5 years ago

Would be nice to get this into the Windows Client as well

borzel commented 5 years ago

@MrMEEE the door is open for your request: https://github.com/xcp-ng/xenadmin/issues

stormi commented 5 years ago

If I understand correctly, the version is not hardcoded after all, only client support (XO / xenadmin) is/was needed to be able to use the new support for 4.1. Closing this bug report then.