Change in vdsm[master]: sdm: Add create_volume job

nsoffer at redhat.com nsoffer at redhat.com
Mon Apr 4 17:14:22 UTC 2016


Nir Soffer has posted comments on this change.

Change subject: sdm: Add create_volume job
......................................................................


Patch Set 15:

(4 comments)

https://gerrit.ovirt.org/#/c/50221/15/vdsm/storage/sdm/api/base.py
File vdsm/storage/sdm/api/base.py:

Line 22: 
Line 23: import logging
Line 24: 
Line 25: from vdsm import jobs
Line 26: from vdsm import exception
> Nope.  Using base exceptions from vdsm only
OK
Line 27: 
Line 28: from storage.threadLocal import vars
Line 29: 
Line 30: 


Line 34: 
Line 35:     def __init__(self, job_id, desc, host_id):
Line 36:         super(Job, self).__init__(job_id, desc)
Line 37:         self._status = jobs.STATUS.PENDING
Line 38:         self.host_id = host_id
> Right now the only way to get the host ID is to look up the domainMonitor f
OK
Line 39: 
Line 40:     def run(self):
Line 41:         self._status = jobs.STATUS.RUNNING
Line 42:         vars.job_id = self.id


https://gerrit.ovirt.org/#/c/50221/15/vdsm/storage/sdm/api/create_volume.py
File vdsm/storage/sdm/api/create_volume.py:

Line 39:         vol_format = volume.name2type(self.vol_info.vol_format)
Line 40:         self.sd_manifest.validateCreateVolumeParams(
Line 41:             vol_format, self.vol_info.parent_vol_id)
Line 42: 
Line 43:         with self.sd_manifest.domain_lock(self.host_id):
> As stated in another response, let's leave this change until after the pool
OK
Line 44:             image_res_ns = sd.getNamespace(self.sd_manifest.sdUUID,
Line 45:                                            IMAGE_NAMESPACE)
Line 46:             with rmanager.acquireResource(image_res_ns, self.vol_info.img_id,
Line 47:                                           rm.LockType.exclusive):


Line 74: 
Line 75: 
Line 76: def _required(params, name):
Line 77:     if name not in params:
Line 78:         raise ValueError("Missing required property %r" % name)
> Because InvalidParameterException is for reporting an invalid value, not a 
MissingParameter sounds good.
Line 79:     return params[name]
Line 80: 
Line 81: 
Line 82: def _enum(params, name, values):


-- 
To view, visit https://gerrit.ovirt.org/50221
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia614059f52c9625da7841ea9fbca2b2f2375cd75
Gerrit-PatchSet: 15
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Amit Aviram <aaviram at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadgett at redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list