Juju 1.18.0, can not deploy local charms without series

Bug #1303880 reported by Natalia Bidart on 2014-04-07
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
juju-core
High
Casey Marshall
1.18
Critical
Casey Marshall
juju-core (Ubuntu)
High
Unassigned
Trusty
High
Unassigned

Bug Description

Last night I upgraded to juju 1.18 as per:

nessita@dali:~/canonical/cpi/current$ apt-cache policy juju-core
juju-core:
  Installed: 1.18.0-0ubuntu13.10.1~juju1
  Candidate: 1.18.0-0ubuntu13.10.1~juju1

When trying to deploy the solr-jetty charm from:

lp:~ubuntuone-pqm-team/canonical-is-charms/solr-jetty/ at revno 15

I get this error:

$ juju deploy -e local --repository=./../.juju-repo local:solr-jetty solr-jetty --debug
2014-04-07 15:22:47 INFO juju.cmd supercommand.go:297 running juju-1.18.0-saucy-amd64 [gc]
2014-04-07 15:22:47 DEBUG juju api.go:171 trying cached API connection settings
2014-04-07 15:22:47 INFO juju api.go:238 connecting to API addresses: [10.0.3.1:17070]
2014-04-07 15:22:47 INFO juju apiclient.go:114 state/api: dialing "wss://10.0.3.1:17070/"
2014-04-07 15:22:47 INFO juju apiclient.go:124 state/api: connection established
2014-04-07 15:22:47 ERROR juju.cmd supercommand.go:300 only charm store charm references are supported, with cs: schema

The same charm was working OK with 1.17.6 (confirmed).

WORK AROUND 1
Specify default-series in environments.yaml
    default-series: precise
or
    default-series: trusty
or set it after the fact like so
    juju set-env default-series=precise

WORK AROUND 2
Always specify the series/os-version of the charm:
    juju deploy local:precise/wordpress
    juju deploy local:trusty/wordpress

Related branches

summary: - After upgrade to 1.18, can not longer deploy the solr-jetty charm using
- local provider
+ After upgrade to 1.18, can not longer deploy charms using local provider
summary: - After upgrade to 1.18, can not longer deploy charms using local provider
+ After upgrade to 1.18, can not deploy charms using local provider

If you upgrades from 1.16.x, then the local permissions are wrong. Per the 1.18.0 release notes.

If you have used the local provider before, you may need to manually
clean up some files that are still owned by root. The environment’s jenv
file commonly needs to be removed. If your local environment is named
"local" then there may be a local.jenv owned by root with the JUJU_HOME
directory (~/.juju). After the local environment is destroyed, you can
remove the file like this

    $ sudo rm ~/.juju/environments/local.jenv

Changed in juju-core:
status: New → Incomplete
Natalia Bidart (nataliabidart) wrote :

Hey Curtis,

Before upgrading to 1.18, I was running juju devel version 1.17.6 (from the devel PPA) which already forced the root cleanup when I first upgraded to it.

Also, when I got this error I cleaned up and removed all my .juju folder before retrying and getting the same error.

After some debugging on the #juju-dev channel, the bug can be worked around by using the following charm url:

local:precise/solr-jetty

Changed in juju-core:
status: Incomplete → New
Curtis Hovey (sinzui) on 2014-04-07
Changed in juju-core:
status: New → Triaged
milestone: none → 1.19.0
importance: Undecided → Critical
Marco Ceppi (marcoceppi) on 2014-04-08
summary: - After upgrade to 1.18, can not deploy charms using local provider
+ After upgrade to 1.18, can not deploy local charms

Curtis pointed out the break occurs when you do not explicitly include series, ie:

juju deploy --repository $HOME/charms local:charm

vs

juju deploy --repository $HOME/charms local:precise/charm

the latter will succeed. While it's still a bug in that fuzzy URLs should be expanded it's not nearly as critical as it seems.

Curtis Hovey (sinzui) wrote :

This issue was introduced by recent changes to the charm store and the juju command line client. Juju is not able to deploy ambiguous series. In the case of deployments from the store, juju can ask the store to choose the series (and the store might ask the charm). In the case of local charms, there is no store to ask.

This fails
    juju deploy local:wordpress
This succeeds
    juju deploy local:precise/wordpress

summary: - After upgrade to 1.18, can not deploy local charms
+ Juju 1.18.0, can not deploy local charms without series
description: updated
tags: added: charms regression series
Curtis Hovey (sinzui) on 2014-04-08
Changed in juju-core:
milestone: 1.19.0 → 1.18.1

The other workaround should be to set "default-series" in your environment.

Is the problem that this is ambiguous (there is both trusty and precise
available, which to pick?) or that we can't pick one even when there is
only one option (only precise/wordpress is available, but we don't know
what series, so we don't know what to pick).

On Tue, Apr 8, 2014 at 10:15 PM, Curtis Hovey <email address hidden> wrote:

> ** Changed in: juju-core
> Milestone: 1.19.0 => 1.18.1
>
> --
> You received this bug notification because you are subscribed to juju-
> core.
> https://bugs.launchpad.net/bugs/1303880
>
> Title:
> Juju 1.18.0, can not deploy local charms without series
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1303880/+subscriptions
>

Casey Marshall (cmars) on 2014-04-09
Changed in juju-core:
assignee: nobody → Casey Marshall (cmars)
milestone: 1.18.1 → 2.0
status: Triaged → In Progress
Curtis Hovey (sinzui) on 2014-04-09
description: updated
tags: removed: regression
Curtis Hovey (sinzui) wrote :

I removed <regression> because this change is by design. The affected users are all edge cases we understood. The real bug here is that neither the release not stated that the behaviour was different and that Juju doesn't show an error message asking for the series to be specified.

I can update the docs and make announcements about the de-supporting of ambiguous charms.

When juju doesn't know the series to deploy with, juju could show a message like this:
    The series is not specified in the environment (default-series) or with the charm. Did you mean:
        local:precise/solr-jetty

^ can we rewrite the charm url to hint what the user could have typed. I suggest "precise" since that is the only series that is ambiguous in this case.

Oh! maybe want the local template for environments.yaml (juju init) to include
    # The default series to deploy the state-server and charms on.
    # default-series: precise

Casey Marshall (cmars) wrote :

This has landed in trunk. Do you need it in 1.18?

Casey Marshall (cmars) on 2014-04-11
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui) on 2014-04-11
Changed in juju-core:
milestone: 2.0 → 1.19.0
James Page (james-page) on 2014-04-11
Changed in juju-core (Ubuntu Trusty):
status: New → Triaged
importance: Undecided → High
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package juju-core - 1.18.1-0ubuntu1

---------------
juju-core (1.18.1-0ubuntu1) trusty; urgency=medium

  * New upstream point release, including fixes for:
    - Upgrading juju 1.16.6 -> 1.18.x fails (LP: #1299802).
    - Peer relation disappears during juju-upgrade (LP: #1303697).
    - public-address of units changes to internal bridge post upgrade
      (LP: #1303735).
    - Unable to deploy local charms without series (LP: #1303880).
    - juju scp no longer allows multiple extra arguments to be passed
      (LP: #1306208).
    - juju cannot downgrade to same major.minor version with earlier
      patch number (LP: #1306296).
 -- James Page <email address hidden> Sat, 12 Apr 2014 07:04:37 +0100

Changed in juju-core (Ubuntu Trusty):
status: Triaged → Fix Released
Curtis Hovey (sinzui) on 2014-04-14
Changed in juju-core:
importance: Critical → High
Curtis Hovey (sinzui) on 2014-04-15
Changed in juju-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers