bootstrap constraints

Dimiter Naydenov dimiter.naydenov at canonical.com
Thu Aug 27 06:21:45 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 27.08.2015 07:29, Matt Rae wrote:
> Hi All, when using 'juju bootstrap --constraints' the constraint is
> used for bootstrap, but the constraint is also set on the
> environment for future machines.
> 
> Is it helpful to set the additional environment constraint?
> 
> So far I've frequently seen the bootstrap constraint used to
> choose which node to bootstrap to, for example 'juju bootstrap
> --constraints "tags=juju"'. In this case, normally the constraint
> set on the environment needs to be cleared after bootstrap to
> deploy to machines not tagged 'juju'.
> 
> With bootstrap --constraints at least we can clear the constraint
> after bootstrap completes, but with quickstart --constraints, there
> doesn't appear to be way to clear the constraint before juju gui
> starts deploying the bundle using the environment constraint which
> I don't want to use for additional machines. So it appears to break
> the use case of using --constraints to bootstrap to a particular
> machine.
> 
> Matt
> 
> 
Hi Matt,

When you're saying you're unable to clear the constraints set at
bootstrap from the environment, do you mean "tags" specifically, or
other constraints as well? If the former, but not the latter, read on.

I've recently discovered there's *no* way to unset a bootstrap (or
environment) constraint value of type list (e.g. "tags=aa,bb,^cc,dd",
mostly undocumented "networks=..." and since a few days - "spaces=..."
with the same format). This issue appears to have been lurking for a
long time - just try this:

$ juju environment set-constraints tags=foo,^bar
$ juju environment get-constraints
tags=foo,^bar
$ juju environment set-constraints tags=   # expected: set to empty
$ juju environment get-constraints
tags=foo,^bar

So, I fixed this on master a few days ago, and in 1.25 it *will* be
possible to unset list-style constraints (note that, as before, you
can still set them to different non-empty value).
If your issue is like described above, you might want to give
1.25-alpha1 a try.

Cheers,
- -- 
Dimiter Naydenov <dimiter.naydenov at canonical.com>
Juju Core Sapphire team <http://juju.ubuntu.com>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQEcBAEBAgAGBQJV3qx5AAoJENzxV2TbLzHwTlMIAJMdw42RU3BY8kvb1Yk4G+6h
gGn0XEDPyJHmzgB/QLBjcrjW4FBXFGmJuN/vmbO/0uW6niZINBkHwTDT2m82aNan
uOIBjaMQxM6GQiLcYXqWroWb1V2dKxgfMx9e+5F5ggmmy6fCtcSrGR4TzAfC62VL
+GXwvv1sLCLudyjBFhAycu6JMLcONrmw9ZWdN0ZAuPwMYGPWqqY/E3WM4Z7FTWv1
r9Igt14ogoYwG4kzx2K3xzbLkZP4gfr7pJDGSSjaDUh12Y7jXMYklqLKPFrojcEU
NPU+vLun0jPKVZOwC5QNYDBqFP+eppOdqNPeT+HKjkfgv5RP6C3sK7FXt14HmQI=
=7Hyn
-----END PGP SIGNATURE-----



More information about the Juju mailing list