Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-22 Thread danken
Dan Kenigsberg has submitted this change and it was merged.

Change subject: vm: fix _dom access when QEMU is dying
..


vm: fix _dom access when QEMU is dying

commit 8fedf8bde3c28edb07add23c3e9b72681cb48e49 introduced a tiny
window for races between libvirt notifications (vm._onQemuDeath)
and polling for stats from engine.

This is demonstrated by bz1073478, but it really boils down
to how events are serialized.
In this case, a stats request from engine is being answered
while QEMU is being reported down and the _dom handle is being
shut down, we end up with an uncaught exception.

This patch address the reported race between polling and qemu death.
The window of vulnerability is (supposed to be) tiny
and the issue itself is hard to reproduce.

Sampling thread is theorically vulnerable to the a race of the
same type, but this problem will be addressed in a separate
patch.

Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Bug-Url: https://bugzilla.redhat.com/1073478
Signed-off-by: Francesco Romani 
Reviewed-on: http://gerrit.ovirt.org/26539
Reviewed-by: Dan Kenigsberg 
---
M tests/vmTests.py
M vdsm/virt/vm.py
2 files changed, 56 insertions(+), 3 deletions(-)

Approvals:
  Dan Kenigsberg: Looks good to me, approved
  Francesco Romani: Verified



-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-21 Thread danken
Dan Kenigsberg has posted comments on this change.

Change subject: vm: fix _dom access when QEMU is dying
..


Patch Set 6: Code-Review+2

-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-21 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: vm: fix _dom access when QEMU is dying
..


Patch Set 6:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/8204/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/8317/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/7414/ : SUCCESS

-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-21 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: vm: fix _dom access when QEMU is dying
..


Patch Set 6: Verified+1

Patch set 5: please ignore, typos in the tests :(
Patch set 5: added a couple of tests to check the exception path,
and found a typo (self._log vs self.log - the latter is correct).

Verified the happy path using vdsClient;
unit tests now covers the exception path, so ticking verified.

Please let me know if we need additional verification.

-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-21 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: vm: fix _dom access when QEMU is dying
..


Patch Set 5: Code-Review-1 Verified-1

Build Failed 

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/8203/ : UNSTABLE

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/8316/ : FAILURE

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/7413/ : SUCCESS

-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-16 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: vm: fix _dom access when QEMU is dying
..


Patch Set 4:

Build Failed 

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/8112/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/8225/ : FAILURE

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/7322/ : SUCCESS

-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-16 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: vm: fix _dom access when QEMU is dying
..


Patch Set 3:

(1 comment)

http://gerrit.ovirt.org/#/c/26539/3/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 4323: try:
Line 4324: cur_mem = self._dom.info()[2]
Line 4325: except (AttributeError, TypeError):
Line 4326: # _dom may be None (race on shutdown);
Line 4327: # if info() fails, returns None
> A quick review of my /usr/lib64/python2.7/site-packages/libvirt.py shows th
Right. I just looked at the C wrapper and lost an important bit. Fixing.
Line 4328: self._log.exception(
Line 4329: 'failed to retrieve the balloon stats')
Line 4330: cur_mem = 0
Line 4331: return {'balloon_max': str(max_mem),


-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-16 Thread danken
Dan Kenigsberg has posted comments on this change.

Change subject: vm: fix _dom access when QEMU is dying
..


Patch Set 3: Code-Review-1

(1 comment)

http://gerrit.ovirt.org/#/c/26539/3/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 4323: try:
Line 4324: cur_mem = self._dom.info()[2]
Line 4325: except (AttributeError, TypeError):
Line 4326: # _dom may be None (race on shutdown);
Line 4327: # if info() fails, returns None
A quick review of my /usr/lib64/python2.7/site-packages/libvirt.py shows that 
virDomain.info() can never return None - it raises libvirtError on failure.
Line 4328: self._log.exception(
Line 4329: 'failed to retrieve the balloon stats')
Line 4330: cur_mem = 0
Line 4331: return {'balloon_max': str(max_mem),


-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-16 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: vm: fix _dom access when QEMU is dying
..


Patch Set 3:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/8094/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/8207/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/7304/ : SUCCESS

-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-16 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: vm: fix _dom access when QEMU is dying
..


Patch Set 2:

(1 comment)

http://gerrit.ovirt.org/#/c/26539/2/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 4323: min_mem = int(self.conf.get('memGuaranteedSize', 
'0')) * 1024
Line 4324: target_mem = dev.get('target', max_mem)
Line 4325: try:
Line 4326: cur_mem = self._dom.info()[2]
Line 4327: except Exception:
> - Please do not add new "except Exception". Catch only exception that are  
Right. I was misleaded by the apparent simplicity of this patch. No reason to 
hide things under the carpet here.

the log noise reduction will be addressed in a followup cleanup patch. 
(probably a follow up of http://gerrit.ovirt.org/#/c/26790/ which is just the 
tip of the iceberg)
Line 4328: cur_mem = 0
Line 4329: return {'balloon_max': str(max_mem),
Line 4330: 'balloon_cur': str(cur_mem),
Line 4331: 'balloon_min': str(min_mem),


-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-16 Thread michal . skrivanek
Michal Skrivanek has posted comments on this change.

Change subject: vm: fix _dom access when QEMU is dying
..


Patch Set 2:

(1 comment)

http://gerrit.ovirt.org/#/c/26539/2/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 4323: min_mem = int(self.conf.get('memGuaranteedSize', 
'0')) * 1024
Line 4324: target_mem = dev.get('target', max_mem)
Line 4325: try:
Line 4326: cur_mem = self._dom.info()[2]
Line 4327: except Exception:
> - Please do not add new "except Exception". Catch only exception that are  
I'm concerned about excessive err logs during migration and right after it. It 
is already pretty bad …with enough drives and nics you get tens of lines of 
errors per VM every 2s.
In a follow-up patch we should address this by aggregating the stats error to a 
single line
Line 4328: cur_mem = 0
Line 4329: return {'balloon_max': str(max_mem),
Line 4330: 'balloon_cur': str(cur_mem),
Line 4331: 'balloon_min': str(min_mem),


-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-16 Thread danken
Dan Kenigsberg has posted comments on this change.

Change subject: vm: fix _dom access when QEMU is dying
..


Patch Set 2: Code-Review-1

(1 comment)

http://gerrit.ovirt.org/#/c/26539/2/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 4323: min_mem = int(self.conf.get('memGuaranteedSize', 
'0')) * 1024
Line 4324: target_mem = dev.get('target', max_mem)
Line 4325: try:
Line 4326: cur_mem = self._dom.info()[2]
Line 4327: except Exception:
> if you use the part from the previous patch if / else
- Please do not add new "except Exception". Catch only exception that are  
expected in this context.
- Never swallow exceptions silently - always log. Particularly when the 
exception is so rare as in this case.
Line 4328: cur_mem = 0
Line 4329: return {'balloon_max': str(max_mem),
Line 4330: 'balloon_cur': str(cur_mem),
Line 4331: 'balloon_min': str(min_mem),


-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-14 Thread michal . skrivanek
Michal Skrivanek has posted comments on this change.

Change subject: vm: fix _dom access when QEMU is dying
..


Patch Set 2: Code-Review+1

-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-08 Thread vfeenstr
Vinzenz Feenstra has posted comments on this change.

Change subject: vm: fix _dom access when QEMU is dying
..


Patch Set 2:

(1 comment)

http://gerrit.ovirt.org/#/c/26539/2/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 4327: Exception
> libvirtError should be enough
if you use the part from the previous patch if / else


-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-08 Thread vfeenstr
Vinzenz Feenstra has posted comments on this change.

Change subject: vm: fix _dom access when QEMU is dying
..


Patch Set 2:

(1 comment)

http://gerrit.ovirt.org/#/c/26539/2/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 4327: Exception
libvirtError should be enough


-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-08 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: vm: fix _dom access when QEMU is dying
..


Patch Set 2:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7924/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/7134/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/8036/ : SUCCESS

-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-08 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: vm: fix _dom access when QEMU is dying
..


Patch Set 2:

Patch set 2:
still admittedly a band aid, but let's be a bit more prudent here.

-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-08 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: vm: fix _dom access when QEMU is dying
..


Patch Set 1:

This is just a quick (and indeed, quite ugly) local fix until the statistics 
handling is properly cleaned up and fixed.
Patches for such cleanup are coming soon on gerrit.

-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-08 Thread michal . skrivanek
Michal Skrivanek has posted comments on this change.

Change subject: vm: fix _dom access when QEMU is dying
..


Patch Set 1: Code-Review+1

-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-08 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: vm: fix _dom access when QEMU is dying
..


Patch Set 1:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7903/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/7113/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/8015/ : SUCCESS

-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-04-08 Thread fromani
Francesco Romani has uploaded a new change for review.

Change subject: vm: fix _dom access when QEMU is dying
..

vm: fix _dom access when QEMU is dying

commit 8fedf8bde3c28edb07add23c3e9b72681cb48e49 introduced a tiny
window for races between libvirt notifications (vm._onQemuDeath)
and polling for stats from engine.

This is demonstrated by bz1073478, but it really boils down
to how events are serialized.
In this case, a stats request from engine is being answered
while QEMU is being reported down and the _dom handle is being
shut down, we end up with an uncaught exception.

This patch address the reported race between polling and qemu death.
The window of vulnerability is (supposed to be) tiny
and the issue itself is hard to reproduce.

Sampling thread is theorically vulnerable to the a race of the
same type, but this problem will be addressed in a separate
patch.

Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Bug-Url: https://bugzilla.redhat.com/1073478
Signed-off-by: Francesco Romani 
---
M vdsm/virt/vm.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/39/26539/1

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 0e19235..3d86598 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -4322,7 +4322,7 @@
 max_mem = int(self.conf.get('memSize')) * 1024
 min_mem = int(self.conf.get('memGuaranteedSize', '0')) * 1024
 target_mem = dev.get('target', max_mem)
-cur_mem = self._dom.info()[2]
+cur_mem = self._dom.info()[2] if self._dom else 0
 return {'balloon_max': str(max_mem),
 'balloon_cur': str(cur_mem),
 'balloon_min': str(min_mem),


-- 
To view, visit http://gerrit.ovirt.org/26539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-03-17 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: vm: fix _dom access when QEMU is dying
..


Patch Set 1:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7476/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6685/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7586/ : SUCCESS

-- 
To view, visit http://gerrit.ovirt.org/25803
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I65197459cd183af5e7a1634a5ffb01719364a070
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: fix _dom access when QEMU is dying

2014-03-17 Thread fromani
Francesco Romani has uploaded a new change for review.

Change subject: vm: fix _dom access when QEMU is dying
..

vm: fix _dom access when QEMU is dying

commit 8fedf8bde3c28edb07add23c3e9b72681cb48e49 introduced a tiny
window for races between libvirt notifications (vm._onQemuDeath)
and polling for stats from engine.

This is demonstrated by bz1073478, but it really boils down
to how events are serialized.
In this case, a stats request from engine is being answered
while QEMU is being reported down and the _dom handle is being
shut down, we end up with an uncaught exception.

This patch address the reported race between polling and qemu death.
The window of vulnerability is (supposed to be) tiny
and the issue itself is hard to reproduce.

Sampling thread is theorically vulnerable to the a race of the
same type, but this problem will be addressed in a separate
patch.

Change-Id: I65197459cd183af5e7a1634a5ffb01719364a070
Bug-Url: https://bugzilla.redhat.com/1073478
Signed-off-by: Francesco Romani 
---
M vdsm/vm.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/03/25803/1

diff --git a/vdsm/vm.py b/vdsm/vm.py
index c53f1d4..d2d5b6b 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -4718,7 +4718,7 @@
 max_mem = int(self.conf.get('memSize')) * 1024
 min_mem = int(self.conf.get('memGuaranteedSize', '0')) * 1024
 target_mem = dev.get('target', max_mem)
-cur_mem = self._dom.info()[2]
+cur_mem = self._dom.info()[2] if self._dom else 0
 return {'balloon_max': str(max_mem),
 'balloon_cur': str(cur_mem),
 'balloon_min': str(min_mem),


-- 
To view, visit http://gerrit.ovirt.org/25803
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I65197459cd183af5e7a1634a5ffb01719364a070
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches