Bug 1305529 - [vdsm] On POSIXFS storage domain creation, if nothing is given after '/' in the path, the '/' is ignored in the mount command that vdsm executes
[vdsm] On POSIXFS storage domain creation, if nothing is given after '/' in t...
Product: vdsm
Classification: oVirt
Component: General (Show other bugs)
x86_64 Unspecified
high Severity high (vote)
: ovirt-4.0.0-rc
: 4.18.2
Assigned To: Idan Shaby
Depends On:
  Show dependency treegraph
Reported: 2016-02-08 09:14 EST by Elad
Modified: 2016-08-01 08:25 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-08-01 08:25:48 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.0.0+
ylavi: planning_ack+
tnisan: devel_ack+
acanan: testing_ack+

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 55182 master MERGED storage: fix spec normalization when mounting 2016-06-06 09:20 EDT
oVirt gerrit 58680 ovirt-4.0 MERGED tests: storageServerTests refactor 2016-06-07 05:05 EDT
oVirt gerrit 58681 ovirt-4.0 MERGED storage: fix spec normalization when mounting 2016-06-07 05:26 EDT

  None (edit)
Description Elad 2016-02-08 09:14:28 EST
Description of problem:
On POSIXFS storage domain creation, if nothing is given after '/' in the path, the '/' is ignored in the mount command that vdsm executes. 
For example, the following path, which has nothing after '/' is executed on vdsm without the '/':

Path =

VFS Type = ceph

jsonrpc.Executor/3::DEBUG::2016-01-26 17:51:04,338::mount::229::Storage.Misc.excCmd::(_runcmd) /usr/bin/taskset --cpu-list 0-1 /usr/bin/sudo -n /usr/bin/mount -t ceph -o name=ad
min,secret=AQC3W1dWhplVLBAARW/zKtQzjafZDKAGfVpWbQ== /rhev/data-center/mnt/ (cwd None)

This is mainly relevant for cephfs.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Try to create a POSIXFS with path that has nothing after '/'
For example:
Path =

Actual results:
mount command on vdsm is executed without the '/'

Expected results:
vdsm should execute the mount command with the exact syntax provided in the path.

Additional info:

The following syntax works while mounting manually from host:

# mount -t ceph ceph-1.qa.lab:6789:/ /mnt/cephfs/ -o name=admin,secret=<key>

(The key is not hidden in the actual mount command).

Tried to use this way for ceph based POSIX storage domain creation as follows:

Path =

VFS Type = ceph

Mount Options = name=admin,secret=<key>

The failure in vdsm.log:

jsonrpc.Executor/3::ERROR::2016-01-26 17:51:04,372::hsm::2473::Storage.HSM::(connectStorageServer) Could not connect to storageServer
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/hsm.py", line 2470, in connectStorageServer
  File "/usr/share/vdsm/storage/storageServer.py", line 234, in connect
    six.reraise(t, v, tb)
  File "/usr/share/vdsm/storage/storageServer.py", line 226, in connect
    self._mount.mount(self.options, self._vfsType, cgroup=self.CGROUP)
  File "/usr/share/vdsm/storage/mount.py", line 225, in mount
    return self._runcmd(cmd, timeout)
  File "/usr/share/vdsm/storage/mount.py", line 241, in _runcmd
    raise MountError(rc, ";".join((out, err)))
MountError: (1, 'source mount path was not specified\nfailed to resolve source\n;')

Seems that no matter how many '/' are given, vdsm ignores all if there is nothing after them. (I tried a path with '//' at the end, didn't work.)

This has to be fixed for ceph fs to work as a VFS type for POSIXFS compliant storage domain creation.
Comment 1 Tal Nisan 2016-02-08 09:44:55 EST
Same behavior exists for NFS as well as described in bug 1228239
Comment 2 Mike McCune 2016-03-28 18:44:25 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 3 Allon Mureinik 2016-04-18 07:15:45 EDT
Patch posted, but at risk for the 3.6.6 date. Pushing out to 3.6.7, as this is is not a blocker.
Comment 4 Idan Shaby 2016-04-21 10:20:26 EDT
Allon, the fix that I am working on might be too risky for 3.6.z.
I think that we should postpone it to 4.0.
Comment 5 Sandro Bonazzola 2016-05-02 06:07:01 EDT
Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA.
Comment 6 Yaniv Lavi 2016-05-23 09:21:51 EDT
oVirt 4.0 beta has been released, moving to RC milestone.
Comment 7 Yaniv Lavi 2016-05-23 09:24:36 EDT
oVirt 4.0 beta has been released, moving to RC milestone.
Comment 8 Allon Mureinik 2016-06-07 07:56:16 EDT
Merged on the 4.0 branch, setting to MODIFIED
Comment 9 Elad 2016-07-27 08:28:31 EDT
POSIXFS (ceph) storage domain creation, when nothing is given after '/' is done with the '/' in the mount command that vdsm executes.


 MainProcess|jsonrpc.Executor/3::DEBUG::2016-07-27 15:24:42,814::commands::68::root::(execCmd) /usr/bin/taskset --cpu-list 0-3 /usr/bin/mount -t ceph -o name=admin,secret=AQC76JVXuYUIMxAAudC/3dUtqhLIOSL8AUuXrQ== /rhev/data-center/mnt/ (cwd None)

Storage domain creation succeeds.

Verified using:

Note You need to log in before you can comment on or make changes to this bug.