Local charms are not added to storage on upgrade to 1.22.x

Bug #1447853 reported by Curtis Hovey on 2015-04-24
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-core
High
Horacio Durán
1.22
High
Horacio Durán
1.23
High
Horacio Durán
1.24
High
Horacio Durán

Bug Description

After upgrading from juju 1.21.3 to 1.22.1, the services deployed from a local repo were unusable. We could not make config changes. We see errors like this
     ERROR charm "local:trusty/dummy-source-0" not found

The charm will probable be in error:
   agent-state-info: 'hook failed: "config-changed"'

Both Martin and Curtis discovered this independently testing multiple upgrades1.21.3 > 1.22.1 > 1.23.1

This can be reproduced by with the juju 1.21.3 client
export JUJU_REPOSITORY="$HOME/charms"
bzr branch lp:charms/trusty/apache2 $JUJU_REPOSITORY/trusty/apache2
juju bootstrap
juju deploy local:trusty/apache2
juju set apache2 logrotate_count=9
juju expose apache2
juju status
juju get apache2 | grep -A 3 logrotate_count
juju upgrade-juju --version=1.22.1
juju status
juju get apache2 | grep -A 3 logrotate_count
ERROR charm "local:trusty/apache2-0" not found

WORK AROUND: load the same charm into storage:
juju upgrade-charm --force apache2
juju status
juju resolved --retry apache2/0
juju get apache2 | grep -A 3 logrotate_count

Curtis Hovey (sinzui) on 2015-04-24
description: updated
Curtis Hovey (sinzui) on 2015-04-27
Changed in juju-core:
milestone: 1.24-alpha1 → 1.25.0
Horacio Durán (hduran-8) wrote :

Upgrading from 1.21 to 1.22 I managed to reproduce this with local and cs charms, the result is that, the charms deployed before updating where all broken in the same manner (or that is what could be observed from outside)

cs charm: ERROR charm "cs:trusty/mysql-25" not found
local charm: ERROR charm "local:trusty/wordpress-2" not found

I added some debug ouput to 1.21 and 1.22 and found out that the doc for mysql changes from:

1.21
URL: cs:trusty/mysql-25
Placeholder: false
PendingUpload: false

to

1.22
DocID: e07df409-84a4-4980-885b-dfcd011cf1d1:cs:trusty/mysql-25
Placeholder: true
PendingUpload: false

and the wordpress doc

goes from:

1.21
URL: local:trusty/wordpress-2
Placeholder: false
PendingUpload: false

to:

1.22
Non existing.

For this I used the two patches attached and the script to run the test.

Horacio Durán (hduran-8) wrote :

The problem is here https://github.com/juju/juju/commit/45f84f50 this commit applies a migration step to steps121.go but it got merged on 1.22 so the docs changed but the migration step was never run.

Curtis Hovey (sinzui) on 2015-04-30
Changed in juju-core:
assignee: nobody → Horacio Durán (hduran-8)
Horacio Durán (hduran-8) wrote :
Ian Booth (wallyworld) on 2015-05-01
Changed in juju-core:
status: Triaged → In Progress
Ian Booth (wallyworld) on 2015-05-01
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui) on 2015-05-06
Changed in juju-core:
status: Fix Committed → Confirmed
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers