Wind River Support Network

HomeDefectsOVP-1357
Fixed

OVP-1357 : [vdsm] create 'POSIX compliant FS' storage domain failed due to glusterVolumeStart change the bricks uid/gid to root:root

Created: Jul 25, 2013    Updated: Mar 11, 2016
Resolved Date: Nov 25, 2013
Found In Version: 5.0.1
Fix Version: 5.0.1.10,5.0.1.8
Severity: Standard
Applicable for: Wind River Linux 5
Component/s: Userspace

Description

Problem Description
======================
create 'POSIX compliant FS' storage domain failed due to glusterVolumeStart change the bricks uid/gid to root:root

Before run glusterVolumeStart
-----------------------------------------
root@localhost:~# ls /export/ -l
...
drwxr-xr-x. 3 vdsm kvm  4096 Jul 25 07:54 brick5
drwxr-xr-x. 3 vdsm kvm  4096 Jul 25 07:54 brick6

After run glusterVolumeStart
--------------------------------------
root@localhost:~# ls /export/ -l
...
drwxr-xr-x. 3 root root 4096 Jul 25 07:54 brick5
drwxr-xr-x. 3 root root 4096 Jul 25 07:54 brick6


Expected Behavior
======================
It works well.

Observed Behavior
======================
None

Logs
======================
---- create storage domain failed vdsm.log-------
Thread-3147::DEBUG::2013-07-25 07:39:55,571::task::568::TaskManager.Task::(_updateState) Task=`aa80f310-db4d-4950-95d4-c8066fa32dbd`::moving from state init -> state preparing
Thread-3147::INFO::2013-07-25 07:39:55,571::logUtils::41::dispatcher::(wrapper) Run and protect: connectStorageServer(domType=6, spUUID='00000000-0000-0000-0000-000000000000', conList=[{'port': '', 'connection': '128.224.
165.233:gv0', 'iqn': '', 'portal': '', 'user': '', 'vfs_type': 'glusterfs', 'password': '******', 'id': '00000000-0000-0000-0000-000000000000'}], options=None)
Thread-3147::DEBUG::2013-07-25 07:39:55,573::misc::84::Storage.Misc.excCmd::(<lambda>) '/usr/bin/sudo -n /bin/mount -t glusterfs 128.224.165.233:gv0 /windriver/data-center/mnt/128.224.165.233:gv0' (cwd None)
Thread-3147::DEBUG::2013-07-25 07:39:55,754::misc::84::Storage.Misc.excCmd::(<lambda>) '/usr/bin/sudo -n /bin/umount -f -l /windriver/data-center/mnt/128.224.165.233:gv0' (cwd None)
Thread-3147::ERROR::2013-07-25 07:39:55,804::hsm::2212::Storage.HSM::(connectStorageServer) Could not connect to storageServer
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/hsm.py", line 2208, in connectStorageServer
    conObj.connect()
  File "/usr/share/vdsm/storage/storageServer.py", line 208, in connect
    fileSD.validateDirAccess(self.getMountObj().getRecord().fs_file)
  File "/usr/share/vdsm/storage/fileSD.py", line 58, in validateDirAccess
    raise se.StorageServerAccessPermissionError(dirPath)
StorageServerAccessPermissionError: Permission settings on the specified path do not allow access to the storage. Verify permission settings on the specified storage path.: 'path = /windriver/data-center/mnt/128.224.165.233:gv0'
Thread-3147::INFO::2013-07-25 07:39:55,805::logUtils::44::dispatcher::(wrapper) Run and protect: connectStorageServer, Return response: {'statuslist': [{'status': 469, 'id': '00000000-0000-0000-0000-000000000000'}]}
Thread-3147::DEBUG::2013-07-25 07:39:55,805::task::1151::TaskManager.Task::(prepare) Task=`aa80f310-db4d-4950-95d4-c8066fa32dbd`::finished: {'statuslist': [{'status': 469, 'id': '00000000-0000-0000-0000-000000000000'}]}
Thread-3147::DEBUG::2013-07-25 07:39:55,806::task::568::TaskManager.Task::(_updateState) Task=`aa80f310-db4d-4950-95d4-c8066fa32dbd`::moving from state preparing -> state finished
Thread-3147::DEBUG::2013-07-25 07:39:55,806::resourceManager::830::ResourceManager.Owner::(releaseAll) Owner.releaseAll requests {} resources {}
Thread-3147::DEBUG::2013-07-25 07:39:55,806::resourceManager::864::ResourceManager.Owner::(cancelAll) Owner.cancelAll requests {}
Thread-3147::DEBUG::2013-07-25 07:39:55,806::task::957::TaskManager.Task::(_decref) Task=`aa80f310-db4d-4950-95d4-c8066fa32dbd`::ref 0 aborting False
Thread-3148::DEBUG::2013-07-25 07:39:55,979::BindingXMLRPC::161::vds::(wrapper) [128.224.158.143]
Thread-3148::DEBUG::2013-07-25 07:39:55,980::task::568::TaskManager.Task::(_updateState) Task=`b4443188-0a2d-4972-a641-2fd1cf175752`::moving from state init -> state preparing
Thread-3148::INFO::2013-07-25 07:39:55,980::logUtils::41::dispatcher::(wrapper) Run and protect: disconnectStorageServer(domType=6, spUUID='00000000-0000-0000-0000-000000000000', conList=[{'port': '', 'connection': '128.224.165.233:gv0', 'iqn': '', 'portal': '', 'user': '', 'vfs_type': 'glusterfs', 'password': '******', 'id': '00000000-0000-0000-0000-000000000000'}], options=None)
Thread-3148::DEBUG::2013-07-25 07:39:55,980::misc::84::Storage.Misc.excCmd::(<lambda>) '/usr/bin/sudo -n /bin/umount -f -l /windriver/data-center/mnt/128.224.165.233:gv0' (cwd None)
Thread-3148::ERROR::2013-07-25 07:39:56,006::hsm::2292::Storage.HSM::(disconnectStorageServer) Could not disconnect from storageServer
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/hsm.py", line 2288, in disconnectStorageServer
    conObj.disconnect()
  File "/usr/share/vdsm/storage/storageServer.py", line 221, in disconnect
    self._mount.umount(True, True)
  File "/usr/share/vdsm/storage/mount.py", line 242, in umount
    return self._runcmd(cmd, timeout)
  File "/usr/share/vdsm/storage/mount.py", line 230, in _runcmd
    raise MountError(rc, ";".join((out, err)))
MountError: (1, ';umount: /windriver/data-center/mnt/128.224.165.233:gv0: not found\n') 

Workaround

Before create storage domain, should chown the bricks uid:gid back to vdsm:kvm manually.
Eg:
#chown vdsm:kvm /export/brick{5,6}

Steps to Reproduce

1) /data/fast_prod/wrlinuxovp-501/lv20_13sp/wrlinux-5/wrlinux/configure --enable-jobs=32 --enable-parallel-pkgbuilds=16 --enable-kernel=preempt-rt --enable-addons=wr-ovp --enable-rootfs=ovp-ovirt-node --enable-board=intel_xeon_core --with-rcpl-version=0005
2) start vdsmd service
root@localhost:~# mkdir -p /export/brick{5,6}
root@localhost:~# chown vdsm:kvm /export/brick{5,6}
root@localhost:~# ls /export/ -l     -------> check 1
root@localhost:~# vdsClient -s 0 glusterVolumeCreate volumeName=gv2 bricks=128.224.165.233:/export/brick5,128.224.165.233:/export/brick6
root@localhost:~# vdsClient -s 0  glusterVolumesList
root@localhost:~# ls /export/ -l     -------> check 2
root@localhost:~# vdsClient -s 0  glusterVolumeStart volumeName=gv2
root@localhost:~# ls /export/ -l     -------> check 3

or Create 'POSIX compliant FS' storage domain via oVirt-engine.

Misc Info
======================
1) ssl is enabled.
2) oVirt-engine with ovirt-host-deploy-v2.patch

Live chat
Online