lp:~axwalk/juju-core/state-policy-unitassigner

Created by Andrew Wilkins and last modified
Get this branch:
bzr branch lp:~axwalk/juju-core/state-policy-unitassigner
Only Andrew Wilkins can upload to this branch. If you are Andrew Wilkins please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Andrew Wilkins
Project:
juju-core
Status:
Development

Recent revisions

2414. By Andrew Wilkins

Add/fix comments

2413. By Andrew Wilkins

state, environs: introduce UnitAssigner state policy

We introduce a new policy interface UnitAssigner into
state to provide limited control over unit assignment.
This will be implemented by the Azure provider to
prohibit unit placement when in availability set mode.

2412. By Tim Penhey

[r=thumper] Use lxc clone on trusty

This branch speeds up lxc containers for the local
provider only by creating a template as needed that
persists between environments, and this template is
then used as a basis for the machines created in the
environment using lxc-clone.

If /var/lib/lxc is a btrfs filesystem, the containers
use btrfs snapshots. If not, the containers are
created using aufs snapshots.

In addition to this, the apt-get update/upgrade step
is skipped during cloud-init for the cloned machines.

https://codereview.appspot.com/74370044/

2411. By Tim Penhey

[r=thumper] Update golxc version

Since the new golxc version also depends on the
github juju/testing repo, this has also been added
to the dependency file.

https://codereview.appspot.com/74200043/

2410. By Ian Booth

[r=dimitern],[bug=1290684] Ensure agentconfig datadir is not empty

When reading format 1.16 agent config files, the new
1.18 datadir attribute was not being set to the new
default value and instead was being written out as "".
This broke upgrades.

I also included some drive by changes to better log
errors so that we can diagnose issues by looking at
debug-log.

https://codereview.appspot.com/74330044/

2409. By Dimiter Naydenov

[r=dimitern],[bug=1221134] various: production code and logging improvements

Fixed 4 slightly annoying, unrelated minor issues:
1. Refactored production code not to depend on
gocheck (manual provider and apiserver/charms).
As a drive-by fix, I refactored environs/manual
tests to be proper black-box unit tests, rather
than white-box tests in the manual package.
2. Fixed and improved tools download output via
curl and better handling of errors.
3. Added debug logging to environs sshstorage and
httpstorage, and the manual provider.
4. Reformatted and unified generated boilerplate
config across all providers, fixing bug #1221134 in
the process (-e env not properly explained).

Changes tested live with a manual and local environs
with added manually provisioned machines.

While testing I found out and filed this bug #1291292
(basically manual bootstrap is broken with ssl-hostname-
verification set to false, but this is due to a deeper
issue).

I tried to unify and fix when all commands report
"environment not bootstrapped", consistently across
providers, but it turned out like more work than I
originally thought, so I'll do a follow-up on that
(which will entail dropping support for 1.14 environments
without a .jenv file).

https://codereview.appspot.com/72860045/

R=jameinel, rogpeppe

2408. By Tim Penhey

[r=jameinel] Detect backing filesystem for lxc container dir.

Have the LXC container manager know the underlying
filesystem of the container directory.

This is necessary for the container manager to become
btrfs aware, for snapshotting containers on clone.

https://codereview.appspot.com/73310043/

2407. By John A Meinel

[r=jameinel],[bug=1290588] replicaset/replicaset_test.go: loop at failure point

Most of the test had been written with 30s AttempStrategy loops. In testing it manually, it always passed, and all of those parts took much less than one second.

However, when I ran the whole test suite, I saw the CurrentMembers call did take 16s one time, and that was in 2 requests. I don't know where the time is being spent, since that is quite a long time. This does add a loop around the one call that didn't have it, and it made the test pass when it would have otherwise failed on the bot.

It also adds a bunch of logging to what is going on. I'm not super happy about all of the start/attempCount bits being in here (I think they should probably be part of the Attempt object itself, since it tracks a lot of that stuff), but I think this is reasonable for now, and makes things better. I filed https://bugs.launchpad.net/juju-core/+bug/1290727 to track the Attempt changes.

2406. By Ian Booth

[r=wallyworld],[bug=1252122],[bug=1252571] Fix some simplestreams tests for gccgo

Order simplestreams fetch results so tests pass
on gccgo.

https://codereview.appspot.com/73790043/

2405. By Tim Penhey

[r=thumper] Set lxc autostart after creation.

Currently for a recent LXC version, the autostart is controlled
by a setting in the lxc config. We were setting this in the
config file that we use for creation. However this is not clone
friendly, as we do not specify a config file for clone.

However it is perfectly valid to modify the config for the container
once it has been created. This then becomes common for both
normally created containers and those that have been cloned.

A key here is that our template container that we want to use
as a base to clone off we do not want auto-starting, however
the containers that we clone off that may well want to auto-start
(in fact all will until we add the autostart policy for local).

https://codereview.appspot.com/73300043/

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:~go-bot/juju-core/trunk
This branch contains Public information 
Everyone can see this information.

Subscribers