juju deploy --dry-run does not catch relations error in bundle

Bug #1835443 reported by Nicolas Pochet
8
This bug affects 1 person
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

John A Meinel (jameinel)
Changed in juju:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

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.

Changed in juju:
importance: Medium → Low
tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.