arch in model-constraints is not respected in bundle

Bug #1993660 reported by Marian Gasparovic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
High
Unassigned
2.9
Fix Released
High
Simon Richardson

Bug Description

juju deploy <charm> honors arch constraint in model-constraints, but juju deploy bundle ignores it

$ juju get-model-constraints
arch=arm64 spaces=oam-space

# this uses arm64 from model-constraints
$ juju deploy ubuntu
Located charm "ubuntu" in charm-hub, revision 19
Deploying "ubuntu" from charm-hub charm "ubuntu", revision 19 in channel stable on focal

$ juju show-unit ubuntu/0
ubuntu/0:
  machine: "0"
  opened-ports: []
  charm: ch:arm64/focal/ubuntu-19
  leader: false
  life: alive

# this uses incorrect amd64
$ cat bundle.yaml
applications:
  ubuntu1:
    bindings:
      ? ''
      : oam-space
    charm: ch:ubuntu
    num_units: 1
series: focal
relations: []

$ juju deploy ./bundle.yaml
Located charm "ubuntu" in charm-hub, channel stable
Executing changes:
- upload charm ubuntu from charm-hub for series focal with architecture=amd64
- deploy application ubuntu1 from charm-hub on focal using ubuntu
- add unit ubuntu1/0 to new machine 1
Deploy of bundle completed.

$ juju show-unit ubuntu1/0
ubuntu1/0:
  machine: "1"
  opened-ports: []
  charm: ch:amd64/focal/ubuntu-21
  leader: false
  life: alive

Results in different charm revisions

App Version Status Scale Charm Channel Rev Exposed Message
ubuntu 20.04 active 1 ubuntu stable 19 no
ubuntu1 20.04 active 1 ubuntu stable 21 no

tags: added: foundations-engine
removed: foundations-maas
John A Meinel (jameinel)
Changed in juju:
importance: Undecided → High
status: New → Triaged
Revision history for this message
John A Meinel (jameinel) wrote :

Like cli args, I think a bundle should be able to override a model setting, but we should be able to inherit a model setting if the bundle doesn't specify anything.

Revision history for this message
Simon Richardson (simonrichardson) wrote :

Essentially, we just weren't passing the model constraints in when calculating the arch, so it was falling back to amd64.

The PR https://github.com/juju/juju/pull/15103

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.