juju-quickstart fails when old api-info is found

Bug #1522238 reported by David Britton
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-quickstart
Triaged
High
Unassigned

Bug Description

I run juju-quickstart and the following happens:

dpb@helo:bundles-trunk[0]$ juju quickstart u/landscape/landscape-dense-maas/15
Traceback (most recent call last):
  File "/usr/bin/juju-quickstart", line 32, in <module>
    options = manage.setup()
  File "/usr/lib/python2.7/dist-packages/quickstart/manage.py", line 542, in setup
    _setup_env(options, parser)
  File "/usr/lib/python2.7/dist-packages/quickstart/manage.py", line 310, in _setup_env
    active_db = options.info.all()
  File "/usr/lib/python2.7/dist-packages/quickstart/models/apiinfo.py", line 78, in all
    return {'environments': dict((name, self.get(name)) for name in names)}
  File "/usr/lib/python2.7/dist-packages/quickstart/models/apiinfo.py", line 78, in <genexpr>
    return {'environments': dict((name, self.get(name)) for name in names)}
  File "/usr/lib/python2.7/dist-packages/quickstart/models/apiinfo.py", line 63, in get
    'uuid': data['environ-uuid'],
KeyError: u'environ-uuid'

After some debugging, I found the environment it's choking on (note this environment is NOT the one I'm trying to deploy to!!):

dpb@helo:trunk[0]$ juju api-info -e ci-slaves-do --format json
{"user":"admin","state-servers":["REDACTED:17070"],"ca-cert":"REDACTED"}

This environment is really old and doesn't have an environ-uuid, even destroy-environment chokes on it:

dpb@helo:trunk[0]$ juju destroy-environment --force ci-slaves-do
panic: Unexpected <nil> in storage-port: <nil>. Expected float64 or int.

goroutine 1 [running]:
github.com/juju/juju/provider/manual.(*environConfig).storagePort(0xc8204619d0, 0x17c2900)
        /build/juju-core-3tu_0q/juju-core-1.25.0/src/github.com/juju/juju/provider/manual/config.go:69 +0x294
github.com/juju/juju/provider/manual.(*environConfig).storageAddr(0xc8204619d0, 0x0, 0x0)
        /build/juju-core-3tu_0q/juju-core-1.25.0/src/github.com/juju/juju/provider/manual/config.go:80 +0xff
github.com/juju/juju/provider/manual.(*manualEnviron).SetConfig(0xc820443440, 0xc820420310, 0x0, 0x0)
        /build/juju-core-3tu_0q/juju-core-1.25.0/src/github.com/juju/juju/provider/manual/environ.go:219 +0x917
github.com/juju/juju/provider/manual.manualProvider.open(0xc820421de0, 0x0, 0x0, 0x0, 0x0)
        /build/juju-core-3tu_0q/juju-core-1.25.0/src/github.com/juju/juju/provider/manual/provider.go:93 +0x96
github.com/juju/juju/provider/manual.manualProvider.Open(0xc820420310, 0x0, 0x0, 0x0, 0x0)
        /build/juju-core-3tu_0q/juju-core-1.25.0/src/github.com/juju/juju/provider/manual/provider.go:87 +0xf3
github.com/juju/juju/provider/manual.(*manualProvider).Open(0x32dfb50, 0xc820420310, 0x0, 0x0, 0x0, 0x0)
        <autogenerated>:137 +0xaf
github.com/juju/juju/environs.New(0xc820420310, 0x0, 0x0, 0x0, 0x0)
        /build/juju-core-3tu_0q/juju-core-1.25.0/src/github.com/juju/juju/environs/open.go:150 +0xe0
github.com/juju/juju/cmd/juju/commands.getServerEnv(0xc8203d1980, 0x0, 0x0, 0x0, 0x0)
        /build/juju-core-3tu_0q/juju-core-1.25.0/src/github.com/juju/juju/cmd/juju/commands/destroyenvironment.go:180 +0x9d
github.com/juju/juju/cmd/juju/commands.(*DestroyEnvironmentCommand).Run(0xc8203b1810, 0xc8202652c0, 0x0, 0x0)
        /build/juju-core-3tu_0q/juju-core-1.25.0/src/github.com/juju/juju/cmd/juju/commands/destroyenvironment.go:94 +0x1fc
github.com/juju/cmd.(*SuperCommand).Run(0xc8200e22d0, 0xc8202652c0, 0x0, 0x0)
        /build/juju-core-3tu_0q/juju-core-1.25.0/src/github.com/juju/cmd/supercommand.go:427 +0x697
github.com/juju/cmd.Main(0x7f6d057c9590, 0xc8200e22d0, 0xc8202652c0, 0xc82000a390, 0x3, 0x3, 0x1)
        /build/juju-core-3tu_0q/juju-core-1.25.0/src/github.com/juju/cmd/cmd.go:279 +0x2fc
github.com/juju/juju/cmd/juju/commands.Main(0xc82000a380, 0x4, 0x4)
        /build/juju-core-3tu_0q/juju-core-1.25.0/src/github.com/juju/juju/cmd/juju/commands/main.go:78 +0x4fa
main.main()
        /build/juju-core-3tu_0q/juju-core-1.25.0/src/github.com/juju/juju/cmd/juju/main.go:21 +0x3b

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
        /usr/lib/go/src/runtime/asm_amd64.s:1696 +0x1

goroutine 5 [syscall]:
os/signal.loop()
        /usr/lib/go/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
        /usr/lib/go/src/os/signal/signal_unix.go:28 +0x37

Revision history for this message
David Britton (dpb) wrote :

Also note, this environment polling takes a long time, especially considering I have some environments that are not up all the time, maybe I have to activate a VPN to get to it, for instance. Seems like a pretty significant problem to block on this.

tags: added: kanban-cross-team
Revision history for this message
David Britton (dpb) wrote :

Filed bug #1522253 for issue hit in comment #1

Changed in juju-quickstart:
status: New → Triaged
importance: Undecided → High
tags: added: landscape
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.