On Fri, Sep 02, 2011 at 11:04:52AM -0400, Thang Pham wrote:
I ran the script again, and looking at the vdsm.log, I found this error during the volume creation: a71ad655-ec9e-4452-bcbf-8cfa9ff9a548::ERROR::2011-09-02 10:47:14,587::task::875::TaskManager.Task::(_setError) Task=`a71ad655-ec9e-4452-bcbf-8cfa9ff9a548`::Unexpected error Traceback (most recent call last): File "/usr/share/vdsm/storage/task.py", line 883, in _run return fn(*args, **kargs) File "/usr/share/vdsm/storage/task.py", line 312, in run return self.cmd(*self.argslist, **self.argsdict) File "/usr/share/vdsm/storage/spm.py", line 128, in run return self.func(*args, **kwargs) File "/usr/share/vdsm/storage/spm.py", line 1009, in createVolume srcImgUUID=srcImgUUID, srcVolUUID=srcVolUUID) File "/usr/share/vdsm/storage/fileSD.py", line 180, in createVolume volUUID, desc, srcImgUUID, srcVolUUID) File "/usr/share/vdsm/storage/fileVolume.py", line 122, in create pvol = FileVolume(repoPath, sdUUID, srcImgUUID, srcVolUUID) File "/usr/share/vdsm/storage/fileVolume.py", line 45, in __init__ volume.Volume.__init__(self, repoPath, sdUUID, imgUUID, volUUID) File "/usr/share/vdsm/storage/volume.py", line 117, in __init__ raise se.InvalidParameterException("imgUUID", imgUUID) InvalidParameterException: Invalid parameter: 'imgUUID=None' a71ad655-ec9e-4452-bcbf-8cfa9ff9a548::DEBUG::2011-09-02 10:47:14,590::task::894::TaskManager.Task::(_run) Task=`a71ad655-ec9e-4452-bcbf-8cfa9ff9a548`::Task._run: a71ad655-ec9e-4452-bcbf-8cfa9ff9a548 () {} failed - stopping task a71ad655-ec9e-4452-bcbf-8cfa9ff9a548::DEBUG::2011-09-02 10:47:14,590::task::1229::TaskManager.Task::(stop) Task=`a71ad655-ec9e-4452-bcbf-8cfa9ff9a548`::stopping in state running (force False) a71ad655-ec9e-4452-bcbf-8cfa9ff9a548::DEBUG::2011-09-02 10:47:14,590::task::1000::TaskManager.Task::(_decref) Task=`a71ad655-ec9e-4452-bcbf-8cfa9ff9a548`::ref 1 aborting True a71ad655-ec9e-4452-bcbf-8cfa9ff9a548::DEBUG::2011-09-02 10:47:14,591::task::925::TaskManager.Task::(_runJobs) Task=`a71ad655-ec9e-4452-bcbf-8cfa9ff9a548`::aborting: Task is aborted: "Invalid parameter: 'imgUUID=None'" - code 100
It appears that it does not like what I put into the imgUUID, which was generated using the following code: imgUUID = str(uuid.uuid4())
But the imgUUID was not set to "None", which was what it interpreted. Is there some other parameter missing for createVolume? sizeGiB = 20 imgUUID = str(uuid.uuid4()) volUUID = str(uuid.uuid4()) s.createVolume(sdUUID, spUUID, imgUUID, sizeGiB, COW_FORMAT, SPARSE_VOL, LEAF_VOL, volUUID, "My volume")
Thang, have you resolved this issue by now? I believe it would be solved if you pass two more args to createVolume, or apply the following patch to Vdsm:
--- a/vdsm/storage/spm.py +++ b/vdsm/storage/spm.py @@ -1410,7 +1410,7 @@ class SPM: self.log.warning("spm.uploadVolume: SP %s SD %s img %s Vol %s - teardown failed")
- def public_createVolume(self, sdUUID, spUUID, imgUUID, size, volFormat, preallocate, diskType, volUUID, desc, srcImgUUID=None, srcVolUUID=None): + def public_createVolume(self, sdUUID, spUUID, imgUUID, size, volFormat, preallocate, diskType, volUUID, desc, srcImgUUID=volume.BLANK_UUID, srcVolUUID=volume.BLANK_UUID): """ Create a new volume Function Type: SPM
Does this solve the problem for you?
Dan.