AllocatePublicIP fails on some Openstacks

Bug #1654144 reported by Ian Booth
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Heather Lanigan
2.1
Won't Fix
High
Unassigned

Bug Description

When bootstrapping on some Openstacks, it fails:

10:25:29 ERROR cmd supercommand.go:458 failed to bootstrap model: cannot
start bootstrap instance: cannot allocate a public IP as needed: *could not
find an external network in availablity zone*
10:25:29 DEBUG cmd supercommand.go:459 (error details: [{
github.com/juju/juju/cmd/juju/commands/bootstrap.go:556: failed to
bootstrap model} {github.com/juju/juju/provider/common/bootstrap.go:47: } {
github.com/juju/juju/provider/common/bootstrap.go:178: cannot start
bootstrap instance} {github.com/juju/juju/provider/openstack/provider.
go:1089: cannot allocate a public IP as needed} {github.com/juju/juju/
provider/openstack/networking.go:137: could not find an external network in
availablity zone}])

The root cause is an issue in goose

https://github.com/go-goose/goose/issues/38

Ian Booth (wallyworld)
Changed in juju:
milestone: 2.1.0 → 2.2.0-alpha1
Revision history for this message
Heather Lanigan (hmlanigan) wrote :

How do you reproduce this?

Revision history for this message
Anastasia (anastasia-macmood) wrote :

@Ian,

Please provide either a reproducible scenario or, even better, steps.

Changed in juju:
status: Triaged → Incomplete
Revision history for this message
Anastasia (anastasia-macmood) wrote :

Removing from 2.1 milestone as we will not be addressing this in 2.1 release.

Changed in juju:
milestone: 2.2-rc1 → none
Revision history for this message
Antti Rahikainen (anrah) wrote :
Download full text (14.1 KiB)

Affects also for me.

OpenStack version: Newton
Juju version: 2.1.1-xenial-amd64

Steps to reproduce:
- Add OpenStack Cloud using juju add-cloud
- Define credentials
- Define simplestreams (metadata-source)

$ juju show-cloud test
defined: local
type: openstack
description: Openstack Cloud
auth-types: [userpass]
endpoint: https://myopenstack.example.com:5000/v3
regions:
  RegionOne: {}

Define bootstrap.yaml:

network: 5c7cd500-c581-4491-86fa-af95a71e8c18
prefer-ipv6: true
use-default-secgroup: true
firewall-mode: global
use-floating-ip: true
ssl-hostname-verification: false

Bootstrap:
juju bootstrap test testcontroller --metadata-source=/home/ubuntu/simplestreams/ --debug --bootstrap-series=xenial --config /home/ubuntu/bootstrap.yaml

Logs:

6:05:50 INFO juju.cmd supercommand.go:63 running juju [2.1.1 gc go1.6.2]
06:05:50 DEBUG juju.cmd supercommand.go:64 args: []string{"juju", "bootstrap", "test", "testcontroller", "--metadata-source=/home/ubuntu/simplestreams/", "--debug", "--bootstrap-series=xenial", "--config", "/home/ubuntu/bootstrap.yaml"}
06:05:50 DEBUG juju.cmd.juju.commands bootstrap.go:780 authenticating with region "RegionOne" and credential "anrah" ()
06:05:50 DEBUG juju.cmd.juju.commands bootstrap.go:892 provider attrs: map[network:5c7cd500-c581-4491-86fa-af95a71e8c18 external-network: use-floating-ip:true use-default-secgroup:true]
06:05:51 INFO cmd cmd.go:141 Adding contents of "/home/ubuntu/.local/share/juju/ssh/juju_id_rsa.pub" to authorized-keys
06:05:51 DEBUG juju.cmd.juju.commands bootstrap.go:948 preparing controller with config: map[no-proxy: automatically-retry-hooks:true name:controller image-stream:released http-proxy: ignore-machine-addresses:false uuid:296abafa-cbec-441e-8dc2-d5e93274db7a prefer-ipv6:true proxy-ssh:false network:5c7cd500-c581-4491-86fa-af95a71e8c18 firewall-mode:global net-bond-reconfigure-delay:17 logging-config: apt-http-proxy: agent-metadata-url: enable-os-upgrade:true use-test-secgroup:true image-metadata-url: external-network: use-default-secgroup:true type:openstack ssl-hostname-verification:false test-mode:false resource-tags: transmit-vendor-metrics:true apt-mirror: https-proxy: disable-network-management:false use-floating-ip:true apt-ftp-proxy: apt-https-proxy: agent-stream:released authorized-keys:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6wSRT8BL080wnvdMvnGmyzCofU1nZYndfu5VOciK/LpnlAo2E85gsmrGTx6qSnCWmOaJy8yjU01VBsPTdnCWeyJF5njAmsrwrAqIgADcX7BtU7pxHPTI9sOGJQG9CacnZ8m7JBpjfZTDND5vcJcQ2p5pINE3/edeSH3JeO84ASXCmym2cuMzhPra8bAmQha78vAec3j79xULzrITPsQY7mIJ7AQexKW6FFsIlaifm9v18aC9/AiaN9ZiMeM4Datb+mc66czvoJvp8B9ayzQt70auoG6/cFqjuCWgED4SGcrgYUUS8+DklLvvB2yXNIhSasj529cIcM2ChVY9WptJz juju-client-key
 logforward-enabled:false provisioner-harvest-mode:destroyed default-series:xenial ftp-proxy: development:false enable-os-refresh-update:true]
06:05:51 INFO juju.provider.openstack provider.go:131 opening model "controller"
06:05:51 DEBUG goose <autogenerated>:22 auth details: &{Token:gAAAAABYv58_sWsGcIwtc3g-IwNRXGb9V4MccqfTFpt-Csi7B8gkOP3K1tvoyqeWq4Lm41e5wNRIg4Oj6sy3s6BRDv534Bz-zjots2AEvwUVHCqBKgeqrODmNpDmoOZ1jBisNX1V1i7591SdR35EY0SOyRYoz2oofwF-dp-sSyvtB__a6h9njtM TenantId:04e6cec0079446c187e6a7b...

Revision history for this message
Antti Rahikainen (anrah) wrote :

Also note, that Juju 2.0.3 works with the same OpenStack cloud without problems.

Revision history for this message
Antti Rahikainen (anrah) wrote :

nova floating-ip list returns bunch of available floating-ips.

Changed in juju:
status: Incomplete → Triaged
Revision history for this message
Antti Rahikainen (anrah) wrote :

We actually have situation where floating ip pool has no availability zone set.

+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | UP |
| availability_zone_hints | |
| availability_zones | |
| created_at | 2016-11-02T09:45:26 |
| description | |
| dns_domain | |
| id | a853f3b5-3901-4f26-9579-65a01e49c2a4 |
| ipv4_address_scope | None |
| ipv6_address_scope | None |
| is_default | False |
| mtu | 1500 |
| name | public_floating_net |
| port_security_enabled | True |
| project_id | None |
| provider:network_type | flat |
| provider:physical_network | physnet1 |
| provider:segmentation_id | None |
| qos_policy_id | None |
| revision_number | 4 |
| router:external | External |
| segments | None |
| shared | False |
| status | ACTIVE |
| subnets | b53a8314-a48f-409e-8325-68ba02ae7197 |
| updated_at | 2016-11-02T09:45:40 |
+---------------------------+--------------------------------------+
(openstack)

When using juju 2.1.1 with external-network configuration option during bootstrap I get error:

07:52:52 DEBUG juju.provider.openstack networking.go:198 external network a853f3b5-3901-4f26-9579-65a01e49c2a4 was found, however not in the nova availability zone

My opinion is that external networks don't have to be on certain availability zone.

Revision history for this message
Antti Rahikainen (anrah) wrote :

Any comments on this? Is this considered as Won't Fix?

tags: added: bootstrap
Revision history for this message
Antti Rahikainen (anrah) wrote :
Changed in juju:
status: Triaged → In Progress
assignee: nobody → Heather Lanigan (hmlanigan)
Changed in juju:
milestone: none → 2.2-beta1
tags: added: oil
Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.2-beta1 → 2.2-beta2
Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.2-beta2 → 2.2-beta3
Revision history for this message
Anastasia (anastasia-macmood) wrote :

PR against develop (2.2): https://github.com/juju/juju/pull/7196

Revision history for this message
Heather Lanigan (hmlanigan) wrote :

@anrah: It is unlikely that this bug is same as what you are seeing. It is unrelated to an AZ and specific to an OpenStack implementation requiring the API call for /v2.0/networks to filter with the router:external=true to return external networks.

For the related goose bug: 38
https://github.com/go-goose/goose/pull/41

For this bug: https://github.com/juju/juju/pull/7196

Changed in juju:
status: In Progress → Fix Committed
Revision history for this message
Bruno Carvalho (brunowcs) wrote :

juju version
2.2-beta4-xenial-amd64

21:23:48 DEBUG juju.provider.openstack provider.go:1133 allocating public IP address for openstack node
21:23:49 ERROR juju.cmd.juju.commands bootstrap.go:491 failed to bootstrap model: cannot start bootstrap instance: cannot allocate a public IP as needed: could not find an external network in availablity zone

Whats version fix?

Revision history for this message
Heather Lanigan (hmlanigan) wrote :

Bruno,

The fix is in the version you are using. This bug is related to a specific openstack deployment. It's likely you're hitting a different bug. What are the availability zones configured for nova and neutron in your config? Are you specifying an external network as a bootstrap config value? What AZ is the external network in?

Revision history for this message
Bruno Carvalho (brunowcs) wrote :

Hi Heather!

I am using nuage with neutron plugin for SDN I believe the compatibility is in the form of my implementation, since my external network is configured without AZ

# openstack network show 42f7deed-1410-408e-ad4b-c1394ca47b40(MY EXTERNAL ID)
....
Availability_zones | None
....

I will check the possibility of updating external networks already created for AZ, using the nuage neutron plugin.

If you have any tips, I'm grateful.

Revision history for this message
Antti Rahikainen (anrah) wrote :

We have also OpenStack deployment where external network has no availability zone, and we get the same error with 2.2.beta4

06:13:51 DEBUG juju.cloudconfig.instancecfg instancecfg.go:825 Setting numa ctl preference to false
06:13:51 DEBUG juju.service discovery.go:63 discovered init system "systemd" from series "xenial"
06:13:51 DEBUG juju.provider.openstack provider.go:1005 openstack user data; 2484 bytes
06:13:51 DEBUG juju.provider.openstack provider.go:1017 using network id "5c7cd500-c581-4491-86fa-af95a71e8c18"
06:13:51 DEBUG goose <autogenerated>:22 performing API version discovery for "https://lab.openstack.example.com:9696/"
06:13:51 DEBUG goose <autogenerated>:22 discovered API versions: [{Version:{major:2 minor:0} Links:[{Href:http://lab.openstack.example.com:9696/v2.0 Rel:self}] Status:CURRENT}]
06:13:58 INFO juju.provider.openstack provider.go:1141 trying to build instance in availability zone "nova"
06:14:22 INFO juju.provider.openstack provider.go:1184 started instance "92b9c8bc-fa5c-4eee-ad1e-5b9dffb5e229"2
06:14:22 DEBUG juju.provider.openstack provider.go:1188 allocating public IP address for openstack node
06:14:24 INFO cmd bootstrap.go:490 bootstrap failed but --keep-broken was specified so resources are not being destroyed.
When you have finished diagnosing the problem, remember to clean up the failed controller.
See `juju kill-controller`.
ERROR failed to bootstrap model: cannot start bootstrap instance: cannot allocate a public IP as needed: could not find an external network in availablity zone
06:14:24 DEBUG cmd supercommand.go:459 error stack:
github.com/juju/juju/provider/openstack/networking.go:168: could not find an external network in availablity zone
github.com/juju/juju/provider/openstack/provider.go:1190: cannot allocate a public IP as needed
github.com/juju/juju/provider/common/bootstrap.go:185: cannot start bootstrap instance
github.com/juju/juju/provider/common/bootstrap.go:50:
github.com/juju/juju/cmd/juju/commands/bootstrap.go:584: failed to bootstrap model

I'm happy to provide more information when needed.

Revision history for this message
Heather Lanigan (hmlanigan) wrote :

@antti, I opened a new bug last week regarding the issue you've mentioned:
https://bugs.launchpad.net/juju/+bug/1689683

Information provided has been copied over.

Revision history for this message
Antti Rahikainen (anrah) wrote :

@Heather: Thanks a lot!

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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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