Skip to content

Commit

Permalink
Merge pull request juju#11125 from anastasiamac/not-supported-msg-lp1…
Browse files Browse the repository at this point in the history
…860154

juju#11125

## Description of change

Bootstrap message was omitting critical detail when bootstrapping k8s controller with --build-agent option: it was erring out but not saying that the option is not supported. See linked bug.

## QA steps

```
$ juju bootstrap --build-agent microk8s mk8s
Creating Juju controller "mk8s" on microk8s/localhost
ERROR failed to bootstrap model: --build-agent when bootstrapping a k8s controller not supported
```

## Bug reference

https://bugs.launchpad.net/juju/+bug/1860154
  • Loading branch information
jujubot authored Jan 19, 2020
2 parents 372a776 + 074884c commit 0b9d2d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions environs/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,13 @@ func bootstrapCAAS(
bootstrapParams environs.BootstrapParams,
) error {
if args.BuildAgent {
return errors.NewNotSupported(nil, "--build-agent when bootstrapping a k8s controller")
return errors.NotSupportedf("--build-agent when bootstrapping a k8s controller")
}
if args.BootstrapImage != "" {
return errors.NewNotSupported(nil, "--bootstrap-image when bootstrapping a k8s controller")
return errors.NotSupportedf("--bootstrap-image when bootstrapping a k8s controller")
}
if args.BootstrapSeries != "" {
return errors.NewNotSupported(nil, "--bootstrap-series when bootstrapping a k8s controller")
return errors.NotSupportedf("--bootstrap-series when bootstrapping a k8s controller")
}

constraintsValidator, err := environ.ConstraintsValidator(callCtx)
Expand Down

0 comments on commit 0b9d2d8

Please sign in to comment.