deploying a service to a space which has no subnets causes the agent to panic

Bug #1499426 reported by Andrew McDermott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Dimiter Naydenov
1.25
Fix Released
High
Dimiter Naydenov

Bug Description

To reproduce ensure you're using 1.25.

$ git rev-parse HEAD
aae914bdaf6cef2c177ae205c8087e53913d036d

$ juju version
1.25-beta1-trusty-amd64

# bootstrap on EC2
$ juju bootstrap -e amazon --upload-tools
Bootstrapping environment "amazon"
Starting new instance for initial state server
Launching instance
 - i-48044c9d
Building tools to upload (1.25-beta1.1-trusty-amd64)
Installing Juju agent on bootstrap instance
Waiting for address
Attempting to connect to 54.87.45.238:22
Attempting to connect to 10.230.166.135:22
Logging to /var/log/cloud-init-output.log on remote host
Installing package: curl
Installing package: cpu-checker
Installing package: bridge-utils
Installing package: rsyslog-gnutls
Installing package: cloud-utils
Installing package: cloud-image-utils
Installing package: tmux
Bootstrapping Juju machine agent
Starting Juju machine agent (jujud-machine-0)
Bootstrap agent installed
WARNING expected one instance, got 2
Waiting for API to become available
Bootstrap complete

$ juju status
environment: amazon
machines:
  "0":
    agent-state: started
    agent-version: 1.25-beta1.1
    dns-name: 54.87.45.238
    instance-id: i-48044c9d
    instance-state: running
    series: trusty
    hardware: arch=amd64 cpu-cores=1 cpu-power=100 mem=1740M root-disk=8192M availability-zone=us-east-1c
    state-server-member-status: has-vote
services: {}

# Create some spaces - note deliberately not adding any subnets.

$ juju space create public
created space "public" with no subnets

$ juju space create dmz
created space "dmz" with no subnets

# Now deploy ubuntu using a space constraint:
$ juju deploy ubuntu --constraints spaces=dmz

this will never complete because the agent panics, gets restarted, panics, ...

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x50 pc=0xa08a68]

goroutine 508 [running]:
runtime.panic(0x1a38200, 0x45355c8)
 /usr/lib/go/src/pkg/runtime/panic.c:266 +0xb6
github.com/juju/juju/provider/ec2.(*environ).StartInstance(0xc2101d8e10, 0x0, 0x0, 0x0, 0x0, ...)
 /home/aim/go/src/github.com/juju/juju/provider/ec2/environ.go:620 +0x16a8
github.com/juju/juju/worker/provisioner.(*provisionerTask).startMachine(0xc210494000, 0xc212039000, 0xc210cdc5b0, 0x0, 0x0, ...)
 /home/aim/go/src/github.com/juju/juju/worker/provisioner/provisioner_task.go:684 +0x5d
github.com/juju/juju/worker/provisioner.(*provisionerTask).startMachines(0xc210494000, 0xc2113fe778, 0x1, 0x1, 0x0, ...)
 /home/aim/go/src/github.com/juju/juju/worker/provisioner/provisioner_task.go:631 +0x3d7
github.com/juju/juju/worker/provisioner.(*provisionerTask).processMachines(0xc210494000, 0xc21099ba80, 0x1, 0x4, 0x1, ...)
 /home/aim/go/src/github.com/juju/juju/worker/provisioner/provisioner_task.go:293 +0xb62
github.com/juju/juju/worker/provisioner.(*provisionerTask).loop(0xc210494000, 0x0, 0x0)
 /home/aim/go/src/github.com/juju/juju/worker/provisioner/provisioner_task.go:165 +0x439
github.com/juju/juju/worker/provisioner.func·009()
 /home/aim/go/src/github.com/juju/juju/worker/provisioner/provisioner_task.go:90 +0x59
created by github.com/juju/juju/worker/provisioner.NewProvisionerTask
 /home/aim/go/src/github.com/juju/juju/worker/provisioner/provisioner_task.go:91 +0x1b5

(the rest of the stack trace is in the attached machine-0.log)

Tags: network
Revision history for this message
Andrew McDermott (frobware) wrote :
Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.25-beta1 → 1.25-beta2
Changed in juju-core:
milestone: 1.25-beta2 → 1.25.1
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.25.1 → 1.26-alpha1
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.26-alpha1 → 1.26-alpha2
Revision history for this message
Dimiter Naydenov (dimitern) wrote :

Fix proposed for 1.25 with: https://github.com/juju/juju/pull/3749

Changed in juju-core:
status: Triaged → In Progress
assignee: nobody → Dimiter Naydenov (dimitern)
Revision history for this message
Dimiter Naydenov (dimitern) wrote :

Forward port of the commited 1.25 fix for master: https://github.com/juju/juju/pull/3751

Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
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.