Skip to content

Commit 0b9d2d8

Browse files
authored
Merge pull request juju#11125 from anastasiamac/not-supported-msg-lp1860154
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
2 parents 372a776 + 074884c commit 0b9d2d8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

environs/bootstrap/bootstrap.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,13 +233,13 @@ func bootstrapCAAS(
233233
bootstrapParams environs.BootstrapParams,
234234
) error {
235235
if args.BuildAgent {
236-
return errors.NewNotSupported(nil, "--build-agent when bootstrapping a k8s controller")
236+
return errors.NotSupportedf("--build-agent when bootstrapping a k8s controller")
237237
}
238238
if args.BootstrapImage != "" {
239-
return errors.NewNotSupported(nil, "--bootstrap-image when bootstrapping a k8s controller")
239+
return errors.NotSupportedf("--bootstrap-image when bootstrapping a k8s controller")
240240
}
241241
if args.BootstrapSeries != "" {
242-
return errors.NewNotSupported(nil, "--bootstrap-series when bootstrapping a k8s controller")
242+
return errors.NotSupportedf("--bootstrap-series when bootstrapping a k8s controller")
243243
}
244244

245245
constraintsValidator, err := environ.ConstraintsValidator(callCtx)

0 commit comments

Comments
 (0)