GCE provider dumps stacktrace when missing a config option/value

Bug #1477712 reported by Charles Butler
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
juju-core
Won't Fix
Medium
Unassigned

Bug Description

I'm not sure which configuration option was missing, the listed keys i have are:

type: gce
client_email: xxx
client_id: xxx
private_key: 'multi-line xxx'
private_key_id: xxx
project-id: xxx

charles@bushido:~/projects/work/kubernetes-juju-builder$ juju switch google
google -> google
charles@bushido:~/projects/work/kubernetes-juju-builder$ juju bootstrap
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0xa6b091]

goroutine 1 [running]:
runtime.panic(0x17f2020, 0x3de17c8)
        /usr/lib/go/src/pkg/runtime/panic.c:266 +0xb6
github.com/juju/juju/provider/gce.applyCredentials(0xc2102ff0e0, 0x0, 0x0, 0x0, 0xc2101176f0)
        /build/juju-core-Zy5JJ1/juju-core-1.24.2/src/github.com/juju/juju/provider/gce/config.go:360 +0x3e1
github.com/juju/juju/provider/gce.newValidConfig(0xc2102ff0e0, 0xc210198030, 0xc2102ff320, 0xc2100f9360, 0x0)
        /build/juju-core-Zy5JJ1/juju-core-1.24.2/src/github.com/juju/juju/provider/gce/config.go:169 +0x84
github.com/juju/juju/provider/gce.newEnviron(0xc2102ff0e0, 0xc2102ff0e0, 0x0, 0x0)
        /build/juju-core-Zy5JJ1/juju-core-1.24.2/src/github.com/juju/juju/provider/gce/environ.go:53 +0x34
github.com/juju/juju/provider/gce.environProvider.PrepareForBootstrap(0x7f210b65c748, 0xc210116880, 0xc210112080, 0x3fe994bf2ddecd83, 0xc2100f9330, ...)
        /build/juju-core-Zy5JJ1/juju-core-1.24.2/src/github.com/juju/juju/provider/gce/provider.go:29 +0x8c
github.com/juju/juju/provider/gce.environProvider.PrepareForBootstrap·i(0x3da1d54, 0x7f210b65c748, 0xc210116880, 0xc210112080, 0x1a44240, ...)
        /build/juju-core-Zy5JJ1/juju-core-1.24.2/src/github.com/juju/juju/provider/gce/config.go:1 +0x4d
github.com/juju/juju/environs.prepare(0x7f210b65c748, 0xc210116880, 0xc2101ef7b0, 0x7f210b65c7a8, 0xc2101b04e0, ...)
        /build/juju-core-Zy5JJ1/juju-core-1.24.2/src/github.com/juju/juju/environs/open.go:239 +0x1be
github.com/juju/juju/environs.Prepare(0xc2101ef7b0, 0x7f210b65c748, 0xc210116880, 0x7f210b65c4e8, 0xc210116790, ...)
        /build/juju-core-Zy5JJ1/juju-core-1.24.2/src/github.com/juju/juju/environs/open.go:161 +0x205
github.com/juju/juju/environs.prepareFromNameProductionFunc(0xc210000448, 0x6, 0x7f210b65c748, 0xc210116880, 0x7f210b65c4e8, ...)
        /build/juju-core-Zy5JJ1/juju-core-1.24.2/src/github.com/juju/juju/environs/open.go:130 +0xbd
main.environFromNameProductionFunc(0xc2101d4780, 0xc210000448, 0x6, 0x1c0bed0, 0x9, ...)
        /build/juju-core-Zy5JJ1/juju-core-1.24.2/src/github.com/juju/juju/cmd/juju/common.go:106 +0x3ac
main.(*BootstrapCommand).Run(0xc210067900, 0xc2101d4780, 0x0, 0x0)
        /build/juju-core-Zy5JJ1/juju-core-1.24.2/src/github.com/juju/juju/cmd/juju/bootstrap.go:215 +0x3cd
github.com/juju/juju/cmd/envcmd.(*environCommandWrapper).Run(0xc2102cb420, 0xc2101d4780, 0x12dc1c0, 0xc2102ff5a0)
        /build/juju-core-Zy5JJ1/juju-core-1.24.2/src/github.com/juju/juju/cmd/envcmd/environmentcommand.go:1 +0x3d
main.(*envCmdWrapper).Run(0xc2102cb440, 0xc2101d4780, 0x7f210b65a648, 0xc2102cb440)
        /build/juju-core-Zy5JJ1/juju-core-1.24.2/src/github.com/juju/juju/cmd/juju/addrelation.go:1 +0x3d
github.com/juju/cmd.(*SuperCommand).Run(0xc21005e4b0, 0xc2101d4780, 0xc2101d4780, 0x0)
        /build/juju-core-Zy5JJ1/juju-core-1.24.2/src/github.com/juju/cmd/supercommand.go:428 +0x551
github.com/juju/cmd.Main(0x7f210b65b6a0, 0xc21005e4b0, 0xc2101d4780, 0xc21000a010, 0x1, ...)
        /build/juju-core-Zy5JJ1/juju-core-1.24.2/src/github.com/juju/cmd/cmd.go:247 +0x283
main.Main(0xc21000a000, 0x2, 0x2)
        /build/juju-core-Zy5JJ1/juju-core-1.24.2/src/github.com/juju/juju/cmd/juju/main.go:71 +0x460
main.main()
        /build/juju-core-Zy5JJ1/juju-core-1.24.2/src/github.com/juju/juju/cmd/juju/main.go:233 +0x44

goroutine 3 [syscall]:
os/signal.loop()
        /usr/lib/go/src/pkg/os/signal/signal_unix.go:21 +0x1e
created by os/signal.init·1
        /usr/lib/go/src/pkg/os/signal/signal_unix.go:27 +0x31

goroutine 15 [finalizer wait]:
runtime.park(0x4446b0, 0x3de8200, 0x3de3c88)
        /usr/lib/go/src/pkg/runtime/proc.c:1342 +0x66
runfinq()
        /usr/lib/go/src/pkg/runtime/mgc0.c:2279 +0x84
runtime.goexit()
        /usr/lib/go/src/pkg/runtime/proc.c:1394

Revision history for this message
Charles Butler (lazypower) wrote :

note: when supplying the json file, no stacktrace was emitted, it behaved

it seems to be related to embedding the data in the environments.yaml vs supplying the auth-file - what it may be is dashes vs underscores.

It appears the docs are incorrect as they are supplying underscores. https://jujucharms.com/docs/devel/config-gce

description: updated
Curtis Hovey (sinzui)
tags: added: config gce-provider panic
Changed in juju-core:
status: New → Triaged
importance: Undecided → Medium
Changed in juju-core:
status: Triaged → Won't Fix
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.