panic running juju charm resources

Bug #1699607 reported by Heather Lanigan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Anastasia
2.2
Fix Released
High
Anastasia

Bug Description

$ /snap/bin/juju charm resources glance
panic: inappropriate method called at init time

goroutine 1 [running]:
github.com/juju/juju/cmd/modelcmd.(*CommandBase).assertRunStarted(0xc4200e8180)
 /build/juju-beta/parts/juju/go/src/github.com/juju/juju/cmd/modelcmd/base.go:71 +0x7b
github.com/juju/juju/cmd/modelcmd.(*ModelCommandBase).ControllerName(0xc4200e8180, 0x10, 0x18, 0xc4200db560, 0x0)
 /build/juju-beta/parts/juju/go/src/github.com/juju/juju/cmd/modelcmd/modelcommand.go:174 +0x31
github.com/juju/juju/cmd/modelcmd.(*ModelCommandBase).BakeryClient(0xc4200e8180, 0xc4200a9b10, 0x44327b, 0x20)
 /build/juju-beta/parts/juju/go/src/github.com/juju/juju/cmd/modelcmd/modelcommand.go:182 +0x2f
github.com/juju/juju/resource/cmd.(*ListCharmResourcesCommand).ListResources(0xc4200e8180, 0xc4200db560, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x18)
 /build/juju-beta/parts/juju/go/src/github.com/juju/juju/resource/cmd/list_charm_resources.go:136 +0x31
github.com/juju/juju/resource/cmd.(*ListCharmResourcesCommand).Run(0xc4200e8180, 0xc42027e640, 0x305f100, 0xc4200e8180)
 /build/juju-beta/parts/juju/go/src/github.com/juju/juju/resource/cmd/list_charm_resources.go:112 +0x1fd
github.com/juju/cmd.(*SuperCommand).Run(0xc420094360, 0xc42027e640, 0x0, 0x0)
 /build/juju-beta/parts/juju/go/src/github.com/juju/cmd/supercommand.go:456 +0x2f1
github.com/juju/cmd.(*SuperCommand).Run(0xc4203bdd40, 0xc42027e640, 0xc42027e640, 0x0)
 /build/juju-beta/parts/juju/go/src/github.com/juju/cmd/supercommand.go:456 +0x2f1
github.com/juju/cmd.Main(0x305e1a0, 0xc4203bdd40, 0xc42027e640, 0xc4200101d0, 0x3, 0x3, 0x304b660)
 /build/juju-beta/parts/juju/go/src/github.com/juju/cmd/cmd.go:312 +0x241
github.com/juju/juju/cmd/juju/commands.main.Run(0x210c5b0, 0xc4200101c0, 0x4, 0x4, 0x0)
 /build/juju-beta/parts/juju/go/src/github.com/juju/juju/cmd/juju/commands/main.go:169 +0x189
github.com/juju/juju/cmd/juju/commands.Main(0xc4200101c0, 0x4, 0x4, 0xc42000c3e0)
 /build/juju-beta/parts/juju/go/src/github.com/juju/juju/cmd/juju/commands/main.go:121 +0x4b
main.main()
 /build/juju-beta/parts/juju/go/src/github.com/juju/juju/cmd/juju/main.go:32 +0x8c

$ snap info juju
name: juju
summary: "juju client"
publisher: canonical
contact: http://jujucharms.com
description: |
  Through the use of charms, juju provides you with shareable, re-usable, and
  repeatable expressions of devops best practices.
commands:
  - juju
tracking: beta
installed: 2.2.1+2.2-43dc953 (2021) 42MB classic
refreshed: 2017-06-21 12:55:27 -0400 EDT
channels:
  latest/stable: 2.2.0 (1956) 25MB classic
  latest/candidate: 2.2.0 (1956) 25MB classic
  latest/beta: 2.2.1+2.2-43dc953 (2021) 42MB classic
  latest/edge: 2.3-alpha1+develop-4dd8ed6 (2012) 42MB classic

Tags: eda
Changed in juju:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Anastasia (anastasia-macmood) wrote :

We probably should not panic...

tags: added: eda
Revision history for this message
Anastasia (anastasia-macmood) wrote :

Please note that the failure is not related to snap as I can reproduce this with a local build.

Changed in juju:
assignee: nobody → Anastasia (anastasia-macmood)
status: Triaged → In Progress
Revision history for this message
Anastasia (anastasia-macmood) wrote :

PR against 2.2: https://github.com/juju/juju/pull/7670

I'll look for other commands that fall in the same category but I think that you have spotted the only exception :D

Note that the fix for 2.3 will be slightly different as I would like to move these resources commands under our common command cmd directory both for consistency as well as for the ease of maintainability.

Revision history for this message
Anastasia (anastasia-macmood) wrote :

PR against develop (2.3-alpha1): https://github.com/juju/juju/pull/7680

Changed in juju:
status: In Progress → Fix Committed
milestone: none → 2.3-alpha1
Revision history for this message
Anastasia (anastasia-macmood) wrote :

I could not find other commands that fall into this category. We should be all good now.

If any other command panics are discovered, they should be filed under a new bug report.

Changed in juju:
status: Fix Committed → Fix Released
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.