Block CLI and operation related changes. #1652

Closed
wants to merge 54 commits into
from

Conversation

Projects
None yet
9 participants
Member

anastasiamac commented Feb 23, 2015

Cleaner version of CLI and operation block.
This PR plugs commands and operations into a new implementation of blocks.
Despite its size, most of changes are mechanical. These files contains the most logic changes:

github.com/juju/juju/cmd/juju/block/block.go
github.com/juju/juju/apiserver/client/api_test.go
github.com/juju/juju/cmd/juju/block/block.go
github.com/juju/juju/apiserver/common/block.go
github.com/juju/juju/apiserver/common/testing/block.go
github.com/juju/juju/cmd/juju/block/block_test.go
github.com/juju/juju/apiserver/common/block_test.go
github.com/juju/juju/api/client.go
github.com/juju/juju/apiserver/client/client.go
github.com/juju/juju/apiserver/common/errors.go
github.com/juju/juju/cmd/juju/block/export_test.go
github.com/juju/juju/cmd/juju/package_test.go
github.com/juju/juju/cmd/juju/block/protection.go
github.com/juju/juju/apiserver/tools.go
github.com/juju/juju/cmd/juju/block/unblock.go
github.com/juju/juju/cmd/juju/upgradejuju_test.go

Original - GH: #1638
Original -RB: http://reviews.vapour.ws/r/967

(Review request: http://reviews.vapour.ws/r/979/)

anastasiamac and others added some commits Feb 23, 2015

Fix go vet warnings with go1.4.1 version of go vet
    go version go1.4.1
    checking: go fmt ...
    checking: go vet ...
    apiserver/provisioner/provisioner.go:1028: arg addr for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/provisioner.go:1032: arg addr for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/provisioner.go:1040: arg addr for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/provisioner.go:1046: arg addr for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/provisioner.go:1052: arg addr for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/provisioner.go:1080: arg addr for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/provisioner.go:1088: arg addr for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/provisioner.go:1095: arg addr for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/provisioner.go:1098: arg addr for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/provisioner.go:1113: arg addr for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/prepare_test.go:316: arg ip for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/prepare_test.go:382: arg ip for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/prepare_test.go:395: arg ip for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/prepare_test.go:401: arg ip for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/prepare_test.go:465: arg ip for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/prepare_test.go:471: arg ip for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    juju/testing/conn.go:276: possible formatting directive in Log call
worker/provisioner: filter lxc tools to host arch
For LXC only: LXC can naturally only run
containers with the some architecture as
the host.
Member

anastasiamac commented Feb 24, 2015

$$merge$$

Contributor

jujubot commented Feb 24, 2015

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

Contributor

jujubot commented Feb 24, 2015

Build failed: Does not match ['fixes-1424695', 'fixes-1424777', 'fixes-1424669']
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/2245

wallyworld and others added some commits Feb 23, 2015

uniter: add storage events to filter
The uniter will now watch for storage attachment
life cycle events. This will be used later to
trigger storage-* hooks.
Move get / set constraints into common directory
This patch does three things:

1 - Moves the get/set-constraints code into the
common directory (see below).  The addition of the
get/set-constraints subcommands for environment
and service will be added as a separate commit.

2 - Removes the test dependency on mongoDB

3 - Changes get/set-constraints to be registered
as deprecated in 2.0 and obsolete in 3.0

As part of the hierarchical command work, there are
a few commands which can be under more than one super
command.  For example, get-constraints can be accessed
by both:

juju environment get-constraints
juju service get-constraints

To help organize these commands, the core functionality
will be moved into the juju/juju/cmd/juju/common
directory.  When possible, test dependencies on mongoDB
will be removed.
Move get / set constraints into common directory
This patch does three things:

1 - Moves the get/set-constraints code into the
common directory (see below).  The addition of the
get/set-constraints subcommands for environment
and service will be added as a separate commit.

2 - Removes the test dependency on mongoDB

3 - Changes get/set-constraints to be registered
as deprecated in 2.0 and obsolete in 3.0

As part of the hierarchical command work, there are
a few commands which can be under more than one super
command.  For example, get-constraints can be accessed
by both:

juju environment get-constraints
juju service get-constraints

To help organize these commands, the core functionality
will be moved into the juju/juju/cmd/juju/common
directory.  When possible, test dependencies on mongoDB
will be removed.
Addressing review comments.
Moved common_test.go into the featuretests package.  Renamed it
to cmdjuju_test.go to differentiate from jujud commands, should
there be a need to add tests from that package at a later date.
Merge pull request #1673 from dimitern/lp-1424777-for-1.23
Fixed lp:1424777 - forward port to 1.23

Same tests and same fix as for 1.22 proposed with #1670, but ported to 1.23.

(Review request: http://reviews.vapour.ws/r/1001/)
Merge pull request #1675 from wallyworld/skip-broken-i386-tests
Disable pinger tests on i386

As discussed with Curtis, these tests will be re-enabled once the suite can pass reliably on i386.

(Review request: http://reviews.vapour.ws/r/1003/)
Merge pull request #1679 from dimitern/lp-1425242-1.23
Disabled failing openstack provider tests on PPC64EL - 1.23

Forward port of #1678 to 1.23 (trunk).

See http://pad.lv/1425242/

(Review request: http://reviews.vapour.ws/r/1007/)
Merge pull request #1662 from wallyworld/tmpfs-storage-provider
Add tmpfs storage provider

Implement a tmpfs storage provider.
Fix some mistakes in the rootfs tests as well, and factor out some common code.

(Review request: http://reviews.vapour.ws/r/990/)
Merge pull request #1684 from howbazaar/mess-to-jes
Rename the MESS feature flag.

MESS is dead. Long live JES.

(Review request: http://reviews.vapour.ws/r/1012/)
Member

anastasiamac commented Feb 25, 2015

$$merge$$

Contributor

jujubot commented Feb 25, 2015

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

jujubot added some commits Feb 25, 2015

Merge pull request #1647 from cmars/cmars-006-network-name-panics
LP: #1407727, prevent invalid network names from panicking provisioner.

Discovered this when looking at https://bugs.launchpad.net/juju-core/+bug/1407727.

This PR handles invalid network names in the machine provisioner by setting task error status instead of panicking.
Merge pull request #1650 from axw/uniter-storager
uniter: add storage events to filter

The uniter will now watch for storage attachment life cycle events. This
will be used later to trigger storage-* hooks.

(Review request: http://reviews.vapour.ws/r/977/)
Merge pull request #1672 from cherylj/constraints_take_2
Constraints take 2

The original PR (#1615) was reverted in response to bug 1423782. After speaking with Dave Cheney, it was determined that this is a bug in gccgo, not in this particular code. Alexis decreed yesterday that bugs in PPC would not be blockers until gccgo is fixed, so I am going to land this branch again as I need to do work that builds on it.

(Review request: http://reviews.vapour.ws/r/1000/)
Merge pull request #1671 from bz2/dep_testing_c230cbad
Update juju/testing dependency for windows envvar case fix

Picks up the fix made to OsEnvSuite which is used by juju.

<juju/testing#52>

The hope is this will fix some of the failing windows tests under CI.

(Review request: http://reviews.vapour.ws/r/999/)
Contributor

jujubot commented Feb 26, 2015

Build failed: Generating tarball failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/2284

anastasiamac and others added some commits Feb 26, 2015

Merge pull request #1667 from perrito666/deprecate_restore_plugin
Deprecate old restore plugin

Since the merge of the new restore method, the old restore plugin is of no use and will not be maintained.
This change makes the plugin just make an equivalent call to "juju backups restore" and inform the user of it.
There is also a small fix of a typo I introduced in the last fix of restore and some improved error reporting to better suit this change.

(Review request: http://reviews.vapour.ws/r/995/)
Member

anastasiamac commented Feb 26, 2015

$$merge$$

Contributor

jujubot commented Feb 26, 2015

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

jujubot added some commits Feb 26, 2015

Merge pull request #1657 from dooferlad/master-lxc-broker_test-lp-142…
…3950

Patch version.Current.Arch to arch.AMD64 so tests pass on non-AMD64 hosts

Fixes: lp:1420049

(Review request: http://reviews.vapour.ws/r/985/)
Merge pull request #1654 from johnweldon/go-vet-warnings
Fix go vet warnings with go1.4.1 version of go vet

Go version 1.4 uses an updated version of `go vet` that finds warnings that Go version 1.2.1 doesn't find.

This PR cleans up a couple logging calls that the newer `go vet` finds troublesome.


Fixes output of go vet with go1.4.1 : http://paste.ubuntu.com/10372604/

```
    go version go1.4.1
    checking: go fmt ...
    checking: go vet ...
    apiserver/provisioner/provisioner.go:1028: arg addr for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/provisioner.go:1032: arg addr for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/provisioner.go:1040: arg addr for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/provisioner.go:1046: arg addr for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/provisioner.go:1052: arg addr for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/provisioner.go:1080: arg addr for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/provisioner.go:1088: arg addr for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/provisioner.go:1095: arg addr for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/provisioner.go:1098: arg addr for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/provisioner.go:1113: arg addr for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/prepare_test.go:316: arg ip for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/prepare_test.go:382: arg ip for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/prepare_test.go:395: arg ip for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/prepare_test.go:401: arg ip for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/prepare_test.go:465: arg ip for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    apiserver/provisioner/prepare_test.go:471: arg ip for printf verb %q of wrong type: *github.com/juju/juju/state.IPAddress
    juju/testing/conn.go:276: possible formatting directive in Log call
```

(Review request: http://reviews.vapour.ws/r/981/)
Merge pull request #1685 from howbazaar/provisioner-debugging
Some helpful logging.

utils.LoggedErrorStack checks to see if a feature flag is set, and if so, it logs out the error stack.  The function also passes through the error untouched.

This is very useful for those error returns that you as a developer really don't expect to fail, and when they do, you want to know why.  Since this is hidden behind a developer feature flag, it makes no difference to any existing or future live site.

(Review request: http://reviews.vapour.ws/r/1013/)
Contributor

jujubot commented Feb 26, 2015

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/2289

Member

anastasiamac commented Feb 26, 2015

$$merge$$

Contributor

jujubot commented Feb 26, 2015

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

Contributor

jujubot commented Feb 26, 2015

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/2290

@anastasiamac anastasiamac referenced this pull request Feb 26, 2015

Merged

Cli block align #1692

Member

anastasiamac commented Feb 26, 2015

too many issues. PR #1692 instead.

jujubot added a commit that referenced this pull request Feb 27, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment