Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(347)

Issue 6783059: Support Openstack scheduler hints as a constraint

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 6 months ago by gz
Modified:
11 years, 6 months ago
Reviewers:
jimbaker, mp+131642, gzlist
Visibility:
Public.

Description

Support Openstack scheduler hints as a constraint Adds Openstack provider specific 'os-scheduler-hints' pseudo-constraint that instead of helping determine the flavor to use, is simply passed through when creating the server. This depends on the SchedulerHints extension that can then influence where to spin up the underlying vm. As the api expects a json object of string to object pairs, the format of the constraint is simply json too, with basic validation. https://code.launchpad.net/~gz/juju/os_scheduler_hints_1049858/+merge/131642 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -3 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M juju/providers/openstack/client.py View 2 chunks +3 lines, -1 line 0 comments Download
M juju/providers/openstack/launch.py View 1 chunk +5 lines, -1 line 1 comment Download
M juju/providers/openstack/provider.py View 3 chunks +17 lines, -0 lines 0 comments Download
M juju/providers/openstack/tests/__init__.py View 1 chunk +2 lines, -0 lines 0 comments Download
M juju/providers/openstack/tests/test_client.py View 1 chunk +30 lines, -0 lines 0 comments Download
M juju/providers/openstack/tests/test_launch.py View 2 chunks +19 lines, -1 line 0 comments Download
M juju/providers/openstack/tests/test_provider.py View 1 chunk +29 lines, -0 lines 0 comments Download

Messages

Total messages: 3
gz
Please take a look.
11 years, 6 months ago (2012-10-27 07:53:25 UTC) #1
jimbaker
+1, LGTM, with one minor https://codereview.appspot.com/6783059/diff/1/juju/providers/openstack/launch.py File juju/providers/openstack/launch.py (right): https://codereview.appspot.com/6783059/diff/1/juju/providers/openstack/launch.py#newcode95 juju/providers/openstack/launch.py:95: hints = self._constraints["os-scheduler-hints"] Is ...
11 years, 6 months ago (2012-10-29 11:51:37 UTC) #2
gzlist
11 years, 6 months ago (2012-10-29 15:27:07 UTC) #3
On 2012/10/29 11:51:37, jimbaker wrote:
> 
> juju/providers/openstack/launch.py:95: hints =
> self._constraints["os-scheduler-hints"]
> Is this key guaranteed to be set? run_server does not assume it is set, but
the
> constraint is currently registered. However, the comments on that registration
> muse that it might not be registered. Given the flow, maybe should just be:
> 
> hints = self._constraints.get("os-scheduler-hints")

This does look a little confusing, but see
machine.constraints.Constraints.__getitem__ - a KeyError is raised only if the
constraint key name does not exist, and the pre-registered default is returned
if no constraint of that name was given.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b