juju happily deploys a machine bundle on a k8s model

Bug #2048168 reported by Leon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Medium
Unassigned

Bug Description

I accidentally asked juju to deploy the following machine bundle on a k8s model:

series: jammy
saas:
  prom:
    url: k8s2:admin/cos.prom
applications:
  cos-proxy:
    charm: ./cos-proxy_ubuntu-20.04-amd64_ubuntu-22.04-amd64.charm
    series: focal
    num_units: 1
  nrpe:
    charm: nrpe
    channel: edge
    revision: 114
  ub:
    charm: ubuntu
    channel: stable
    revision: 24
    series: focal
    num_units: 1
relations:
- - cos-proxy:downstream-prometheus-scrape
  - prom:metrics-endpoint
- - nrpe:monitors
  - cos-proxy:monitors
- - nrpe:general-info
  - ub:juju-info

As a result, the deploy command errored out, but cos-proxy and nrpe were deployed nonetheless:

$ juju deploy ./lxd-bundle.yaml
Located charm "nrpe" in charm-hub, channel edge
Located charm "ubuntu" in charm-hub, channel stable
Executing changes:
- upload charm /home/ubuntu/code/o11y/cos-proxy-operator/cos-proxy_ubuntu-20.04-amd64_ubuntu-22.04-amd64.charm for series focal with architecture=amd64
- deploy application cos-proxy on focal
- upload charm nrpe from charm-hub for series jammy with revision 114 with architecture=amd64
- deploy application nrpe from charm-hub on jammy with edge
- upload charm ubuntu from charm-hub for series focal with revision 24 with architecture=amd64
- deploy application ub from charm-hub on focal with stable using ubuntu
ERROR cannot deploy bundle: cannot deploy application "ub": block storage "block" is not supported for container charms

---

I'd expect this deploy command to fail without any charms deployed, because:
1. The bundle didn't specify `bundle: kubernetes` but is attempted on a k8s model.
2. The charms are machine charms, but attempted on a k8s model.
3. The error "block storage "block" is not supported for container charms" could potentially be flagged before going forward with any charm deployments.

Revision history for this message
Ian Booth (wallyworld) wrote :

There's really no such thing as a "machine charm". If by machine charm you mean a charm which does not define any workload containers, then that's still a valid k8s charm; it's a "pure" operator charm for want of a better term.

We should fail early though if a bundle is not valid for the model.

Changed in juju:
status: New → Triaged
importance: Undecided → Medium
tags: added: bundles k8s usability
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.