ronivay / XenOrchestraInstallerUpdater

Xen Orchestra install/update script
GNU General Public License v3.0
1.24k stars 193 forks source link

Can't mount SMB remote share on XO installed on CentOS Stream 9 #237

Closed SurtursRevenge closed 4 months ago

SurtursRevenge commented 6 months ago

OS Version: CentOS Stream 9 Node.js version: 18.20.2 Yarn version: 1.22.19

Server specs 8 vCPU 16 GB RAM

Issue when trying to add a smb remote in xo as remote repo ( Settings -> Remote) i get a "Unhandled remote type" error. The same share is working on the official XOA. So i assume there i a component missing in the install script that handles the smb mount on linux ?

Installation logfile remote.test { "id": "dcb02134-dd9a-456c-b1cb-5399548a5644" } { "message": "Unhandled remote type", "name": "Error", "stack": "Error: Unhandled remote type at getHandler (/opt/xo/xo-builds/xen-orchestra-202405081601/@xen-orchestra/fs/src/index.js:24:11) at _class2.getRemoteHandler (file:///opt/xo/xo-builds/xen-orchestra-202405081601/packages/xo-server/src/xo-mixins/remotes.mjs:107:17) at _class2.testRemote (file:///opt/xo/xo-builds/xen-orchestra-202405081601/packages/xo-server/src/xo-mixins/remotes.mjs:131:11) at Api.#callApiMethod (file:///opt/xo/xo-builds/xen-orchestra-202405081601/packages/xo-server/src/xo-mixins/api.mjs:366:20)" }

ronivay commented 6 months ago

Hey,

cifs-utils pkg is installed to rhel variants which should be enough to handle SMB remotes. Can you confirm your XO installation is on the latest version? You could test mounting the SMB share manually on the server without XO involved which might reveal more details if there's indeed an issue with SMB remotes in general. This could be eq. SELinux issue, which is not a thing in XOA and this script doesn't (and won't) do any SELinux changes.

SurtursRevenge commented 6 months ago

Hey,

xoa is the latest Release. This is a fresh installed and patched Server. Selinux is disabled for testing. When manual mounting the smb Share it works. Maybe some nodejs module is missing ?

Best regards

ronivay commented 6 months ago

Do you have a change to test this with Debian to verify that this indeed only affects Centos (and potentially other RHEL variants)? You could use eq. the xo-vm-import.sh script here to quickly setup one.

SurtursRevenge commented 6 months ago

Hi,

i setup a debian VM. There the mount is working, so it must be a rhel specific error

github-actions[bot] commented 5 months ago

This issue has been open for 14 days without activity. It will be closed in 5 days if not updated

github-actions[bot] commented 5 months ago

This issue has been open for 14 days without activity. It will be closed in 5 days if not updated

SurtursRevenge commented 5 months ago

Hi,

today i updated to the latest version with your script on debian 12. Now the remote mounts are also broken on debian. I checked the apt logs and the way a yarn and nodejs update

Start-Date: 2024-06-25 15:05:56 Commandline: apt-get install -y nodejs Upgrade: nodejs:amd64 (18.20.3-1nodesource1, 20.15.0-1nodesource1) End-Date: 2024-06-25 15:06:10

Start-Date: 2024-06-25 15:06:40 Commandline: apt upgrade Upgrade: yarn:amd64 (1.22.19-1, 1.22.22-1) End-Date: 2024-06-25 15:06:41

SurtursRevenge commented 4 months ago

I did some further testing on debian. When running as xoa user the Mount fails. When changing the Setup to run as root the Mount works again. Have to confirm this on CentOS later.

ronivay commented 4 months ago

Do you have the USESUDO (and GENSUDO) option(s) set to true in this script's cfg file? Sudo is required for mounting when running as non-privileged user.

github-actions[bot] commented 4 months ago

This issue has been open for 14 days without activity. It will be closed in 5 days if not updated

ronivay commented 4 months ago

Please comment if this needs to be reopened after verifying if this happens with sudo configured properly as well.