Closed jaimegag closed 7 years ago
We have created an issue in Pivotal Tracker to manage this:
https://www.pivotaltracker.com/story/show/135269529
The labels on this github issue will be updated when the story is started.
Can you share nova-api.log?
I seems like its the case that is tested: https://github.com/openstack/nova/blob/4f91ed3a547965ed96a22520edcfb783e7936e95/nova/tests/unit/api/openstack/compute/test_availability_zone.py#L296
So, the nova-api is rejecting a request with availability_zone==''
Do you have a HTTP request trace for bosh-init? It might be a difference between availability_zone=='' and availability_zone being not present in the HTTP requests.
@jaimegag Thanks for creating the issue with the thorough summary and logs!
Here are my observations:
create_vm
call in any of the two casescreate_vm
call. These volume UUID is used to figure out the correct availability zone in case the VM didn't specify a preferenceavailability_zone_provider
picks the volume's AZ as the AZ to create the VM inavailabilty_zone_provider
if it was nil
Conclusion: I suspect that your volume is in an OpenStack Availability Zone ""
(empty string). That seems to be a cinder issue.
Could you please verify this by calling openstack volume show 38c29138-439f-40df-9a7a-4b19f46d5b9b -f json
where 38c29138-439f-40df-9a7a-4b19f46d5b9b
is the volume's UUID from the example above. I suppose you're seeing something like
{
"status": "available",
(...)
"availability_zone": "",
"bootable": "false",
(...)
"id": "38c29138-439f-40df-9a7a-4b19f46d5b9b",
"attachments": []
}
We certainly should check also for an empty string before taking in the volume's AZ, but I would be interested in the above analysis.
@voelzmo Yes, that volume and all we have are no specific to any AZ, so the openstack volume show
call returns what you expected:
root@here# openstack volume show 38c29138-439f-40df-9a7a-4b19f46d5b9b -f json
{
"size": 1,
"status": "available",
(...)
"availability_zone": "",
"bootable": "false",
(...)
"id": "38c29138-439f-40df-9a7a-4b19f46d5b9b",
"attachments": []
}
It seems that the empty string might be coming from there
Fix released in v29
Getting the following error when creating VMs after OpenStack was upgraded from Kilo to Liberty:
OpenStack API Bad Request (Invalid input for field/attribute availability_zone. Value: . u'' is too short)
We don't specify any AZ information in the Bosh manifests and let OpenStack decide it. When Bosh tries to create a new VM the CPI seems to be passing the availability_zone key/property with an empty string as value, and it appears that the OpenStack API doesn't like this anymore after the upgrade to Liberty. It seems that the API has changed in the way it accepts the availability-zone argument when Liberty was released, and all OpenStack API calls going forward behave in this "new" way. If no AZ information is available no availability_zone argument should reach the API, instead of an empty argument.
We have also tested and debugged creating servers with the OpenStack CLI and confirmed that they do not pass the
availability_zone
argument at all.These are some details from our setup to help reproduce/troubleshoot the problem:
Interestingly enough, we don't get errors when deploying bosh director with bosh-init, with the same configuration guidelines detailed above. I'll include log information below, both from bosh and bosh-init:
For BOSH-INIT
Here's the
create_vm
with its parameters: availability_zone is (correctly) missing:After that there are several
excon.requests
in the log, none of them with the availability_zone (good). Here's one example :For BOSH
Here's the
create_vm
with its parameters: availability_zone is (correctly) missing:However, in this case the following
excon.requests
in the logs __include the availability_zone__ argument with an empty string. Here's one example:And they result into the error we have been seeing:
If more information is needed please let me know.