lp:~hazmat/juju-core/master

Created by Kapil Thangavelu and last modified
Get this branch:
bzr branch lp:~hazmat/juju-core/master
Only Kapil Thangavelu can upload to this branch. If you are Kapil Thangavelu please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Kapil Thangavelu
Project:
juju-core
Status:
Development

Recent revisions

1151. By William Reade

environs: extract tools package

This is much simpler than it looks. Motivation is as follows:

 1) I'm trying to make our tools logic consistent, so we have some sort of
  chance of different parts of the system acting in concert (bootstrap,
 start-instance, sync-tools, upgrade-juju, juju upgrades, ...?). It is
 currently very difficult to build a mental model of how these things are
 related, and a common vocabulary will help.

 2) I'd be crazy to try to do everything at once (ha!). So I'll leave the
  existing tools *selection* logic (FindTools, BestTools) in place while
 I focus on just uploads/downloads.

 3) Move tool-storagey code from environs to environs/tools:

   * environs.listTools -> tools.ReadList
     (environs.ListTools now uses tools.ReadList)
   * environs.PutTools -> tools.Upload
     (lots of code moved to storage.go and build.go in tools/)
   * environs.ToolsStoragePath -> tools.StorageName
     (it's a name, not a path, according to the storage metaphor)

  ...hmm. Lots of renames.

 4) But wait, I can't do this, I need to use environs.Storage, and there's
  an import loop. To keep the diff small, define tools.URLLister and
 tools.URLPutter.

 6) The tests are starting to look somewhat repetitive, and I fear subtle
  differences creeping in. Let's bulk up environs/testing a little.
  Ah, that's better.

From a review perspective, this branch is largely mechanical. The only code
that is new, as opposed to moved or mechanically replaced, is:

  * the tests for tools.ReadList (made explicit now it's exported).
  * the tests for environs.EmptyStorage (yes, it's trivial. yes, it should
    still be tested.)
  * environs/testing/tools.go (mostly new, and used in several places).
  * UpgradeJujuCommand (surprising behaviour corrected, clarifying test
   added).

R=thumper, dimitern
CC=
https://codereview.appspot.com/8545043

1150. By Jeroen T. Vermeulen

[author=allenap,jtv,julian-edwards,rvb][r=fwereade,julian-edwards,allenap,jtv,rvb] MAAS provider (feature branch).

1149. By Dimiter Naydenov

deuglify logging for main packages.

Removed "cmd/juju*: " badge from all commands.

Also remove the "JUJU:" prefix and the automatic
command prefix and name which was just repeating
what's already in the message itself.
So now, instead of:

ERROR JUJU:jujutest:blah jujutest blah command failed: BAM!
ERROR JUJU:juju:bootstrap juju bootstrap command failed: dummy.Bootstrap is broken
INFO JUJU:test hello

We'll have just:
ERROR command failed: BAM!
INFO hello
ERROR command failed: dummy.Bootstrap is broken

The timestamp with format like 2013/04/12 09:59:16
is still there, before the message.

R=rog, dfc
CC=
https://codereview.appspot.com/8674043

1148. By Dimiter Naydenov

various: unify machine and unit status types

Trivial change to simplify the code by unifying
machine and unit status type to params.Status,
rather than two separate types and separate
list of constants.

R=fwereade, rog
CC=
https://codereview.appspot.com/8667043

1147. By Roger Peppe

state/api: enable authentication

R=fwereade, dfc
CC=
https://codereview.appspot.com/8626044

1146. By Roger Peppe

state/api: add Constraints to AllWatcher

R=
CC=
https://codereview.appspot.com/8568044

1145. By Dimiter Naydenov

cmd/juju: status displays machine errors

This makes the juju status command behave in a
more py-juju compatible way, displaying the
following additional information for each
machine:
  agent-state: [whatever machine.Status() reports]
  agent-state-info: [machine.Status().Info, if set]

"instance-state" is not possible to support right now,
so I didn't implement it, but filed a lp:1167441 bug.
Also, when the agent is detected as "down", the
agent-state-info shows the original status and the
info (if set).

Finally, there is a fix for the machiner to handle
SetAgentAlive() and testing it correctly.

R=rog, fwereade
CC=
https://codereview.appspot.com/8561046

1144. By Dimiter Naydenov

worker/machiner: set status and agent alive

The machiner will now set the machine status
as needed (started/stopped), log the actions
with Noticef, and SetAgentAlive(), as required.

R=fwereade, rog
CC=
https://codereview.appspot.com/8630043

1143. By Dave Cheney

source mongo from package

This proposal replaces the source of mongo for state servers. Mongo is now
installed from a package. The source of this package differs depending on the
series of the machine being bootstrapped (which is itself drawn from the tools
installed on the machine). For P and Q, the source is a PPA owned by the Juju
team. For R and above, mongo is available in the archive.

R=rog, dimitern, fwereade
CC=
https://codereview.appspot.com/8648043

1142. By Tim Penhey

Implement the set-environment command.

This change introduces a new command called set-environment. It has an alias
of set-env, and is the pair to get-environment.

Key/value pairs are taken on the command line as positional parameters.

The environment is retrieved from state, updated with the new values, and then
validated using the provider Validate method. The resulting configuration is
passed bach through to the state.SetEnvironConfig.

There are some standard config values that we really don't want
changing. These rules have been encoded in a new function config.Validate.
This is now called from each of the provider validate methods.

I added a non-exported helper method on Config to do the type coersion for
getting values from the known map. This is now used in many internal places.

Since the agent-version was always added in the config.New to be the default
value, I instead add this to the schema default values. The existing tests
make sure this still works as intended.

Added an extra test for backslashes in names. Moved the firewall-mode default
behaviour up into the base class, as it was identical in all three provider
validate methods.

R=fwereade, dfc
CC=
https://codereview.appspot.com/8610043

Branch metadata

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

Subscribers