Hi,
In my simple experiment, i connected to a SHAREDFS storage server and then created a data domain But the createStorageDomain failed with code 351, which just says "Error creating a storage domain".


How to find out what the real reason behind the failure.

Surprisingly, the domain dir structure does get created, so looks like it worked, but still it gives
failure as the return result, why ?

>> Sample code...

#!/usr/bin/python
# GPLv2+

import sys
import uuid
import time

sys.path.append('/usr/share/vdsm')

import vdscli
from storage.sd import SHAREDFS_DOMAIN, DATA_DOMAIN, ISO_DOMAIN
from storage.volume import COW_FORMAT, SPARSE_VOL, LEAF_VOL, BLANK_UUID

spUUID = str(uuid.uuid4())
sdUUID = str(uuid.uuid4())
imgUUID = str(uuid.uuid4())
volUUID = str(uuid.uuid4())

print "spUUID = %s"%spUUID
print "sdUUID = %s"%sdUUID
print "imgUUID = %s"%imgUUID
print "volUUID = %s"%volUUID

gluster_conn = "llm65.in.ibm.com:myvol"

s = vdscli.connect()

masterVersion = 1
hostID = 1

def vdsOK(d):
    print d
    if d['status']['code']:
    raise Exception(str(d))
    return d

def waitTask(s, taskid):
while vdsOK(s.getTaskStatus(taskid))['taskStatus']['taskState'] != 'finished':
        time.sleep(3)
    vdsOK(s.clearTask(taskid))

vdsOK(s.connectStorageServer(SHAREDFS_DOMAIN, "my gluster mount", [dict(id=1, spec=gluster_conn, vfs_type="glusterfs", mnt_options="")]))

vdsOK(s.createStorageDomain(SHAREDFS_DOMAIN, sdUUID, "my gluster domain", gluster_conn, DATA_DOMAIN, 0))

>> Output...

./dpk-sharedfs-vm.py
spUUID = 852110d5-c3d2-456e-ae75-b72e929e9bae
sdUUID = 1c15bc91-f62b-43c8-b68a-fd2bd3ed18fe
imgUUID = c29100e7-19cd-4a27-adc6-4c35cc5e690c
volUUID = 1d074f24-8bf0-4b68-8a35-40c3f2c33723
{'status': {'message': 'OK', 'code': 0}, 'statuslist': [{'status': 0, 'id': 1}]} {'status': {'message': "Error creating a storage domain: ('storageType=6, sdUUID=1c15bc91-f62b-43c8-b68a-fd2bd3ed18fe, domainName=my gluster domain, domClass=1, typeSpecificArg=llm65.in.ibm.com:myvol domVersion=0',)", 'code': 351}}
Traceback (most recent call last):
  File "./dpk-sharedfs-vm.py", line 74, in <module>
vdsOK(s.createStorageDomain(SHAREDFS_DOMAIN, sdUUID, "my gluster domain", gluster_conn, DATA_DOMAIN, 0))
  File "./dpk-sharedfs-vm.py", line 62, in vdsOK
    raise Exception(str(d))
Exception: {'status': {'message': "Error creating a storage domain: ('storageType=6, sdUUID=1c15bc91-f62b-43c8-b68a-fd2bd3ed18fe, domainName=my gluster domain, domClass=1, typeSpecificArg=llm65.in.ibm.com:myvol domVersion=0',)", 'code': 351}}

>> But it did create the dir structure...

]# find /rhev/data-center/mnt/llm65.in.ibm.com\:myvol/
/rhev/data-center/mnt/llm65.in.ibm.com:myvol/
/rhev/data-center/mnt/llm65.in.ibm.com:myvol/1c15bc91-f62b-43c8-b68a-fd2bd3ed18fe
/rhev/data-center/mnt/llm65.in.ibm.com:myvol/1c15bc91-f62b-43c8-b68a-fd2bd3ed18fe/dom_md
/rhev/data-center/mnt/llm65.in.ibm.com:myvol/1c15bc91-f62b-43c8-b68a-fd2bd3ed18fe/dom_md/metadata
/rhev/data-center/mnt/llm65.in.ibm.com:myvol/1c15bc91-f62b-43c8-b68a-fd2bd3ed18fe/dom_md/leases
/rhev/data-center/mnt/llm65.in.ibm.com:myvol/1c15bc91-f62b-43c8-b68a-fd2bd3ed18fe/dom_md/outbox
/rhev/data-center/mnt/llm65.in.ibm.com:myvol/1c15bc91-f62b-43c8-b68a-fd2bd3ed18fe/dom_md/inbox
/rhev/data-center/mnt/llm65.in.ibm.com:myvol/1c15bc91-f62b-43c8-b68a-fd2bd3ed18fe/dom_md/ids
/rhev/data-center/mnt/llm65.in.ibm.com:myvol/1c15bc91-f62b-43c8-b68a-fd2bd3ed18fe/images

# mount | grep gluster
llm65.in.ibm.com:myvol on /rhev/data-center/mnt/llm65.in.ibm.com:myvol type fuse.glusterfs (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,max_read=131072)

_______________________________________________
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/vdsm-devel

Reply via email to