constraints

roger peppe rogpeppe at gmail.com
Wed Feb 6 22:31:11 UTC 2013


On 6 February 2013 22:15, Gustavo Niemeyer <gustavo at niemeyer.net> wrote:
> On Wed, Feb 6, 2013 at 7:51 PM, roger peppe <rogpeppe at gmail.com> wrote:
>> If that's true, we still need to specify how the provider should
>> handle this kind of constraint. For example, what should happen
>> when the user does this?
>>
>> juju bootstrap --constraints 'ec2-type=m1.small'
>> juju deploy --constraints 'mem=4G' mysql
>
> max(ec2-type, mem) sounds like a great start.

That seems problematic to me. ec2-type isn't a scalar value,
so it's difficult to say what "max" means here.

Another "what should happen" question: is it possible to deploy to a
small instance when the default memory constraints are large?

juju bootstrap --constraints 'mem=4G'
juju deploy --constraints 'ec2-type=m1.small' mysql

That is, is max(mem, ec2-type) the same as max(ec2-type, mem) ?

I find questions like this hard to answer, because each attribute
here is specifying an overlapping range of possibilities - that's why
I'm proposing to avoid the issue by not trying to combine attributes
from different domains.

I'd love to find a simple, no-surprises solution too.



More information about the Juju-dev mailing list