Merge lp:~thumper/juju-core/kvm-constraints into lp:~go-bot/juju-core/trunk
| Status: | Merged |
|---|---|
| Approved by: | Tim Penhey on 2013-12-06 |
| Approved revision: | 1930 |
| Merged at revision: | 2123 |
| Proposed branch: | lp:~thumper/juju-core/kvm-constraints |
| Merge into: | lp:~go-bot/juju-core/trunk |
| Diff against target: |
554 lines (+265/-57) 10 files modified
container/kvm/container.go (+12/-15) container/kvm/interface.go (+12/-7) container/kvm/kvm.go (+81/-6) container/kvm/kvm_test.go (+132/-1) container/kvm/libvirt.go (+12/-1) container/kvm/live_test.go (+2/-2) container/kvm/mock/mock-kvm.go (+1/-7) container/kvm/mock/mock-kvm_test.go (+8/-18) provider/local/environ.go (+4/-0) testing/testbase/log.go (+1/-0) |
| To merge this branch: | bzr merge lp:~thumper/juju-core/kvm-constraints |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| juju hackers | 2013-12-05 | Pending | |
|
Review via email:
|
|||
Commit Message
Make KVM respect constraints.
The uvtool CLI allows us to specify memory, disk
and cores on the command-line. Constraints often
ask for a subset (or superset) of these.
This branch translates between the juju constraints
format to the command line params that the uvt-kvm
tool wants.
If constraints are supplied that KVM doesn't support,
a log entry is written out at INFO level. It isn't
really a warning, just an informational that we are
ignoring it.
Also, the local provider wasn't passing the constraints
through as the FinishMachineConfig only set the constraints
on the config object if it was a state server node. I am
a little unclear on the implications of this for other
providers.
Description of the Change
Make KVM respect constraints.
The uvtool CLI allows us to specify memory, disk
and cores on the command-line. Constraints often
ask for a subset (or superset) of these.
This branch translates between the juju constraints
format to the command line params that the uvt-kvm
tool wants.
If constraints are supplied that KVM doesn't support,
a log entry is written out at INFO level. It isn't
really a warning, just an informational that we are
ignoring it.
Also, the local provider wasn't passing the constraints
through as the FinishMachineConfig only set the constraints
on the config object if it was a state server node. I am
a little unclear on the implications of this for other
providers.
| Tim Penhey (thumper) wrote : | # |
| Ian Booth (wallyworld) wrote : | # |
I have an issue with the early conversion of mem, cores etc to strings.
Thoughts on my comments?
I also think we need a todo and a comment to explain the machine config
constraints things since the cons is passed in to FinishMachineConfig
and then set and the reader will be confused without a comment. I think
we should be able to clean it up, hence a todo.
https:/
File container/
https:/
container/
Perhaps a comment about how we need opinionated defaults because blah
blah
https:/
File container/
https:/
container/
-1 to these as strings.
They should remain as ints and any formatting like sprintf should occur
when the command line args to uvt-kvm are generated
| Tim Penhey (thumper) wrote : | # |
Please take a look.
https:/
File container/
https:/
container/
On 2013/12/05 04:23:31, wallyworld wrote:
> Perhaps a comment about how we need opinionated defaults because blah
blah
Done.
https:/
File container/
https:/
container/
On 2013/12/05 04:23:31, wallyworld wrote:
> -1 to these as strings.
> They should remain as ints and any formatting like sprintf should
occur when the
> command line args to uvt-kvm are generated
Done.
| Ian Booth (wallyworld) wrote : | # |
LGTM. Thanks for the changes
| Go Bot (go-bot) wrote : | # |
The attempt to merge lp:~thumper/juju-core/kvm-constraints into lp:juju-core failed. Below is the output from the failed tests.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
? launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
? launchpad.
? launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
? launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
FAIL launchpad.
? launchpad.
ok launchpad.
? launchpad.
? launchpad.
? launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
? launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
? launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
? launchpad.
ok launchpad.
ok launchpad.
? launchpad.
ok launchpad.
ok launchpad.
? launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
? launchpad.
? launchpad.
ok launchpa...
| Go Bot (go-bot) wrote : | # |
The attempt to merge lp:~thumper/juju-core/kvm-constraints into lp:juju-core failed. Below is the output from the failed tests.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
? launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
? launchpad.
? launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
? launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
? launchpad.
ok launchpad.
? launchpad.
? launchpad.
? launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
? launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
? launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
? launchpad.
ok launchpad.
ok launchpad.
? launchpad.
ok launchpad.
ok launchpad.
? launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
? launchpad.
? launchpad.
ok launchpad.net/ju...
- 1930. By Tim Penhey on 2013-12-06
-
Isolate the logging suite from user's environment.


Reviewers: mp+197815_ code.launchpad. net,
Message:
Please take a look.
Description:
Make KVM respect constraints.
The uvtool CLI allows us to specify memory, disk
and cores on the command-line. Constraints often
ask for a subset (or superset) of these.
This branch translates between the juju constraints
format to the command line params that the uvt-kvm
tool wants.
If constraints are supplied that KVM doesn't support,
a log entry is written out at INFO level. It isn't
really a warning, just an informational that we are
ignoring it.
Also, the local provider wasn't passing the constraints
through as the FinishMachineConfig only set the constraints
on the config object if it was a state server node. I am
a little unclear on the implications of this for other
providers.
https:/ /code.launchpad .net/~thumper/ juju-core/ kvm-constraints /+merge/ 197815
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/37610043/
Affected files (+250, -39 lines): kvm/container. go kvm/interface. go kvm/kvm. go kvm/kvm_ test.go kvm/libvirt. go kvm/live_ test.go kvm/mock/ mock-kvm. go local/environ. go
A [revision details]
M container/
M container/
M container/
M container/
M container/
M container/
M container/
M provider/