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

Issue 5841080: Constraints changes

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 6 months ago by fwereade
Modified:
12 years, 6 months ago
Reviewers:
mp+98450
Visibility:
Public.

Description

Constraints changes This is meant to represent the shortest path to a releasable constraints mechanism. All default-* keys work as before, and override constraints; instability warnings are printed for all of them; and this rev should deal correctly with nodes written by older revs. Making constraints and default-* work at the same time necessitated the inclusion of the ec2/arch constraints in this branch, rather than smearing fixes specific to that across more than one branch; less than ideal but hopefully still digestible. This should be merged together with pa-start-machine-constraints. Changelist follows; in constraints: * "arch" constraint now defaults to "amd64" * don't-care-what-arch can be chosen with "arch=any" * don't-care-what-cpu and -mem now also accept "any" for consistency's sake * "arch" constraint no longer overlaps with "ec2-instance-type" * _InstanceType now has an "hvm" field, set to true for cluster instances * specifically to support old node formats: * empty constraints are now considered valid, for backward compatibility * can_satisfy always returns false when either Constraints is incomplete ...in state: * all get_constraints methods now happily return empty constraints on missing data; this is not robustly testable, because creating a new constraints-bearing state without constraints at all is just a plain error, but I verify that a node that is somehow missing its constraints still returns an empty Constraints object. ...in the environments config schema: * all default-* keys now warn once per path per process, and print more detailed information once per message per process. ie, every bad key will trigger a short warning; detailed fix instructions will be printed once. ...and in ec2: * get_image_id now expects an "hvm" param, which comes from the "hvm" field of the chosen instance type * new get_machine_spec function wraps get_current_ami and get_instance_type for convenience in real code https://code.launchpad.net/~fwereade/juju/fix-cluster-instances/+merge/98450 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Constraints changes #

Patch Set 3 : Constraints changes #

Patch Set 4 : Constraints changes #

Patch Set 5 : Constraints changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+408 lines, -200 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M juju/agents/tests/test_provision.py View 1 chunk +2 lines, -2 lines 0 comments Download
M juju/control/tests/test_constraints_set.py View 1 chunk +1 line, -1 line 0 comments Download
M juju/control/tests/test_deploy.py View 1 chunk +1 line, -1 line 0 comments Download
M juju/environment/config.py View 1 2 3 2 chunks +80 lines, -51 lines 0 comments Download
M juju/environment/tests/test_config.py View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M juju/lib/schema.py View 1 2 3 2 chunks +24 lines, -0 lines 0 comments Download
M juju/lib/tests/test_schema.py View 1 2 3 2 chunks +44 lines, -1 line 0 comments Download
M juju/machine/constraints.py View 1 2 3 7 chunks +34 lines, -29 lines 0 comments Download
M juju/machine/tests/test_constraints.py View 1 2 3 7 chunks +34 lines, -29 lines 0 comments Download
M juju/providers/ec2/launch.py View 2 chunks +5 lines, -6 lines 0 comments Download
M juju/providers/ec2/tests/common.py View 1 chunk +2 lines, -1 line 0 comments Download
M juju/providers/ec2/tests/test_launch.py View 3 chunks +9 lines, -7 lines 0 comments Download
M juju/providers/ec2/tests/test_utils.py View 1 2 3 10 chunks +82 lines, -34 lines 0 comments Download
M juju/providers/ec2/utils.py View 1 2 3 6 chunks +30 lines, -33 lines 0 comments Download
M juju/state/machine.py View 1 2 3 4 2 chunks +1 line, -2 lines 0 comments Download
M juju/state/service.py View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M juju/state/tests/test_machine.py View 1 2 3 4 2 chunks +14 lines, -0 lines 0 comments Download
M juju/state/tests/test_service.py View 1 2 3 4 2 chunks +38 lines, -0 lines 0 comments Download
M juju/state/tests/test_utils.py View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 3
fwereade
Please take a look.
12 years, 6 months ago (2012-03-20 16:34:46 UTC) #1
fwereade
Please take a look.
12 years, 6 months ago (2012-03-21 09:26:04 UTC) #2
fwereade
12 years, 6 months ago (2012-03-21 12:45:41 UTC) #3
Please take a look.
Sign in to reply to this message.

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