Comment 0 for bug 1993847

Revision history for this message
Marian Gasparovic (marosg) wrote :

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

It is not allowed to specify subordinate arch constraint. Dry run does not complain but actual deploy does.

$ 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