nanobox-io / nanobox-adapter-libcloud

A Nanobox cloud provider adapter to integrate with multiple cloud providers
MIT License
3 stars 7 forks source link

Azure "location is required" error #4

Open jedgalbraith opened 6 years ago

jedgalbraith commented 6 years ago
[,581] ERROR in app: Exception on /azure_arm/servers [POST]
Traceback (most recent call last):
File "/data/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/data/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/data/lib/python3.6/site-packages/flask_cors/extension.py", line 161, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/data/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/data/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/data/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
File "/data/lib/python3.6/site-packages/libcloud/compute/drivers/azure_arm.py", line 261, in list_sizes
rv = self.dispatch_request()
File "/data/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/app/nanobox_libcloud/controllers/servers.py", line 19, in server_create
result = adapter.do_server_create(request.headers, request.json)
File "/app/nanobox_libcloud/adapters/azure_arm.py", line 83, in do_server_create
result = super().do_server_create(headers, data)
File "/app/nanobox_libcloud/adapters/base.py", line 219, in do_server_create
result = driver.create_node(**self._get_create_args(data))
File "/app/nanobox_libcloud/adapters/azure_arm.py", line 265, in _get_create_args
size = self._find_size(driver, location, data['size'])
File "/app/nanobox_libcloud/adapters/azure_arm.py", line 311, in _find_size
for size in driver.list_sizes(location):
ValueError: location is required.
raise ValueError("location is required.")
104.236.156.96 - - [07/Nov/2017:15:54:17 +0000] "POST /azure_arm/servers HTTP/1.1" 500 291 "-" "Faraday v0.9.2"
Shark commented 6 years ago

This happened while trying to create a new instance on Azure Germany. I can set the Cloud Environment to "AzureGermanCloud", but the "Germany Central" and "Germany Northeast" regions are missing. Trying to use "Europe West" led to the error…

danhunsaker commented 6 years ago

Oh. Hmmm. I see what's up, there. This will be a bit tricky to handle properly... I'm not 100% certain how I'm going to approach it, actually.

Basically, I needed to test the cloud environments other than default more completely... I'll resolve this as soon as I can get to it. Have a few fires to extinguish, first, and it might be a few days to get them all...