juju deploy --dry-run does not catch relations error in bundle
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
When deploying (or applying a new config to an existing model) a bundle some might want to ensure that everything is correct.
To do so, we can use the --dry-run flag.
When doing so, juju does not validate the relations as it does it without the --dry-run flag.
For example, if we take this simple bundle:
applications:
ubuntu:
charm: cs:ubuntu
nrpe:
charm: cs:nrpe
relations:
- ["nrpe:foo", "ubuntu:foo"]
The ubuntu charm does not have the foo option. If we try to validate the bundle with juju deploy --dry-run, we get the following output:
juju deploy bundle.yaml --dry-run
Resolving charm: cs:nrpe
Resolving charm: cs:ubuntu
Changes to deploy bundle:
- upload charm cs:nrpe-57
- deploy application nrpe using cs:nrpe-57
- upload charm cs:ubuntu-12
- deploy application ubuntu using cs:ubuntu-12
- add relation nrpe:foo - ubuntu:foo
Everything seems to be fine according to juju.
If we want to deploy, without dry-run, then we get the error that we expect:
juju deploy bundle.yaml
Resolving charm: cs:nrpe
Resolving charm: cs:ubuntu
Executing changes:
- upload charm cs:nrpe-57
- deploy application nrpe using cs:nrpe-57
- upload charm cs:ubuntu-12
- deploy application ubuntu using cs:ubuntu-12
- add relation nrpe:foo - ubuntu:foo
ERROR cannot deploy bundle: cannot add relation between "nrpe:foo" and "ubuntu:foo": application "nrpe" has no "foo" relation
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → Medium |
This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.