subordinate does not follow primary charm architecture

Bug #1993847 reported by Marian Gasparovic
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
High
Unassigned

Bug Description

Buundle which deploys a charm to machine, another charm to a container and then a subordinate charm.
Primary charms use arch=arm64 constraint. During deploy subordinate does not follow the architecture of a primary charm.

applications:
  ceph-osd:
    bindings:
      ? ''
      : oam-space
    channel: quincy/stable
    charm: ceph-osd
    num_units: 1
    constraints: "arch=arm64"
    to:
    - '0'
  glance-simplestreams-sync:
    bindings:
      ? ''
      : oam-space
    channel: yoga/stable
    charm: glance-simplestreams-sync
    num_units: 1
    constraints: "arch=arm64"
    to:
    - lxd:0
  octavia-diskimage-retrofit:
    bindings:
      ? ''
      : oam-space
    channel: yoga/stable
    charm: octavia-diskimage-retrofit
machines:
  '0':
    constraints: tags=foundation-nodes zones=zone1
series: jammy
relations:
- ['glance-simplestreams-sync:juju-info', 'octavia-diskimage-retrofit:juju-info']

$ juju deploy ./bundle.yaml --dry-run
Located charm "ceph-osd" in charm-hub, channel quincy/stable
Located charm "glance-simplestreams-sync" in charm-hub, channel yoga/stable
Located charm "octavia-diskimage-retrofit" in charm-hub, channel yoga/stable
Changes to deploy bundle:
- upload charm ceph-osd from charm-hub for series jammy from channel quincy/stable with architecture=arm64
- deploy application ceph-osd from charm-hub on jammy with quincy/stable
- upload charm glance-simplestreams-sync from charm-hub for series jammy from channel yoga/stable with architecture=arm64
- deploy application glance-simplestreams-sync from charm-hub on jammy with yoga/stable
- upload charm octavia-diskimage-retrofit from charm-hub for series jammy from channel yoga/stable with architecture=amd64
- deploy application octavia-diskimage-retrofit from charm-hub on jammy with yoga/stable
- add new machine 0
- add relation glance-simplestreams-sync:juju-info - octavia-diskimage-retrofit:juju-info
- add unit ceph-osd/0 to new machine 0
- add lxd container 0/lxd/0 on new machine 0
- add unit glance-simplestreams-sync/0 to 0/lxd/0

Then I added arch constraint to subordinate octavia-diskimage-retrofit.
It is not allowed to specify subordinate arch constraint. Dry run does not complain but actual deploy does.
Actually dry-run shows a correct arch thanks to constraint in this case but real deploy fails on it.

$ juju deploy ./bundle.yaml --dry-run
Located charm "ceph-osd" in charm-hub, channel quincy/stable
Located charm "glance-simplestreams-sync" in charm-hub, channel yoga/stable
Located charm "octavia-diskimage-retrofit" in charm-hub, channel yoga/stable
Changes to deploy bundle:
- upload charm ceph-osd from charm-hub for series jammy from channel quincy/stable with architecture=arm64
- deploy application ceph-osd from charm-hub on jammy with quincy/stable
- upload charm glance-simplestreams-sync from charm-hub for series jammy from channel yoga/stable with architecture=arm64
- deploy application glance-simplestreams-sync from charm-hub on jammy with yoga/stable
- upload charm octavia-diskimage-retrofit from charm-hub for series jammy from channel yoga/stable with architecture=arm64
- deploy application octavia-diskimage-retrofit from charm-hub on jammy with yoga/stable
- add new machine 0
- add relation glance-simplestreams-sync:juju-info - octavia-diskimage-retrofit:juju-info
- add unit ceph-osd/0 to new machine 0
- add lxd container 0/lxd/0 on new machine 0
- add unit glance-simplestreams-sync/0 to 0/lxd/0

$ juju deploy ./bundle.yaml
Located charm "ceph-osd" in charm-hub, channel quincy/stable
Located charm "glance-simplestreams-sync" in charm-hub, channel yoga/stable
Located charm "octavia-diskimage-retrofit" in charm-hub, channel yoga/stable
Executing changes:
- upload charm ceph-osd from charm-hub for series jammy from channel quincy/stable with architecture=arm64
- deploy application ceph-osd from charm-hub on jammy with quincy/stable
- upload charm glance-simplestreams-sync from charm-hub for series jammy from channel yoga/stable with architecture=arm64
- deploy application glance-simplestreams-sync from charm-hub on jammy with yoga/stable
  added resource simplestreams
- upload charm octavia-diskimage-retrofit from charm-hub for series jammy from channel yoga/stable with architecture=arm64
- deploy application octavia-diskimage-retrofit from charm-hub on jammy with yoga/stable
ERROR cannot deploy bundle: cannot deploy application "octavia-diskimage-retrofit": subordinate application must be deployed without constraints

description: updated
Ian Booth (wallyworld)
Changed in juju:
milestone: none → 2.9.38
status: New → Triaged
importance: Undecided → High
Revision history for this message
Ian Booth (wallyworld) wrote :

--dry-run should IMO definitely include any validation checks and print such errors.

Since you can't specify constraints with a subordinate charm, it also seems reasonable that a subordinate charm inherit the arch of its principal - it's going on the same machine after all.

Changed in juju:
milestone: 2.9.38 → 2.9.39
Changed in juju:
milestone: 2.9.39 → 2.9.40
Changed in juju:
milestone: 2.9.40 → 2.9.41
Changed in juju:
milestone: 2.9.41 → 2.9.42
Changed in juju:
milestone: 2.9.42 → 2.9.43
Changed in juju:
milestone: 2.9.43 → 2.9.44
Changed in juju:
milestone: 2.9.44 → 2.9.45
Changed in juju:
milestone: 2.9.45 → 2.9.46
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.