Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Implement "juju deploy --attach-storage" #7355
Conversation
| @@ -102,6 +107,16 @@ type DeployArgs struct { | ||
| // it. Placement directives, if provided, specify the machine on which the charm | ||
| // is deployed. | ||
| func (c *Client) Deploy(args DeployArgs) error { | ||
| + if len(args.AttachStorage) > 0 && args.NumUnits != 1 { | ||
| + return errors.Errorf("AttachStorage is non-empty, but NumUnits is %d", args.NumUnits) |
wallyworld
May 18, 2017
Owner
I think this could be more user friendly
"Cannot specify storage attachments when more than one unit is requested"
or something like that
axw
May 18, 2017
Member
Done. The error message is intended for the programmer that writes to the API, but I guess we should assume that they'll just send the error up to the user.
| c.Assert(err, jc.ErrorIsNil) | ||
| // It should be allocated to a machine, which should then be provisioned. | ||
| - c.Logf("service %q added with 1 unit, waiting for unit %q's machine to be started...", svc.Name(), units[0].Name()) | ||
| + c.Logf("service %q added with 1 unit, waiting for unit %q's machine to be started...", svc.Name(), unit.Name()) |
axw
added some commits
May 17, 2017
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
jujubot
merged commit 6a6874a
into
juju:feature-persistent-storage
May 18, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
axw commentedMay 18, 2017
Description of change
This branch adds the --attach-storage flag to the "juju deploy" command, along with the corresponding API and API server changes. The state changes were made in a previous branch. With this change, it is possible to attach existing storage to the initial unit of an application.
There are a few fixes bundled in here as separate commits:
QA steps
$ sudo -u postgres psql
$ sudo -u postgres psql
NOTE: it is a current limitation that the AZ must be explicitly specified. This limitation will be addressed before 2.3 is released.
Documentation changes
Yes, we will need to add documentation of the new --attach-storage flag. It accepts a list of detached storage IDs, which will be attached to the initial unit of the application. This flag may not be used with "-n".
Bug reference
None.