juju deploy --dry-run is not thorough enough

Bug #1968538 reported by Claudiu Belu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Wishlist
Unassigned

Bug Description

Juju has the option to do a dry run when deploying a bundle, in which it will do some checks on the validity of the bundle to be deployed.

However, it is not thorough enough, it will not ensure that everything will deploy correctly when dry run is no longer set to true.

For example, let's consider the following bundle:

name: temp-bundle

bundle: kubernetes

applications:
  ingress:
    charm: "nginx-ingress-integrator"
    channel: "stable"
    scale: 1
    trust: true
    options:
      some-option-that-doesnt-exist: "foo"
    bindings:
      "some-binding-that-doesn-texist": "lish"

When running ``juju deploy --trust --dry-run ./bundle.yaml``, the command will exit successfully:

```
juju deploy --trust --dry-run ./bundle.yaml

Located charm "nginx-ingress-integrator" in charm-hub, channel stable
Changes to deploy bundle:
- upload charm nginx-ingress-integrator from charm-hub from channel stable with architecture=amd64
- deploy application ingress from charm-hub with 1 unit with stable using nginx-ingress-integrator
```

But obviously, we're using a config option that does not exist and a binding that does not exist. The expectation would have been for the dry run to fail. Instead, we only see the failure on juju deploy:

```
juju deploy --trust ./bundle.yaml
Located charm "nginx-ingress-integrator" in charm-hub, channel stable
Executing changes:
- upload charm nginx-ingress-integrator from charm-hub from channel stable with architecture=amd64
- deploy application ingress from charm-hub with 1 unit with stable using nginx-ingress-integrator
ERROR cannot deploy bundle: cannot deploy application "ingress": unknown option "some-option-that-doesnt-exist"
```

When writing a more complex custom bundle (e.g.: OpenStack bundle), a user would expect that the dry run would reveal any potential issues with the bundle (wrong config options, wrong bindings, etc.). However, they wouldn't see that, and instead they would end up deploying half the bundle just to run into an error. The units from the deployed half would then have to be cleaned up and decommissioned.

Revision history for this message
Juan M. Tirado (tiradojm) wrote :

I will add this behaviour to our wishlist.

Changed in juju:
importance: Undecided → Wishlist
status: New → Triaged
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.