upgrade k8s charms broken by lxd profile checks

Bug #1824272 reported by Ian Booth on 2019-04-11
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ian Booth

Bug Description

$ juju upgrade-charm mariadb-k8s --path .
Added charm "local:kubernetes/mariadb-k8s-1" to the model.
ERROR unable to set charm profile: unit "baz/0" is not assigned to a machine (not assigned)

k8s charms don't have assigned machines. The facade needs to check for a caas model and skip this step

Ian Booth (wallyworld) on 2019-04-11
description: updated
Changed in juju:
assignee: nobody → Heather Lanigan (hmlanigan)
Changed in juju:
status: Triaged → In Progress
Heather Lanigan (hmlanigan) wrote :

@wallyworld, how do i setup to deploy the local k8s charm for reproduction and testing purposes?

$ juju deploy ~/charms/mariadb-k8s/
ERROR local charm missing OCI images for: mysql_image

which is from charm pull cs:~juju/mariadb-k8s

I'm following the instructions here:

side note:
$ juju deploy cs:~juju/mariadb-k8s
gets stuck:
Unit Workload Agent Address Ports Message
mariadb-k8s/0 waiting allocating waiting for container

Heather Lanigan (hmlanigan) wrote :

I now remember to build the charm, use to the old ones with no building after charm pull... but building the charm fails:

$ charm build -o builds/mariadb-k8s-build src/mariadb-k8s/
build: Destination charm directory: /home/heather/charms/builds/mariadb-k8s-build/builds/mariadb-k8s
build: Processing layer: layer:options
build: Processing layer: layer:status
build: Processing layer: layer:caas-base
build: Processing layer: layer:docker-resource
build: Processing layer: mariadb-k8s (from src/mariadb-k8s)
build: Processing interface: mysql
charmtools.build.tactics: Options set for undefined layer: mariadb-k8s

Heather Lanigan (hmlanigan) wrote :

In theory, SetCharmProfile() should not have been called due to early exit in setCharmWithAgentValidation() with a CAAS model: https://github.com/juju/juju/blob/develop/apiserver/facades/client/application/application.go#L926

The db says that the model is a caas type.
juju:PRIMARY> db.models.find({},{"name" :1, "type" :1})
{ "_id" : "fa6a0114-d944-419e-84de-66a3b75b3194", "name" : "controller", "type" : "iaas" }
{ "_id" : "5440e0f6-6e8b-4912-8884-bf91c594207c", "name" : "test", "type" : "caas" }

Need the reproducer to continue.

Heather Lanigan (hmlanigan) wrote :

Got the cs:~juju/mariadb-k8s charm installed.

Ian Booth (wallyworld) on 2019-04-11
Changed in juju:
assignee: Heather Lanigan (hmlanigan) → Ian Booth (wallyworld)
status: In Progress → Fix Committed
Heather Lanigan (hmlanigan) wrote :

Fix in develop has been previously committed.

For 2.5: https://github.com/juju/juju/pull/10032

Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers