The default availability zone for nova is "nova" same as for neutron. However there is not a direct correlation between availability zones unless so made by the openstack administrator. It's possible to have multiple availability zone for compute and only 1, the default for neutron. In that case, juju bootstrap should still succeed.
$ juju bootstrap --debug --metadata-source /home/heather/simplestreams/images --config network=ubuntu-net --config use-floating-ip=true --to zone=second local-openstack local-openstack-azmismatch
20:26:45 INFO juju.cmd supercommand.go:63 running juju [2.2-beta4 gc go1.8.1]
...
20:26:53 DEBUG juju.provider.openstack provider.go:1017 using network id "02a167f4-af37-4068-9283-5c72cc830276"
20:26:54 INFO juju.provider.openstack provider.go:1141 trying to build instance in availability zone "second"
20:27:15 INFO juju.provider.openstack provider.go:1184 started instance "32588d6f-a186-4bc6-bafb-8922241d4a23"2
20:27:15 DEBUG juju.provider.openstack provider.go:1188 allocating public IP address for openstack node
20:27:15 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
20:27:15 DEBUG juju.cmd.juju.commands bootstrap.go:492 (error details: [{github.com/juju/juju/cmd/juju/commands/bootstrap.go:583: failed to bootstrap model} {github.com/juju/juju/provider/common/bootstrap.go:50: } {github.com/juju/juju/provider/common/bootstrap.go:185: cannot start bootstrap instance} {github.com/juju/juju/provider/openstack/provider.go:1190: cannot allocate a public IP as needed} {github.com/juju/juju/provider/openstack/networking.go:168: could not find an external network in availablity zone}])
...
$ neutron availability-zone-list
+------+----------+-----------+
| name | resource | state |
+------+----------+-----------+
| nova | router | available |
| nova | network | available |
+------+----------+-----------+
$ nova availability-zone-list
+-----------------------+----------------------------------------+
| Name | Status |
+-----------------------+----------------------------------------+
| internal | available |
| |- juju-350b2c-10 | |
| | |- nova-conductor | enabled :-) 2017-05-10T00:30:25.000000 |
| | |- nova-consoleauth | enabled :-) 2017-05-10T00:30:21.000000 |
| | |- nova-scheduler | enabled :-) 2017-05-10T00:30:24.000000 |
| | |- nova-cert | enabled :-) 2017-05-10T00:30:21.000000 |
| second | available |
| |- juju-350b2c-20 | |
| | |- nova-compute | enabled :-) 2017-05-10T00:30:19.000000 |
| nova | not available |
+-----------------------+----------------------------------------+
Additional information posted by anrah in: /bugs.launchpad .net/juju/ +bug/1654144
https:/
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.cloudconfi g.instancecfg instancecfg.go:825 Setting numa ctl preference to false openstack provider.go:1005 openstack user data; 2484 bytes openstack provider.go:1017 using network id "5c7cd500- c581-4491- 86fa-af95a71e8c 18" /lab.openstack. example. com:9696/" lab.openstack. example. com:9696/ v2.0 Rel:self}] Status:CURRENT}] openstack provider.go:1141 trying to build instance in availability zone "nova" openstack provider.go:1184 started instance "92b9c8bc- fa5c-4eee- ad1e-5b9dffb5e2 29"2 openstack provider.go:1188 allocating public IP address for openstack node com/juju/ juju/provider/ openstack/ networking. go:168: could not find an external network in availablity zone com/juju/ juju/provider/ openstack/ provider. go:1190: cannot allocate a public IP as needed com/juju/ juju/provider/ common/ bootstrap. go:185: cannot start bootstrap instance com/juju/ juju/provider/ common/ bootstrap. go:50: com/juju/ juju/cmd/ juju/commands/ bootstrap. go:584: failed to bootstrap model
06:13:51 DEBUG juju.service discovery.go:63 discovered init system "systemd" from series "xenial"
06:13:51 DEBUG juju.provider.
06:13:51 DEBUG juju.provider.
06:13:51 DEBUG goose <autogenerated>:22 performing API version discovery for "https:/
06:13:51 DEBUG goose <autogenerated>:22 discovered API versions: [{Version:{major:2 minor:0} Links:[{Href:http://
06:13:58 INFO juju.provider.
06:14:22 INFO juju.provider.
06:14:22 DEBUG juju.provider.
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.
github.
github.
github.
github.
I'm happy to provide more information when needed.