Change in vdsm[master]: stats: return HA agent score when applicable

2013-10-29 Thread vfeenstr
Vinzenz Feenstra has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 7: Code-Review-1

(1 comment)

Besides that minor style issue with the logging it looks good to me.
So just a minority -1 ;)


File vdsm/API.py
Line 1220: try:
Line 1221: stats['haScore'] = 
haClient.HAClient().get_local_host_score()
Line 1222: except Exception:
Line 1223: self.log.error(failed to retrieve Hosted Engine HA 
score,
Line 1224:exc_info=True)
self.log.exception(failed to retrieve Hosted Engine HA score)

Without that exc_info=True, then it is logged as an error.
Line 1225: 
Line 1226: return {'status': doneCode, 'info': stats}
Line 1227: 
Line 1228: def setLogLevel(self, level):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-29 Thread nsoffer
Nir Soffer has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 7:

(1 comment)


File vdsm/API.py
Line 1220: try:
Line 1221: stats['haScore'] = 
haClient.HAClient().get_local_host_score()
Line 1222: except Exception:
Line 1223: self.log.error(failed to retrieve Hosted Engine HA 
score,
Line 1224:exc_info=True)
Will this traceback help to understand this failure, or this failure is 
expected by HAClient and the traceback is only noise?
Line 1225: 
Line 1226: return {'status': doneCode, 'info': stats}
Line 1227: 
Line 1228: def setLogLevel(self, level):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-29 Thread gpadgett
Greg Padgett has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 7:

(1 comment)


File vdsm/API.py
Line 1220: try:
Line 1221: stats['haScore'] = 
haClient.HAClient().get_local_host_score()
Line 1222: except Exception:
Line 1223: self.log.error(failed to retrieve Hosted Engine HA 
score,
Line 1224:exc_info=True)
Failure here is unexpected and with any luck, rare.  If it does happen, the 
traceback should help identify where things went wrong.  Changing to use 
self.log.exception([...])
Line 1225: 
Line 1226: return {'status': doneCode, 'info': stats}
Line 1227: 
Line 1228: def setLogLevel(self, level):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-29 Thread gpadgett
Greg Padgett has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 8: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-29 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 8:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/5117/ : SUCCESS

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

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

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-29 Thread oourfali
Oved Ourfali has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 8: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-29 Thread sbonazzo
Sandro Bonazzola has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 8: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-29 Thread nsoffer
Nir Soffer has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 8: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-29 Thread danken
Dan Kenigsberg has submitted this change and it was merged.

Change subject: stats: return HA agent score when applicable
..


stats: return HA agent score when applicable

For Hosted Engine, the engine needs to know the HA score assigned to
each host by the HA agent--if it's installed.  This patch returns the
score via the statistics interface.

Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Signed-off-by: Greg Padgett gpadg...@redhat.com
Reviewed-on: http://gerrit.ovirt.org/20126
Reviewed-by: Oved Ourfali oourf...@redhat.com
Reviewed-by: Sandro Bonazzola sbona...@redhat.com
Reviewed-by: Nir Soffer nsof...@redhat.com
Reviewed-by: Federico Simoncelli fsimo...@redhat.com
---
M vdsm/API.py
M vdsm_api/vdsmapi-schema.json
2 files changed, 17 insertions(+), 1 deletion(-)

Approvals:
  Nir Soffer: Looks good to me, but someone else must approve
  Sandro Bonazzola: Looks good to me, but someone else must approve
  Greg Padgett: Verified
  Federico Simoncelli: Looks good to me, approved
  Oved Ourfali: Looks good to me, but someone else must approve



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-28 Thread gpadgett
Greg Padgett has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 6: Verified+1

Builds fine for me, too.  Tested with and without HA client module available.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-28 Thread dfediuck
Doron Fediuck has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 6:

The error is: 
./vdsm/API.py:54: redefinition of unused 'haClient' from line 52

Try modifying as follows:

haClient = None
try:
import xxx as haClient
except ...
log HA not found

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-28 Thread nsoffer
Nir Soffer has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 6:

Looks like a tool error to me; the original code is valid.

Maybe there is an old version of pep8 on the failing machine? Using 1.4.6 here.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-28 Thread gpadgett
Greg Padgett has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 7: Verified+1

Doron, thanks.  Nir, agreed... it looks like an open issue in pyflakes [1].  
The latest patch has the unfortunate workaround.

[1] https://github.com/kevinw/pyflakes/issues/13

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-28 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 7:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/5110/ : SUCCESS

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

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

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-27 Thread gpadgett
Greg Padgett has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 4:

(7 comments)


File vdsm/API.py
Line 51: try:
Line 52: import ovirt_hosted_engine_ha.client.client as ha_client
Line 53: ha_agent = True
Line 54: except ImportError:
Line 55: ha_agent = False
Can you provide a reference/example?  In the python docs [1], ImportError is 
rasied when a module cannot be found; for issues within the imported module you 
may see something like a SyntaxError instead.

[1] http://docs.python.org/2/library/exceptions.html
Line 56: 
Line 57: # default message for system shutdown, will be displayed in guest
Line 58: USER_SHUTDOWN_MESSAGE = 'System going down'
Line 59: 


Line 1187: 
Line 1188: def _getHaScore():
Line 1189: if ha_agent:
Line 1190: try:
Line 1191: return 
ha_client.HAClient().get_local_host_score()
The client library class needs to be instantiated to work properly.
Line 1192: except:
Line 1193: pass
Line 1194: return False
Line 1195: 


Line 1188: def _getHaScore():
Line 1189: if ha_agent:
Line 1190: try:
Line 1191: return 
ha_client.HAClient().get_local_host_score()
Line 1192: except:
Currently anything in Exception but not BaseException, I'll amend it 
accordingly.
Line 1193: pass
Line 1194: return False
Line 1195: 
Line 1196: def _readSwapTotalFree():


Line 1190: try:
Line 1191: return 
ha_client.HAClient().get_local_host_score()
Line 1192: except:
Line 1193: pass
Line 1194: return False
... inlining this as recommended below, so the PHP is going away.
Line 1195: 
Line 1196: def _readSwapTotalFree():
Line 1197: meminfo = utils.readMemInfo()
Line 1198: return meminfo['SwapTotal'] / 1024, meminfo['SwapFree'] 
/ 1024


Line 1225: stats['generationID'] = self._cif._generationID
Line 1226: 
Line 1227: haScore = _getHaScore()
Line 1228: if haScore is not False:
Line 1229: stats['haScore'] = haScore
Inlined.
Line 1230: 
Line 1231: return {'status': doneCode, 'info': stats}
Line 1232: 
Line 1233: def setLogLevel(self, level):



File vdsm_api/vdsmapi-schema.json
Line 1617: #
Line 1618: # @momStatus:   The current status of the MOM policy engine
Line 1619: #
Line 1620: # @haScore: #optional The host score according to the HA 
agent,
Line 1621: #   if installed
Done.  Is 4.13.0 still the right version to list?
Line 1622: #
Line 1623: # Since: 4.10.0
Line 1624: ##
Line 1625: {'type': 'HostStats',


Line 1636:'memCommitted': 'int', 'swapTotal': 'int', 'swapFree': 
'int',
Line 1637:'vmCount': 'int', 'vmActive': 'int', 'vmMigrating': 'int',
Line 1638:'dateTime': 'str', 'ksmState': 'bool', 'ksmPages': 'int',
Line 1639:'ksmCpu': 'float', 'netConfigDirty': 'bool', 
'generationID': 'UUID',
Line 1640:'momStatus': 'MOMStatus', 'haScore': 'uint'}}
Done
Line 1641: 
Line 1642: ##
Line 1643: # @Host.getStats:
Line 1644: #


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-27 Thread gpadgett
Greg Padgett has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 5:

Addressed comments.  Not yet tested/verified.  There was some discussion on 
vdsm-devel about putting the hosted engine code in its own module, I can do 
that if it's warranted.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-27 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 5:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/5105/ : SUCCESS

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

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

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-27 Thread nsoffer
Nir Soffer has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 5:

(1 comment)


File vdsm/API.py
Line 51: try:
Line 52: import ovirt_hosted_engine_ha.client.client as ha_client
Line 53: ha_agent = True
Line 54: except ImportError:
Line 55: ha_agent = False
Can be little cleaner if you do:

try:
import ovirt_hosted_engine_ha.client.client as haClient
except ImportError:
haClient = None

And later:

if haClient:
# Use it
Line 56: 
Line 57: # default message for system shutdown, will be displayed in guest
Line 58: USER_SHUTDOWN_MESSAGE = 'System going down'
Line 59: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-27 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 6: Verified-1

Build Failed 

http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/5107/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/4303/ : FAILURE

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

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-17 Thread dfediuck
Doron Fediuck has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 4: Code-Review+1

I'm fine with it, but let's just get the feedback from the vdsm list on my 
question there.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-17 Thread sbonazzo
Sandro Bonazzola has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 4: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-17 Thread vfeenstr
Vinzenz Feenstra has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 4: Code-Review-1

(1 comment)


File vdsm_api/vdsmapi-schema.json
Line 1636:'memCommitted': 'int', 'swapTotal': 'int', 'swapFree': 
'int',
Line 1637:'vmCount': 'int', 'vmActive': 'int', 'vmMigrating': 'int',
Line 1638:'dateTime': 'str', 'ksmState': 'bool', 'ksmPages': 'int',
Line 1639:'ksmCpu': 'float', 'netConfigDirty': 'bool', 
'generationID': 'UUID',
Line 1640:'momStatus': 'MOMStatus', 'haScore': 'uint'}}
If this is optional you have to put a * infront of haScore
Line 1641: 
Line 1642: ##
Line 1643: # @Host.getStats:
Line 1644: #


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-17 Thread vfeenstr
Vinzenz Feenstra has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 4:

(2 comments)


File vdsm/API.py
Line 1188: def _getHaScore():
Line 1189: if ha_agent:
Line 1190: try:
Line 1191: return 
ha_client.HAClient().get_local_host_score()
Line 1192: except:
Please specify which exceptions to catch
Line 1193: pass
Line 1194: return False
Line 1195: 
Line 1196: def _readSwapTotalFree():


Line 1225: stats['generationID'] = self._cif._generationID
Line 1226: 
Line 1227: haScore = _getHaScore()
Line 1228: if haScore is not False:
Line 1229: stats['haScore'] = haScore
I'd make this shorter by doing it like this:

_addHaScore(stats)


and instead of _getHaScore() =

def _addHaScore(stats):
if ha_agent:
try:
stats['haScore'] = ha_client.HAClient().get_local_host_score()
except Exception: # Better even a more specific exception
 pass
Line 1230: 
Line 1231: return {'status': doneCode, 'info': stats}
Line 1232: 
Line 1233: def setLogLevel(self, level):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-17 Thread vfeenstr
Vinzenz Feenstra has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 4:

(1 comment)


File vdsm/API.py
Line 1225: stats['generationID'] = self._cif._generationID
Line 1226: 
Line 1227: haScore = _getHaScore()
Line 1228: if haScore is not False:
Line 1229: stats['haScore'] = haScore
actually I just realized, that since this is not used anywhere else, you can 
inline _addHaScore, there's no sense of having it as a separate function except 
that it comes with unnecessary overhead
Line 1230: 
Line 1231: return {'status': doneCode, 'info': stats}
Line 1232: 
Line 1233: def setLogLevel(self, level):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-17 Thread nsoffer
Nir Soffer has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 4: Code-Review-1

(6 comments)


File vdsm/API.py
Line 51: try:
Line 52: import ovirt_hosted_engine_ha.client.client as ha_client
Line 53: ha_agent = True
Line 54: except ImportError:
Line 55: ha_agent = False
Using import error for availability checks is bad practice - this hides real 
errors in the imported module, and makes debugging these issues very hard. 

The way to import a file that may not be available is to check if the file 
exists, then import or load it. Any error while loading the file should be 
handled and logged properly.
Line 56: 
Line 57: # default message for system shutdown, will be displayed in guest
Line 58: USER_SHUTDOWN_MESSAGE = 'System going down'
Line 59: 


Line 1187: 
Line 1188: def _getHaScore():
Line 1189: if ha_agent:
Line 1190: try:
Line 1191: return 
ha_client.HAClient().get_local_host_score()
ha_client.get_local_host_score() would be cleaner.
Line 1192: except:
Line 1193: pass
Line 1194: return False
Line 1195: 


Line 1190: try:
Line 1191: return 
ha_client.HAClient().get_local_host_score()
Line 1192: except:
Line 1193: pass
Line 1194: return False
Is this PHP?! Raising an exception would be cleaner.
Line 1195: 
Line 1196: def _readSwapTotalFree():
Line 1197: meminfo = utils.readMemInfo()
Line 1198: return meminfo['SwapTotal'] / 1024, meminfo['SwapFree'] 
/ 1024


Line 1225: stats['generationID'] = self._cif._generationID
Line 1226: 
Line 1227: haScore = _getHaScore()
Line 1228: if haScore is not False:
Line 1229: stats['haScore'] = haScore
+1 for inliing it
Line 1230: 
Line 1231: return {'status': doneCode, 'info': stats}
Line 1232: 
Line 1233: def setLogLevel(self, level):


Line 1225: stats['generationID'] = self._cif._generationID
Line 1226: 
Line 1227: haScore = _getHaScore()
Line 1228: if haScore is not False:
Line 1229: stats['haScore'] = haScore
+1 for _addHaScore
Line 1230: 
Line 1231: return {'status': doneCode, 'info': stats}
Line 1232: 
Line 1233: def setLogLevel(self, level):



File vdsm_api/vdsmapi-schema.json
Line 1617: #
Line 1618: # @momStatus:   The current status of the MOM policy engine
Line 1619: #
Line 1620: # @haScore: #optional The host score according to the HA 
agent,
Line 1621: #   if installed
Lets add Python style new in version notes:

if installed (new in version 4.13.0).
Line 1622: #
Line 1623: # Since: 4.10.0
Line 1624: ##
Line 1625: {'type': 'HostStats',


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-16 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 4: -Verified

Build Successful 

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

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

http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/4942/ : SUCCESS

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-15 Thread gpadgett
Greg Padgett has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 4: Verified+1

Rebased.  Changed from caps/vdsDynamic to stats/vdsStatistics (patch set 3) 
because vdsStatistics is regularly updated while the host is up in the engine.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
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]: stats: return HA agent score when applicable

2013-10-15 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: stats: return HA agent score when applicable
..


Patch Set 4: Verified-1

Build Failed 

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/4999/ : ABORTED

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

http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/4922/ : SUCCESS

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdad8accb0660dbdcc8b6e1b83f491c2f89c2d30
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Doron Fediuck dfedi...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com
Gerrit-Reviewer: Sandro Bonazzola sbona...@redhat.com
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