Deploy to existing machine: "base does not match" even when series supported

Bug #1995403 reported by Jordan Barrett
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
High
Unassigned

Bug Description

The setup is: I'm inside a model with a single machine "0" which is running ubuntu@22.04 / jammy. When I try deploy certain charms to this machine, this happens:
-------------------------------------------------------------------
$ juju deploy juju-dashboard d --to 0
Located charm "juju-dashboard" in charm-hub, revision 6
Deploying "d" from charm-hub charm "juju-dashboard", revision 6 in channel stable on ubuntu@20.04/stable
ERROR cannot add application "d": cannot deploy to machine 0: base does not match: unit has "ubuntu@20.04", machine has "ubuntu@22.04"
-------------------------------------------------------------------

However, the juju-dashboard charm supports jammy, so this deployment should work fine. It appears that it is asking Charmhub for the default series, trying to match this against the machine series, and failing when they don't match. Instead, we should read the machine series and request this series from Charmhub.

For now, a workaround is to specify --series:
    juju deploy juju-dashboard d --to 0 --series jammy

-------------------------------------------------------------------
$ juju version --all
version: 3.0.1-ubuntu-amd64
git-commit: deb94d4cac9efe42c0beee07a74f320fae0acd6b
-------------------------------------------------------------------

Ian Booth (wallyworld)
Changed in juju:
milestone: none → 3.0.1
importance: Undecided → High
status: New → Triaged
Changed in juju:
milestone: 3.0.1 → 3.0.2
Changed in juju:
milestone: 3.0.2 → 3.0.3
Revision history for this message
Juan M. Tirado (tiradojm) wrote :

Can we check this again?

Revision history for this message
Vitaly Antonenko (anvial) wrote :

I cannot reproduce this bug (3.0.3):
```
anvial@ubuntu-pc:~/Projects/juju-dev$ juju add-model m
Added 'm' model on localhost/localhost with credential 'localhost' for user 'admin'
anvial@ubuntu-pc:~/Projects/juju-dev$ juju add-machine --series jammy
created machine 0
anvial@ubuntu-pc:~/Projects/juju-dev$ juju status --watch 1s
anvial@ubuntu-pc:~/Projects/juju-dev$ juju deploy juju-dashboard d --to 0
Located charm "juju-dashboard" in charm-hub, revision 8
Deploying "d" from charm-hub charm "juju-dashboard", revision 8 in channel stable on ubuntu@22.04/stable
anvial@ubuntu-pc:~/Projects/juju-dev$
```

Revision history for this message
Jordan Barrett (barrettj12) wrote :

@anvial: that's because of a recent change to Charmhub where jammy is now the default base. We still get this bug if we try to deploy to an e.g. focal machine.
-----------------------------------------------------
$ juju add-machine --series focal
created machine 0
$ juju deploy juju-dashboard d --to 0
Located charm "juju-dashboard" in charm-hub, revision 8
Deploying "d" from charm-hub charm "juju-dashboard", revision 8 in channel stable on ubuntu@22.04/stable
ERROR cannot add application "d": cannot deploy to machine 0: base does not match: unit has "ubuntu@22.04", machine has "ubuntu@20.04"
-----------------------------------------------------

Changed in juju:
milestone: 3.0.3 → 3.0.4
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.