Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master into embedded-gui. #5036

Merged
merged 137 commits into from Apr 7, 2016

Conversation

frankban
Copy link
Member

@frankban frankban commented Apr 7, 2016

wallyworld and others added 30 commits March 15, 2016 01:26
Our test suite was generating at least 3 certificates at runtime, which
takes several seconds each time. Just generate one and leave it in the
file as a testing certificate.
We weren't able to directly put lxd.Client.CopyImage into an interface
because it needs the exact lxd.Client object. But if we wrap it a bit
deeper we can actually do some testing on the logic inside of
EnsureImageExists. It is a Stub (mock) sort of test which is fairly tied
to the specifics, but we really do want to test things like "what do we
do if we fail to connect to a Remote", and "what if the remote doesn't
have the Alias".

This doesn't change any functionality (that will be coming in later
patches), but does make it possible to test things.
lxdbr0 is replacing lxcbr0, and isn't very useful in its default
configuration. Let's configure it so that it is more useful (note that this
just mirrors the configuration of lxcbr0 as it is today, presumably we'll
want to do something more advanced later)

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Tycho Andersen and others added 27 commits April 6, 2016 08:55
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
lp1538303: Retry with EOF error from API Open

During bootstrap, we may get EOF or upgrade in
progress errors while juju is still coming up.
We would retry when we got those errors from
the blocks.List call, but it is also possible
to get an EOF error from the Login (apiOpen).

Those should be retried as well.

This is a forward port of:
juju#4247

(Review request: http://reviews.vapour.ws/r/4407/)
This also creates a CharmID type that simplifies a lot of the code.
Only create allocation if deployment succeeds.



(Review request: http://reviews.vapour.ws/r/4444/)
Update romulus & uitable, picking up right-align column fix.



(Review request: http://reviews.vapour.ws/r/4449/)
backing support for using channel with juju charm list-resources

This creates a new type, charmstore.CharmID, which is used in places where we need to have a unique reference to the charmstore for a charm... with a resolved charm url (i.e. one that has a revision), this is a unique ID that is sufficient to request the current resources for a charm.

(Review request: http://reviews.vapour.ws/r/4269/)
lxd provider: use right bind address for LXD

Prevents:

ERROR cannot find network interface "lxcbr0": route ip+net: no such network interface
ERROR invalid config: route ip+net: no such network interface

when the user doesn't have a lxcbr0 (i.e. doesn't have lxc1 installed).

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>

(Review request: http://reviews.vapour.ws/r/4446/)
…trap

Some code cleanup to set the stage.

- Turned some nested loops into some closures because I couldn't easily tell what errors were being modified/examined.
- Converted all errors to utilize juju/errors

(Review request: http://reviews.vapour.ws/r/4457/)
A common failure mode of our tests is when an issue occurs during the
SetUp phase of the suite or test, not only does the test fail, but the
Tear down phase blows up because it is rarely written to handle the case
where the setup phase did not complete.

This PR is a toe in the water to experiment with applying a philosophy
of moving work from the TearDown phase of the test suite to a
'defer-like' AddCleanup style.
all: prefer AddCleanup to TearDown

A common failure mode of our tests is when an issue occurs during the
SetUp phase of the suite or test, not only does the test fail, but the
Tear down phase blows up because it is rarely written to handle the case
where the setup phase did not complete.

This PR is a toe in the water to experiment with applying a philosophy
of moving work from the TearDown phase of the test suite to a
'defer-like' AddCleanup style.

(Review request: http://reviews.vapour.ws/r/4465/)
centos doesn't have `ip` by default, so we can't test against the local
network configuration since we can't query it.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
…egardless.

Changed to only try to delete security groups of instances we know we've terminated.
Added tests.
Resolve a couple small conflicts.

Conflicts:
	tools/lxdclient/client_image.go
lxd container type: skip local subnet test if no `ip` tool present

centos doesn't have `ip` by default, so we can't test against the local
network configuration since we can't query it.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>

(Review request: http://reviews.vapour.ws/r/4469/)
Create a testing certificate rather than runtime

Our test suite was generating at least 3 certificates at runtime, which
takes several seconds each time. Just generate one and leave it in the
file as a testing certificate.

(Review request: http://reviews.vapour.ws/r/4318/)
Add direct tests of EnsureImageExists

We weren't able to directly put lxd.Client.CopyImage into an interface
because it needs the exact lxd.Client object. But if we wrap it a bit
deeper we can actually do some testing on the logic inside of
EnsureImageExists. It is a Stub (mock) sort of test which is fairly tied
to the specifics, but we really do want to test things like "what do we
do if we fail to connect to a Remote", and "what if the remote doesn't
have the Alias".

This doesn't change any functionality (that will be coming in later
patches), but does make it possible to test things.

(Review request: http://reviews.vapour.ws/r/4323/)
a fix from review

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Fixes bug 1537620: delete ec2 security group with exponential delay btw retries.

Added retry for security group delete with exponential delays plus tests.

Also tested manually.

(Review request: http://reviews.vapour.ws/r/4456/)
Feature juju run action

The branch is ready for merging. The only error at
    http://reports.vapour.ws/releases/3854
is caused by a lxd change that affects all juju branches

There are no open bugs
    https://bugs.launchpad.net/juju-core/feature-juju-run-action

(Review request: http://reviews.vapour.ws/r/4476/)
lxd provider: better errors when bootstrap failed

When LXD isn't installed:

$ juju bootstrap bob lxd
ERROR invalid config: can't connect to the local LXD server: LXD socket not found; is LXD installed & running?

Please install LXD by running:
  $ sudo apt-get install lxd
and then configure it with:
  $ newgrp lxd
  $ lxd init

When the user doesn't have permissions:

$ juju bootstrap bob lxd
ERROR invalid config: can't connect to the local LXD server: Permisson denied, are you in the lxd group?

Please configure LXD by running:
  $ newgrp lxd
  $ lxd init

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>

(Review request: http://reviews.vapour.ws/r/4424/)
@frankban
Copy link
Member Author

frankban commented Apr 7, 2016

$$merge$$

@jujubot
Copy link
Collaborator

jujubot commented Apr 7, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit 659c902 into juju:embedded-gui Apr 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet