provider/lxd: test suite panics if lxd not installed

Bug #1517748 reported by Dave Cheney
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
Critical
Eric Snow

Bug Description

PANIC: provider_test.go:39: providerSuite.TestOpen

[LOG] 0:00.021 DEBUG juju.service discovered init system "upstart" from series "trusty"
[LOG] 0:00.037 DEBUG juju.container.lxd.lxdclient initializing config dir "/tmp/check-2775422040480279449/1/juju-testenv"
[LOG] 0:00.038 DEBUG juju.container.lxd.lxdclient writing config file "/tmp/check-2775422040480279449/1/juju-testenv/config.yml"
[LOG] 0:00.039 DEBUG juju.container.lxd.lxdclient not writing invalid/empty certificate
[LOG] 0:00.039 DEBUG juju.container.lxd.lxdclient loading LXD client config from "/tmp/check-2775422040480279449/1/juju-testenv"
[LOG] 0:00.040 DEBUG juju.container.lxd.lxdclient using LXD remote "local"
provider_test.go:41:
    c.Check(err, jc.ErrorIsNil)
... value *errors.Err = &errors.Err{message:"", cause:(*url.Error)(0xc820466420), previous:(*errors.Err)(0xc82050d2c0), file:"github.com/juju/juju/provider/lxd/provider.go", line:26} ("can't connect to the local LXD server: Get http://unix
.socket/1.0: dial unix /var/lib/lxd/unix.socket: connect: no such file or directory")
... error stack:
        Get http://unix.socket/1.0: dial unix /var/lib/lxd/unix.socket: connect: no such file or directory
        github.com/juju/juju/provider/lxd/lxdclient/client.go:68: can't connect to the local LXD server
        github.com/juju/juju/provider/lxd/lxdclient/client.go:37:
        github.com/juju/juju/provider/lxd/environ_raw.go:67:
        github.com/juju/juju/provider/lxd/environ_raw.go:36:
        github.com/juju/juju/provider/lxd/environ.go:49:
        github.com/juju/juju/provider/lxd/provider.go:26:

... Panic: runtime error: invalid memory address or nil pointer dereference (PC=0x49038E)

/home/dfc/go/src/runtime/asm_amd64.s:471
  in call32
/home/dfc/go/src/runtime/panic.go:426
  in gopanic
/home/dfc/go/src/runtime/panic.go:45
  in panicmem
/home/dfc/go/src/runtime/sigpanic_unix.go:24
  in sigpanic
environ.go:137
  in environ.Config
provider_test.go:43
  in providerSuite.TestOpen
/home/dfc/go/src/runtime/asm_amd64.s:471
  in call32
/home/dfc/go/src/reflect/value.go:303
  in Value.Call
/home/dfc/go/src/runtime/asm_amd64.s:1963
  in goexit

----------------------------------------------------------------------
FAIL: provider_test.go:47: providerSuite.TestPrepareForBootstrap

Tags: 2.0-count
Changed in juju-core:
status: New → Triaged
Changed in juju-core:
importance: Undecided → Critical
milestone: none → 1.26-beta1
milestone: 1.26-beta1 → 1.26-alpha2
Revision history for this message
Michael Foord (mfoord) wrote :

I have lxd installed (wily but building with go 1.3) but am still getting lots of failures along the lines of:

 Get http://unix.socket/1.0: dial unix /var/lib/lxd/unix.socket: permission denied
 github.com/juju/juju/provider/lxd/lxdclient/client.go:68: can't connect to the local LXD server

Revision history for this message
Eric Snow (ericsnowcurrently) wrote :
Changed in juju-core:
status: Triaged → In Progress
assignee: nobody → Eric Snow (ericsnowcurrently)
Revision history for this message
Eric Snow (ericsnowcurrently) wrote :

@mfoord: make sure your current use is in the "lxd" group. See the boilerplate config in provider/lxd/config.go.

Revision history for this message
Michael Foord (mfoord) wrote :

@ericsnowcurrently my user is in the lxd group.

Changed in juju-core:
status: In Progress → Fix Committed
Revision history for this message
Michael Foord (mfoord) wrote :

The tests now pass on my machine.

Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
tags: added: 2.0-count
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.