Operations changed over to new block implementation. #1638

Closed
wants to merge 15 commits into
from

Conversation

Projects
None yet
3 participants
Member

anastasiamac commented Feb 20, 2015

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

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

anastasiamac and others added some commits Feb 20, 2015

Merge remote-tracking branch 'origin/block-cmds-update' into block-cm…
…ds-update

Conflicts:
	cmd/juju/constraints_test.go
state: update handling of storage lifecycle
Storage instances now track the number of associated
storage attachments. A storage instance's removal will
be prevented until there are no storage attachments.

Destroying a storage instance will now trigger a cleanup
to destroy associated storage attachments. If there are
none, we can short-circuit the storage instance's removal.

Units no longer track storage instances, but track storage
attachments instead. When there are no storage attachments
remaining, the unit can be destroyed.

We introduce a new watcher for storage attachment life
cycle events. Since storage attachments are not entities
in their own right, we introduce a "transform" function
on the lifecycle-watcher helper that transforms document
IDs immediately prior to emitting them to the user; we
use this to extract storage IDs from storage attachment
document IDs.
state: drop RemoveStorageInstance
It should only be possible to remove
storage instances be destroying them
and removing all attachments.
Merge pull request #1640 from axw/state-storage-lifecycle
state: update handling of storage lifecycle

Storage instances now track the number of associated
storage attachments. A storage instance's removal is
now prevented while there are storage attachments.

Destroying a storage instance will now trigger a cleanup
to destroy associated storage attachments. If there are
none, we short-circuit the storage instance's removal.

Units now track storage attachments rather than instances,
so that units are required to cleanly detach from storage
before being allowed to die.

We introduce a new watcher for storage attachment life
cycle events. Since storage attachments are not entities
in their own right, we introduce a "transform" function
on the lifecycle-watcher helper that transforms document
IDs immediately prior to emitting them to the user; we
use this to extract storage IDs from storage attachment
document IDs.

(Review request: http://reviews.vapour.ws/r/969/)
Merge pull request #1626 from wallyworld/rootfs-storage-provider
Add support for file system storage sources, and rootfs provider

Requires juju/names#41

Add a rootfs storage provider (ported from storage feature branch with changes to accommodate new data model). When writing the tests, it was discovered that the current loop provider tests were broken. These were fixed as well. The issue is that a different gc.C is used in each and every test and is different from that used during test and suite set up. So the mockCommand struct needed to have the gc.C set in each test.

(Review request: http://reviews.vapour.ws/r/956/)
Merge remote-tracking branch 'origin/block-cmds-update' into block-cm…
…ds-update

Conflicts:
	cmd/juju/common/constraints_test.go
Member

anastasiamac commented Feb 23, 2015

Something went wrong... again... There are more collarborators on this PR than I expected.
New, correct PR: #1652 with RB: http://reviews.vapour.ws/r/979/

@anastasiamac anastasiamac deleted the anastasiamac:block-cmds-update branch May 28, 2015

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