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

Bug #1835442 reported by Nicolas Pochet
12
This bug affects 2 people
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 series as it does it without the --dry-run flag.
For example, if we take this simple bundle:

applications:
  ubuntu:
    charm: cs:ubuntu
    series: 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:ubuntu
Changes to deploy bundle:
- upload charm cs:ubuntu-12 for series foo
- deploy application ubuntu on foo using cs:ubuntu-12

Everything seems to be fine according to juju. We can deploy to the foo series.
If we want to deploy, without dry-run, then we get the error that we expect:

juju deploy bundle.yaml
Resolving charm: cs:ubuntu
Executing changes:
- upload charm cs:ubuntu-12 for series foo
- deploy application ubuntu on foo using cs:ubuntu-12
ERROR cannot deploy bundle: series "foo" not supported by charm, supported series are: xenial,bionic,artful,trusty,precise

John A Meinel (jameinel)
Changed in juju:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Felipe Reyes (freyes) wrote :

now that charmhub supports multiple bases this caveat becomes more important (to me), because in the CI we use a lot of "juju deploy --dry-run" to determine if a given bundle is "reasonably correct", and knowing if juju will find a charm to run in the desired architecture[0] and series is important.

 ~ $ cat bundle.yaml
series: jammy
applications:
  ubuntu:
    charm: ch:ubuntu
    num_units: 1
 ~ $ juju deploy --dry-run ./bundle.yaml
Located charm "ubuntu" in charm-hub, channel stable
Changes to deploy bundle:
- upload charm ubuntu from charm-hub for series jammy with architecture=amd64
- deploy application ubuntu from charm-hub on jammy
- add unit ubuntu/0 to new machine 0
 ~ $ juju deploy ./bundle.yaml
Located charm "ubuntu" in charm-hub, channel stable
Executing changes:
- upload charm ubuntu from charm-hub for series jammy with architecture=amd64
- deploy application ubuntu from charm-hub on jammy
ERROR cannot deploy bundle: series "jammy" not supported by charm, supported series are: focal, bionic, xenial, groovy

[0] OpenStack charms support amd64, arm64, ppc64el, s390x

Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This Medium-priority bug has not been updated in 60 days, 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.