Created by Frank Mueller on 2013-06-06 and last modified on 2013-06-10
Get this branch:
bzr branch lp:~themue/juju-core/024-cleanup-watcher
Only Frank Mueller can upload to this branch. If you are Frank Mueller please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Frank Mueller

Recent revisions

1262. By Ian Booth on 2013-06-10

Move assignment policy to global env config

Previoysly, each provider defined it's own AssignmentPolicy,
which was hard coded to AssignNew. Now, it's been made an
env setting with default AssignNew. With containers, it will be
possible to add a unit to an existing machine (if not dirty) so
this work is a step in that direction.

R=jameinel, fwereade

1261. By Ian Booth on 2013-06-10

Add dirty flag to machine state

When choosing an unused machine to assign a unit to, a check was being made
to see if there were any principal units for the machine. If machines had units
assigned and then unassigned, the machine would appear clean since number of
principal unit goes to 0 but the machine should still be considered dirty.

The machine state has a "clean" flag (boolean). Machines are created with the
clean flag set to true. It is set false when a machine has a unit assigned,
and not reset when units are unassigned. The assign to unused machine logic
is updated to look at the clean flag.

R=fwereade, thumper

1260. By Tim Penhey on 2013-06-10

First part of the provisioner refactoring.

This branch breaks up the current provisioner and defines some interfaces that
we'll be using for containers.

The broker interface is what we have starting, stopping instances, and listing
instances and related machines.

An environment broker is written that defers the actual calls to the environ.

The provisioner now creates a provisioning task for the environment provider
using a machine watcher and the environment broker. The common provisioning
methods are now in provisioner_task.go.

I refactored some of the methods as we were duplicating a lot of calls, like
get all instances, and then getting instances for individual ids. Also,
looking up specific machines, and also getting all machines. Now we just do
the "all" gets, and keep a map around for the duration of the checks.

R=wallyworld, mue, fwereade, rog

1259. By Frank Mueller on 2013-06-07

state: added CleanupWatcher

The CleanupWatcher signals the demand for the running of
state.Cleanup(). It is the first in a row of CLs to add
an according worker.

R=fwereade, dimitern

1257. By Ian Booth on 2013-06-07

Update add machine command to create containers

The add machine command accepts additional command line
arguments to specify a container to create. The container
can be on a new machine or an existing instance. Container
constraints are also supported eg create a container with
2G memory. The state is updated with the new machine document
but the machine watcher ignores the machine since there's no
code to provision containers yet.


juju add-machine /lxc
juju add-machine --constraints mem=4G /lxc
juju add-machine 1/lxc

R=mue, fwereade, thumper

1256. By Tim Penhey on 2013-06-07

Have the verbose flag set the log level to INFO.

When the loggo branch landed yesterday, there was a change in behaviour with
the --verbose flag, where it did log to stderr, but it was at the WARNING
level, not INFO.

R=fwereade, dimitern

1255. By Dimiter Naydenov on 2013-06-06

state/api: Split client Machiner into subpackage

Following up on https://codereview.appspot.com/10044043/
this does the same for the client-side: splits
machiner facade into its own pacakge.

R=fwereade, rog

1254. By Dimiter Naydenov on 2013-06-06

state/apiserver: Split Machiner into subpackage

Minor refactoring to put server-side Machiner
facade into its own subpackage as suggested
As a side-effect errors and interfaces used
had to be moved into another "common" subpackage
to resolve circular imports.

R=fwereade, jameinel, rog

1253. By John A Meinel on 2013-06-05

state/open.go: Remove RetryDelay

The latest version of mgo always delays 500ms between every retry. This would
mean that we delay both that 500ms and the extra time that we had internally.
Instead, this removes our internal delay, and the test that asserted we did not
delay when it was a TLS failure rather than a connection failure.

mgo does not appear to expose any way to control the retry delay, but
it does seem close enough for what we wanted to do that we can live
with it.

R=gz, dimitern

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
This branch contains Public information 
Everyone can see this information.