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
Summary: [vdsm] On POSIXFS storage domain creation, if nothing is given after '/' in t...
Alias: None
Product: vdsm
Classification: oVirt
Component: General
Version: 4.17.19
Hardware: x86_64
OS: Unspecified
Target Milestone: ovirt-4.0.0-rc
: 4.18.2
Assignee: Idan Shaby
QA Contact: Elad
Depends On:
TreeView+ depends on / blocked
Reported: 2016-02-08 14:14 UTC by Elad
Modified: 2016-08-01 12:25 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1577529 (view as bug list)
Last Closed: 2016-08-01 12:25:48 UTC
oVirt Team: Storage
rule-engine: ovirt-4.0.0+
ylavi: planning_ack+
tnisan: devel_ack+
acanan: testing_ack+

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
oVirt gerrit 55182 0 master MERGED storage: fix spec normalization when mounting 2016-06-06 13:20:57 UTC
oVirt gerrit 58680 0 ovirt-4.0 MERGED tests: storageServerTests refactor 2016-06-07 09:05:57 UTC
oVirt gerrit 58681 0 ovirt-4.0 MERGED storage: fix spec normalization when mounting 2016-06-07 09:26:40 UTC

Description Elad 2016-02-08 14:14:28 UTC
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 14:44:55 UTC
Same behavior exists for NFS as well as described in bug 1228239

Comment 2 Mike McCune 2016-03-28 22:44:25 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 3 Allon Mureinik 2016-04-18 11:15:45 UTC
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 14:20:26 UTC
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 10:07:01 UTC
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 13:21:51 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 7 Yaniv Lavi 2016-05-23 13:24:36 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 8 Allon Mureinik 2016-06-07 11:56:16 UTC
Merged on the 4.0 branch, setting to MODIFIED

Comment 9 Elad 2016-07-27 12:28:31 UTC
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.