Openstack network selection is not passed from the controller to the models

Bug #1628999 reported by Tim Kuhlman
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Critical
Tim Penhey

Bug Description

When working on an Openstack cloud with multiple networks the right network to use can be specified on bootstrap with the argument '--config network=foo' to the juju bootstrap command. After doing this the controller comes up fine, adding a new model also works fine but upon adding applications to the new model allocation of Nova VMs fails.

A juju status shows the machines in this state.
machines:
  "0":
    juju-status:
      current: down
      message: agent is not communicating with the server
      since: 29 Sep 2016 15:23:03Z
    instance-id: pending
    machine-status:
      current: pending
      since: 29 Sep 2016 15:21:15Z
    series: trusty

Checking the log on the controller you see errors like (slightly santized to avoid a bunch of hex user data):

4da59b22-9710-4e69-840a-be49ee864a97 machine-1: 2016-09-29 15:28:40 WARNING juju.provisioner provisioner_task.go:708 starting instance: cannot run instance: failed to run a server with nova.RunServerOpts{Name:"juju-40e48c0d-cddf-4b99-898d-5a80ceaa99ce-machine-4", FlavorId:"724cd2f6-045a-4d91-86a3-ccb81d0e8ab0", ImageId:"8b0edd58-a05d-4a1e-97b3-ec9ae6c7e0ef", UserData:[]uint8{lots_of_hex}, SecurityGroupNames:[]nova.SecurityGroupName{nova.SecurityGroupName{Name:"juju-4955af7b-a72f-4076-88e4-99854e92d50f-40e48c0d-cddf-4b99-898d-5a80ceaa99ce"}, nova.SecurityGroupName{Name:"juju-4955af7b-a72f-4076-88e4-99854e92d50f-40e48c0d-cddf-4b99-898d-5a80ceaa99ce-4"}}, Networks:[]nova.ServerNetworks{}, AvailabilityZone:"prodstack-zone-1", Metadata:map[string]string{"juju-controller-uuid":"4955af7b-a72f-4076-88e4-99854e92d50f", "juju-model-uuid":"40e48c0d-cddf-4b99-898d-5a80ceaa99ce", "juju-units-deployed":"wordpress/1"}, ConfigDrive:false}
caused by: request (http://10.24.0.176:8774/v2/70f0903e4c044e949b867805c19ed15a/servers) returned unexpected status: 400; error info: {"badRequest": {"message": "Multiple possible networks found, use a Network ID to be more specific.", "code": 400}}

Stuart Bishop (stub)
tags: added: canonical-is
Revision history for this message
Richard Harding (rharding) wrote :

The controller is bootstrapped with the network config property to select the network. That is not stored on the controller so future deploy commands come back with the error from Nova:
"Multiple possible networks found, use a Network ID to be more specific."

I think that the juju controller-config should be outputting the stored config of the network specified for the cloud.

Changed in juju:
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Alexis Bruemmer (alexis-bruemmer)
milestone: none → 2.0.0
Revision history for this message
Tim Kuhlman (timkuhlman) wrote :

Tom Haddon helpfully pointed out that you can add the same '--config network=foo' to the add-model command which gives you a way to work around this problem.

Revision history for this message
Tim Penhey (thumper) wrote :

After bootstrap, you can do the following to get the inherited config:

juju model-defaults network=foo

I'll propose a change that any config passed through at bootstrap time gets added to the controller model defaults for new models.

Changed in juju:
assignee: Alexis Bruemmer (alexis-bruemmer) → Tim Penhey (thumper)
status: Triaged → In Progress
Revision history for this message
Tim Penhey (thumper) wrote :

On second thought, blindly setting any config attributes defined with --config as inherited is a bit too optimistic.

Adding --model-defaults command line arg that would allow the setting of network=foo.

Any model defaults would apply to both controller model and any future models.

--config values would override any --model-defaults for the controller model.

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