Merge lp:~ed-leafe/nova/lp828277 into lp:~hudson-openstack/nova/trunk

Proposed by Ed Leafe
Status: Merged
Approved by: Josh Kearney
Approved revision: 1451
Merged at revision: 1451
Proposed branch: lp:~ed-leafe/nova/lp828277
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 11 lines (+1/-0)
1 file modified
plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost (+1/-0)
To merge this branch: bzr merge lp:~ed-leafe/nova/lp828277
Reviewer Review Type Date Requested Status
Trey Morris (community) Approve
Matt Dietz (community) Approve
Jason Kölker (community) Approve
Review via email: mp+71943@code.launchpad.net

Description of the change

Adds the enabled status of a host when XenServer reports its host's capabilities. This allows the scheduler to ignore hosts whose enabled is False when considering where to place a new instance.

To post a comment you must log in.
Revision history for this message
Jason Kölker (jason-koelker) wrote :

Is Bueno.

review: Approve
Revision history for this message
Matt Dietz (cerberus) wrote :

+!

review: Approve
Revision history for this message
Trey Morris (tr3buchet) wrote :

:)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost'
2--- plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost 2011-08-08 21:46:33 +0000
3+++ plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost 2011-08-17 20:02:25 +0000
4@@ -258,6 +258,7 @@
5 # out["host_suspend-image-sr-uuid"] = dct.get("suspend-image-sr-uuid", "")
6 # out["host_crash-dump-sr-uuid"] = dct.get("crash-dump-sr-uuid", "")
7 # out["host_local-cache-sr"] = dct.get("local-cache-sr", "")
8+ out["enabled"] = dct.get("enabled", "true") == "true"
9 out["host_memory"] = omm = {}
10 omm["total"] = safe_int(dct.get("memory-total", ""))
11 omm["overhead"] = safe_int(dct.get("memory-overhead", ""))