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

alitke at redhat.com alitke at redhat.com
Wed Dec 9 22:13:28 UTC 2015


Adam Litke has posted comments on this change.

Change subject: sdm: Add create_volume_container job
......................................................................


Patch Set 1:

(4 comments)

https://gerrit.ovirt.org/#/c/50221/1/vdsm/storage/sdm/jobs/sdmJob.py
File vdsm/storage/sdm/jobs/sdmJob.py:

Line 40:         sdm_info = super(SdmJob, self).info()
Line 41:         sdm_info['extra_info'] = {'error': self._error}
Line 42:         return sdm_info
Line 43: 
Line 44:     def run(self):
> Nice! - this replace the dispatcher protection in hsm in a much nicer way.
Done
Line 45:         try:
Line 46:             self._run()
Line 47:         except se.StorageException as e:
Line 48:             self.log.exception("Job failed")


Line 44:     def run(self):
Line 45:         try:
Line 46:             self._run()
Line 47:         except se.StorageException as e:
Line 48:             self.log.exception("Job failed")
> We need here the job_id and maybe other details about the current job.
Done
Line 49:             self._status = jobs.STATUS.FAILED
Line 50:             self._error = e
Line 51:         except:
Line 52:             self.log.exception("Unhandled exception")


Line 50:             self._error = e
Line 51:         except:
Line 52:             self.log.exception("Unhandled exception")
Line 53:             self._status = jobs.STATUS.FAILED
Line 54:             self._error = self._default_error
> I would simplify this to:
Done
Line 55:         else:
Line 56:             self._status = jobs.STATUS.DONE
Line 57: 
Line 58:     @staticmethod


Line 52:             self.log.exception("Unhandled exception")
Line 53:             self._status = jobs.STATUS.FAILED
Line 54:             self._error = self._default_error
Line 55:         else:
Line 56:             self._status = jobs.STATUS.DONE
> Add finally to delete vars.job_id
Done
Line 57: 
Line 58:     @staticmethod
Line 59:     def get_domain_host_id(sd_id):
Line 60:         # FIXME: irs._obj is an ugly hack, domainMonitor needs internal locking


-- 
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: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list