Amulet, tools to help with test writing

Marco Ceppi marco.ceppi at canonical.com
Wed Jul 10 11:45:35 UTC 2013


On Wed, Jul 10, 2013 at 7:08 AM, Stuart Bishop
<stuart.bishop at canonical.com>wrote:

> On Wed, Jul 10, 2013 at 12:35 AM, Marco Ceppi <marco.ceppi at canonical.com>
> wrote:
>
> > I hope to have weekly updates to the tool set, now available in
> > ppa:juju/pkgs, the current command available is a port of the jitsu watch
> > command which can be used as follows
>
> I was looking forward to this, but it seems the approach is the same
> as what I already have and suffers from the same problem. It waits
> until services and relations are in a success state, but for tests we
> need to wait until all the queued triggers have completed *and* that
> the services and relations are in a success state. Services and
> relations can be setup, but the service still be in a state of major
> flux and non-functional until the hook storm has died down and the
> service is in a stable state. I can't see anyway of knowing this from
> the output of juju status as the list of queued hooks is not exposed,
> and was hoping you were going to reach into the mongo database and
> extract the needed information or some other magic I hadn't thought
> of.
>
> Can you think of any way around this, or does juju need to expose a
> list of running and pending hooks?
>

While I'm not sure about going so deep as the mongodb database, but one
thing I'm working on with the amulet is juju-deployer integration and what
I'm calling "sentry" deployments. Essentially, with amulet you describe a
deployment (deploy, relate, expose, configure, etc), it translates that to
a deployer schema file, then builds charms that deploy as subordinates on
all services and a standalone relation manager sentry charm that intercepts
and proxies all relations. With this sentry setup you can inspect relation
data being sent on the wire and the subordinates allow you easy access to
drill down on the state of each unit.

I hadn't intended on wait being much more than jitsu watch but now that I
understand your problem a little more I can have it use the sentries (when
sentries are used) to determine if hooks are still running on any machine
(ideally, if a hook is still running on any machine, then the set up isn't
ready yet). However, I'm open to diving in to the mongodb/zookeeper node to
determine this, but fear that since there's no guarantee on those schemas
there will be a lot of catching up to do as progress is made.

I'm working on deployer/sentry integration now and should have it out
before the end of this month. If you think this fits your case I'll let you
know when it's ready for testing.

Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20130710/2f937cf1/attachment.html>


More information about the Juju mailing list