This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
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...
Status: CLOSED CURRENTRELEASE
Product: vdsm
Classification: oVirt
Component: General (Show other bugs)
4.17.19
x86_64 Unspecified
high Severity high (vote)
: ovirt-4.0.0-rc
: 4.18.2
Assigned To: Idan Shaby
Elad
:
Depends On:
Blocks: RHEV_CEPH_AS_POSIX_DOMAIN
  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:
Environment:
Last Closed: 2016-08-01 08:25:48 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 = 10.35.65.18:/

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== 10.35.65.18: /rhev/data-center/mnt/10.35.65.18:___ (cwd None)


This is mainly relevant for cephfs.


Version-Release number of selected component (if applicable):
vdsm-4.17.19-0.el7ev.noarch

How reproducible:
Always

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


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 = 10.35.65.18:/

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
    conObj.connect()
  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 (Dary) 2016-05-23 09:21:51 EDT
oVirt 4.0 beta has been released, moving to RC milestone.
Comment 7 Yaniv Lavi (Dary) 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.

supervdsm.log:

 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== 10.35.140.90:/ /rhev/data-center/mnt/10.35.140.90:_ (cwd None)


Storage domain creation succeeds.

Verified using:
vdsm-4.18.8-1.el7ev.x86_64
libcephfs1-10.2.2-29.el7cp.x86_64
ceph-base-10.2.2-29.el7cp.x86_64
ceph-common-10.2.2-29.el7cp.x86_64
python-cephfs-10.2.2-29.el7cp.x86_64
ceph-selinux-10.2.2-29.el7cp.x86_64
rhevm-4.0.2-0.1.rc.el7ev.noarch

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