Jiří Moskovčák has posted comments on this change.

Change subject: core: fixed NPE when vdsm returns emtpy balloon info
......................................................................


Patch Set 1:

(3 comments)

http://gerrit.ovirt.org/#/c/36016/1/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmAnalyzer.java
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmAnalyzer.java:

Line 331:     private void proceedBalloonCheck() {
Line 332:         if (getVdsManager().getCopyVds().isBalloonEnabled()) {
Line 333:             VmBalloonInfo balloonInfo = 
vdsmVm.getVmStatistics().getVmBalloonInfo();
Line 334: 
Line 335:             /* first time we check or we're not getting the balloon 
info
> the english here looks weird...
fixed
Line 336:                from vdsm rhbz#1171491
Line 337:              */
Line 338:             if (balloonInfo.getBalloonLastMemory() == null) {
Line 339:                 
balloonInfo.setBalloonLastMemory(balloonInfo.getCurrentMemory());


Line 332:         if (getVdsManager().getCopyVds().isBalloonEnabled()) {
Line 333:             VmBalloonInfo balloonInfo = 
vdsmVm.getVmStatistics().getVmBalloonInfo();
Line 334: 
Line 335:             /* first time we check or we're not getting the balloon 
info
Line 336:                from vdsm rhbz#1171491
> no need to add the bz comment. we leave that for git blame.
if you move the code later, then the relevant commit with the bz number is 
buried in the git history, but if it's a preferred way I will remove it
Line 337:              */
Line 338:             if (balloonInfo.getBalloonLastMemory() == null) {
Line 339:                 
balloonInfo.setBalloonLastMemory(balloonInfo.getCurrentMemory());
Line 340:                 return;


Line 333:             VmBalloonInfo balloonInfo = 
vdsmVm.getVmStatistics().getVmBalloonInfo();
Line 334: 
Line 335:             /* first time we check or we're not getting the balloon 
info
Line 336:                from vdsm rhbz#1171491
Line 337:              */
> i guess its either null | == 0  to keep it working for old hosts as well
good catch
Line 338:             if (balloonInfo.getBalloonLastMemory() == null) {
Line 339:                 
balloonInfo.setBalloonLastMemory(balloonInfo.getCurrentMemory());
Line 340:                 return;
Line 341:             }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I27e7d3eacfa2807e9f4b058473ae898956dabb01
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Jiří Moskovčák <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Jiří Moskovčák <[email protected]>
Gerrit-Reviewer: Martin Sivák <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to