Change in vdsm[master]: virt: add run_async helper

2016-02-23 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 14:

no longer needed but still pretty nice piece of code I would say. Pity that 
gerrit doesn't have *Archive* feature :-)

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 14
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2016-02-23 Thread fromani
Francesco Romani has abandoned this change.

Change subject: virt: add run_async helper
..


Abandoned

no longer needed

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 14
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2016-02-23 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 14:

* Update tracker: IGNORE, no Bug-Url found

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 14
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2016-02-18 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 14: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 14
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2016-02-18 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 14:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 14
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2016-02-17 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 13:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 13
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2016-02-16 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 11:

(3 comments)

https://gerrit.ovirt.org/#/c/49570/11//COMMIT_MSG
Commit Message:

Line 11: support
> supportS
Done


Line 15: used
> drop
Done


Line 16: data
> s/data/code/ (this is not LISP [yet])
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2016-02-16 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 12:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 12
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2016-02-16 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 11:

(1 comment)

https://gerrit.ovirt.org/#/c/49570/11/tests/vmUtilsTests.py
File tests/vmUtilsTests.py:

Line 184: utils.run_async(self._helper, resource=self.sem)
: self.assertTrue(self.done.wait(1.))
please scan the test code if there is a better way to do this


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2016-02-16 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 11: Code-Review-1

(3 comments)

https://gerrit.ovirt.org/#/c/49570/11//COMMIT_MSG
Commit Message:

Line 11: support
supportS


Line 15: used
drop


Line 16: data
s/data/code/ (this is not LISP [yet])


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2016-02-09 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 10: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2016-02-09 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 11:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2016-02-02 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 10:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2016-01-29 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 9:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2016-01-27 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 8:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2016-01-22 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 5:

(1 comment)

https://gerrit.ovirt.org/#/c/49570/5/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 680: self.updateDriveIndex(drv)
Line 681: 
Line 682: return [drv for order, drv in drives]
Line 683: 
Line 684: def run(self, spawn=run_async):
> I'll save this for now, to avoid circular dependencies.
the return value is supposed to be used in clientIF, changing the patch to 
demonstrate this.
Line 685: try:
Line 686: spawn(self._startUnderlyingVm)
Line 687: except AsyncStartError as ex:
Line 688: return response.error(ex.error)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2016-01-22 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 6:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2016-01-22 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 5:

(1 comment)

https://gerrit.ovirt.org/#/c/49570/5/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 680: self.updateDriveIndex(drv)
Line 681: 
Line 682: return [drv for order, drv in drives]
Line 683: 
Line 684: def run(self, spawn=run_async):
> Yes, I'd like to use this in cif/API.py.
I'll save this for now, to avoid circular dependencies.
Line 685: try:
Line 686: spawn(self._startUnderlyingVm)
Line 687: except AsyncStartError as ex:
Line 688: return response.error(ex.error)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2016-01-22 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 7:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-14 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 5: Code-Review-1

(1 comment)

will simplify a bit more, let's save changes for the next patches.

https://gerrit.ovirt.org/#/c/49570/5/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 680: self.updateDriveIndex(drv)
Line 681: 
Line 682: return [drv for order, drv in drives]
Line 683: 
Line 684: def run(self, spawn=run_async):
> this method didn't return anything before (it seems), do you utilize this n
Yes, I'd like to use this in cif/API.py.
The alternative is to let the exception bubble up.
For this patch maybe better just having the latter way, let me update this.
Line 685: try:
Line 686: spawn(self._startUnderlyingVm)
Line 687: except AsyncStartError as ex:
Line 688: return response.error(ex.error)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-11 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 5:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-11 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 4:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-11 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 4:

Rebase and fix the docstring mistakes kindly pointed out by Milan.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-11 Thread mzamazal
Milan Zamazal has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 5: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-11 Thread mzamazal
Milan Zamazal has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 3:

(1 comment)

https://gerrit.ovirt.org/#/c/49570/3/vdsm/virt/utils.py
File vdsm/virt/utils.py:

Line 137: If `logger` is set, unhandled exceptions which occurs
Line 138: after the execution is succesfully started will be logged
Line 139: on this logger; Otherwise the root logger will be used.
Line 140: If `resource' is not None, run_async will acquire it
Line 141: before to start the `func' callable, and will
> Done
Omitted this one actually?
Line 142: release it once `func' exits.
Line 143: `resource' must support the threading.Semaphore protocol.
Line 144: If `error' is not None, it will be used as argument of
Line 145: AsyncStartError.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-11 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 3:

(1 comment)

https://gerrit.ovirt.org/#/c/49570/3/vdsm/virt/utils.py
File vdsm/virt/utils.py:

Line 137: If `logger` is set, unhandled exceptions which occurs
Line 138: after the execution is succesfully started will be logged
Line 139: on this logger; Otherwise the root logger will be used.
Line 140: If `resource' is not None, run_async will acquire it
Line 141: before to start the `func' callable, and will
> Omitted this one actually?
just missed a ':w' :(
Line 142: release it once `func' exits.
Line 143: `resource' must support the threading.Semaphore protocol.
Line 144: If `error' is not None, it will be used as argument of
Line 145: AsyncStartError.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-11 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 3:

(5 comments)

https://gerrit.ovirt.org/#/c/49570/3/vdsm/virt/utils.py
File vdsm/virt/utils.py:

Line 133: """
Line 134: Execute one callable, `func', in a background thread.
Line 135: If `name' is not None, set it as the thread name.
Line 136: If `daemon' is True, create a daemon thread.
Line 137: If `logger` is set, unhandled exceptions which occurs
> ... occur
Done
Line 138: after the execution is succesfully started will be logged
Line 139: on this logger; Otherwise the root logger will be used.
Line 140: If `resource' is not None, run_async will acquire it
Line 141: before to start the `func' callable, and will


Line 134: Execute one callable, `func', in a background thread.
Line 135: If `name' is not None, set it as the thread name.
Line 136: If `daemon' is True, create a daemon thread.
Line 137: If `logger` is set, unhandled exceptions which occurs
Line 138: after the execution is succesfully started will be logged
> ... execution _was_ succes_s_fully started ...
Done
Line 139: on this logger; Otherwise the root logger will be used.
Line 140: If `resource' is not None, run_async will acquire it
Line 141: before to start the `func' callable, and will
Line 142: release it once `func' exits.


Line 135: If `name' is not None, set it as the thread name.
Line 136: If `daemon' is True, create a daemon thread.
Line 137: If `logger` is set, unhandled exceptions which occurs
Line 138: after the execution is succesfully started will be logged
Line 139: on this logger; Otherwise the root logger will be used.
> ... otherwise ...
Done
Line 140: If `resource' is not None, run_async will acquire it
Line 141: before to start the `func' callable, and will
Line 142: release it once `func' exits.
Line 143: `resource' must support the threading.Semaphore protocol.


Line 137: If `logger` is set, unhandled exceptions which occurs
Line 138: after the execution is succesfully started will be logged
Line 139: on this logger; Otherwise the root logger will be used.
Line 140: If `resource' is not None, run_async will acquire it
Line 141: before to start the `func' callable, and will
> before starting the ...
Done
Line 142: release it once `func' exits.
Line 143: `resource' must support the threading.Semaphore protocol.
Line 144: If `error' is not None, it will be used as argument of
Line 145: AsyncStartError.


Line 141: before to start the `func' callable, and will
Line 142: release it once `func' exits.
Line 143: `resource' must support the threading.Semaphore protocol.
Line 144: If `error' is not None, it will be used as argument of
Line 145: AsyncStartError.
> AsyncStartError (in case the thread could not be started).
Done
Line 146: """
Line 147: starting_error = [None]
Line 148: started = threading.Event()
Line 149: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-11 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 5: Verified+1

tested the unthrottled path using patched VDSM running (and migrating) vms. 
Tested the other paths using unit tests.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-11 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 5:

Martin, please share your thoughts!

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-11 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 5: Code-Review+1

(1 comment)

Nice job! I really like the simplification over the previous implementations.

https://gerrit.ovirt.org/#/c/49570/5/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 680: self.updateDriveIndex(drv)
Line 681: 
Line 682: return [drv for order, drv in drives]
Line 683: 
Line 684: def run(self, spawn=run_async):
this method didn't return anything before (it seems), do you utilize this new 
return value somewhere? cif/API.py?
Line 685: try:
Line 686: spawn(self._startUnderlyingVm)
Line 687: except AsyncStartError as ex:
Line 688: return response.error(ex.error)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-04 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 3:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-04 Thread mzamazal
Milan Zamazal has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 3:

(5 comments)

Documentation better now, I still suggest some fixes run_async docstring, see 
the comments.

https://gerrit.ovirt.org/#/c/49570/3/vdsm/virt/utils.py
File vdsm/virt/utils.py:

Line 133: """
Line 134: Execute one callable, `func', in a background thread.
Line 135: If `name' is not None, set it as the thread name.
Line 136: If `daemon' is True, create a daemon thread.
Line 137: If `logger` is set, unhandled exceptions which occurs
... occur
Line 138: after the execution is succesfully started will be logged
Line 139: on this logger; Otherwise the root logger will be used.
Line 140: If `resource' is not None, run_async will acquire it
Line 141: before to start the `func' callable, and will


Line 134: Execute one callable, `func', in a background thread.
Line 135: If `name' is not None, set it as the thread name.
Line 136: If `daemon' is True, create a daemon thread.
Line 137: If `logger` is set, unhandled exceptions which occurs
Line 138: after the execution is succesfully started will be logged
... execution _was_ succes_s_fully started ...
Line 139: on this logger; Otherwise the root logger will be used.
Line 140: If `resource' is not None, run_async will acquire it
Line 141: before to start the `func' callable, and will
Line 142: release it once `func' exits.


Line 135: If `name' is not None, set it as the thread name.
Line 136: If `daemon' is True, create a daemon thread.
Line 137: If `logger` is set, unhandled exceptions which occurs
Line 138: after the execution is succesfully started will be logged
Line 139: on this logger; Otherwise the root logger will be used.
... otherwise ...
Line 140: If `resource' is not None, run_async will acquire it
Line 141: before to start the `func' callable, and will
Line 142: release it once `func' exits.
Line 143: `resource' must support the threading.Semaphore protocol.


Line 137: If `logger` is set, unhandled exceptions which occurs
Line 138: after the execution is succesfully started will be logged
Line 139: on this logger; Otherwise the root logger will be used.
Line 140: If `resource' is not None, run_async will acquire it
Line 141: before to start the `func' callable, and will
before starting the ...
Line 142: release it once `func' exits.
Line 143: `resource' must support the threading.Semaphore protocol.
Line 144: If `error' is not None, it will be used as argument of
Line 145: AsyncStartError.


Line 141: before to start the `func' callable, and will
Line 142: release it once `func' exits.
Line 143: `resource' must support the threading.Semaphore protocol.
Line 144: If `error' is not None, it will be used as argument of
Line 145: AsyncStartError.
AsyncStartError (in case the thread could not be started).
Line 146: """
Line 147: starting_error = [None]
Line 148: started = threading.Event()
Line 149: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-03 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 2:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-03 Thread mzamazal
Milan Zamazal has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 2:

(3 comments)

https://gerrit.ovirt.org/#/c/49570/2/vdsm/virt/utils.py
File vdsm/virt/utils.py:

Line 121: 
Line 122: 
Line 123: class AsyncStartError(Exception):
Line 124: """
Line 125: Impossible to start the execution of a callable.
... the asynchronous execution ...
Line 126: """
Line 127: def __init__(self, error):
Line 128: self.error = error
Line 129: 


Line 131: def run_async(func, name=None, daemon=False, logger=None,
Line 132:   semaphore=None, error='failed to start'):
Line 133: """
Line 134: Execute one callable, `func', in a background thread.
Line 135: If `name' is not None set, set thread name.
Better: If `name' is not None, set it as the thread name.
Line 136: If `daemon' is True, create a daemon thread.
Line 137: If `logger` is set, unhandled exceptions which occurs
Line 138: after the execution started will be logged on this logger;
Line 139: Otherwise the root logger will be used.


Line 141: sempahore before to start the `func' callable, and will
Line 142: release it once `func' exits.
Line 143: If `error' is not None, will use as return value to
Line 144: feed AsyncStartError.
Line 145: """
Please edit the whole docstring, there are several typos and grammar problems 
there, making it difficult to read.
Line 146: starting_error = [None]
Line 147: started = threading.Event()
Line 148: 
Line 149: def _throttle():


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-03 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 2: Verified+1

verified no regression running a couple of VMs.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-03 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 2: Code-Review-1

need to address Milan's comments.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-02 Thread mzamazal
Milan Zamazal has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 1:

(2 comments)

Looks nice to me. Just docstrings are missing and see my comments on tests.

https://gerrit.ovirt.org/#/c/49570/1/tests/vmUtilsTests.py
File tests/vmUtilsTests.py:

Line 169: def test_ignores_error(self):
Line 170: def helper():
Line 171: raise RuntimeError("Async() doesn't care")
Line 172: 
Line 173: error = utils.run_async(helper)
run_async doesn't return anything. Technically, it should return None, so the 
test is formally OK, but it's misleading. Let's just check it doesn't raise an 
exception.
Line 174: self.assertEqual(error, None)
Line 175: 
Line 176: 
Line 177: class RunAsyncThrottledTests(TestCaseBase):


Line 179: def setUp(self):
Line 180: self.sem = threading.BoundedSemaphore(1)
Line 181: 
Line 182: def test_do(self):
Line 183: 
Please use less blank lines (IMHO none are needed inside such short methods, 
even around inner single-line functions).
Line 184: done = threading.Event()
Line 185: 
Line 186: def helper():
Line 187: done.set()


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-02 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 1:

(2 comments)

https://gerrit.ovirt.org/#/c/49570/1/tests/vmUtilsTests.py
File tests/vmUtilsTests.py:

Line 169: def test_ignores_error(self):
Line 170: def helper():
Line 171: raise RuntimeError("Async() doesn't care")
Line 172: 
Line 173: error = utils.run_async(helper)
> run_async doesn't return anything. Technically, it should return None, so t
Right, this is a relic of a past version
Line 174: self.assertEqual(error, None)
Line 175: 
Line 176: 
Line 177: class RunAsyncThrottledTests(TestCaseBase):


Line 179: def setUp(self):
Line 180: self.sem = threading.BoundedSemaphore(1)
Line 181: 
Line 182: def test_do(self):
Line 183: 
> Please use less blank lines (IMHO none are needed inside such short methods
Right, sneaked in between revisions.
Line 184: done = threading.Event()
Line 185: 
Line 186: def helper():
Line 187: done.set()


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-02 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 1:

OK, this is the final form, ready for reviews, and candidate for merging when 
everyone's happy.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2015-12-02 Thread fromani
Francesco Romani has uploaded a new change for review.

Change subject: virt: add run_async helper
..

virt: add run_async helper

Introduce the run_async function, to run one-shot long operations in
background.
run_async support the same arguments as concurrent.thread.

It comes on two flavours:
- if the `semaphore' argument is None: acts just as thin wrapper around
  concurrent.thread(). This helps used to have a common API and to
  factor out the common data

- if the `semaphore' argument is not None, tries to acquire it before
  to spawn the callable, and releases when the callable ends.
  This is useful to throttle the executions of the callable, and it will
  be used by a future patch which wants to throttle the incoming migrations,
  which maps to a VM creation flow.

  if run_async runs in throttling mode, and fails to acquire the
  semaphore, uses the argument of the `error' parameter.
  If it is not None, raises AsyncStartError holding that value.

Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Wiki: http://www.ovirt.org/Features/Migration_Enhancements
Signed-off-by: Francesco Romani 
---
M tests/vmUtilsTests.py
M vdsm/virt/utils.py
M vdsm/virt/vm.py
3 files changed, 96 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/70/49570/1

diff --git a/tests/vmUtilsTests.py b/tests/vmUtilsTests.py
index a4e4534..3fda2e6 100644
--- a/tests/vmUtilsTests.py
+++ b/tests/vmUtilsTests.py
@@ -18,6 +18,8 @@
 # Refer to the README and COPYING files for full details of the license
 #
 
+import threading
+
 from virt import utils
 from virt import vm
 from virt import vmexitreason
@@ -151,3 +153,50 @@
 @permutations([[-1], [1023]])
 def test_eventToString_unknown_event(self, code):
 self.assertTrue(vm.eventToString(code))
+
+
+class RunAsyncTests(TestCaseBase):
+
+def test_do(self):
+done = threading.Event()
+
+def helper():
+done.set()
+
+utils.run_async(helper)
+self.assertTrue(done.wait(1.))
+
+def test_ignores_error(self):
+def helper():
+raise RuntimeError("Async() doesn't care")
+
+error = utils.run_async(helper)
+self.assertEqual(error, None)
+
+
+class RunAsyncThrottledTests(TestCaseBase):
+
+def setUp(self):
+self.sem = threading.BoundedSemaphore(1)
+
+def test_do(self):
+
+done = threading.Event()
+
+def helper():
+done.set()
+
+utils.run_async(helper, semaphore=self.sem)
+self.assertTrue(done.wait(1.))
+
+def test_raises_if_busy(self):
+
+def helper():
+pass
+
+with self.sem:
+self.assertRaises(utils.AsyncStartError,
+  utils.run_async,
+  helper,
+  semaphore=self.sem,
+  error='fake error')
diff --git a/vdsm/virt/utils.py b/vdsm/virt/utils.py
index 55a60c6..c2298dd 100644
--- a/vdsm/virt/utils.py
+++ b/vdsm/virt/utils.py
@@ -26,6 +26,7 @@
 import threading
 
 from vdsm.utils import monotonic_time, rmFile
+from vdsm import concurrent
 
 
 def isVdsmImage(drive):
@@ -117,3 +118,41 @@
 if os.path.islink(sock):
 rmFile(os.path.realpath(sock))
 rmFile(sock)
+
+
+class AsyncStartError(Exception):
+def __init__(self, error):
+self.error = error
+
+
+def run_async(func, name=None, daemon=False, logger=None,
+  semaphore=None, error=None):
+starting_error = [None]
+started = threading.Event()
+
+def _throttle():
+acquired = semaphore.acquire(False)
+if acquired:
+started.set()
+try:
+func()
+finally:
+semaphore.release()
+else:
+starting_error[0] = error
+started.set()
+
+def _run():
+if semaphore is None:
+started.set()
+func()
+else:
+_throttle()
+
+thread = concurrent.thread(
+_run, name=name, daemon=daemon, logger=logger)
+thread.start()
+
+started.wait()
+if starting_error[0] is not None:
+raise AsyncStartError(starting_error[0])
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 8ec8b1d..d55eed7 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -36,7 +36,6 @@
 import libvirt
 
 # vdsm imports
-from vdsm import concurrent
 from vdsm import constants
 from vdsm import libvirtconnection
 from vdsm import netinfo
@@ -78,6 +77,7 @@
 from .vmxml import METADATA_VM_TUNE_URI, METADATA_VM_TUNE_ELEMENT
 from .vmxml import METADATA_VM_TUNE_PREFIX
 
+from .utils import run_async, AsyncStartError
 from .utils import isVdsmImage, cleanup_guest_socket
 from vmpowerdown import VmShutdown, VmReboot
 
@@ -278,7 +278,6 @@
 self._confLock = threading.Lock()
 self._jobsLock = threading.Lock()
 

Change in vdsm[master]: virt: add run_async helper

2015-12-02 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 1:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches