Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with osclient.compute().images.list() with identity endpoint v3 BUT is working fine with v2 #722

Closed
thongam opened this issue Jun 16, 2016 · 6 comments

Comments

@thongam
Copy link

thongam commented Jun 16, 2016

Environment: openstack4j 3.0.1-SNAPSHOT with OpenStack Mitaka 14.0 release

I have any issue when calling compute().images.list() with identity endpoint v3.
The same calling is working fine when using identity endpoint v2.

Error shown as below:

Internal Server Error
ServerResponseException{message=Internal Server Error, status=500, status-code=INTERNAL_SERVER_ERROR}

Error from http call

"{"computeFault": {"message": "Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.\n<type 'exceptions.TypeError'>", "code": 500}}"

Error from OpenStack nova log

2016-06-16 14:07:44.448 ERROR nova.api.openstack.extensions [req-0982093a-eb30-49d9-ba48-d6d63c38ef63 admin None] Unexpected exception in API method
2016-06-16 14:07:44.448 TRACE nova.api.openstack.extensions Traceback (most recent call last):
2016-06-16 14:07:44.448 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/extensions.py", line 453, in wrapped
2016-06-16 14:07:44.448 TRACE nova.api.openstack.extensions return f(_args, *_kwargs)
2016-06-16 14:07:44.448 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/compute/images.py", line 150, in detail
2016-06-16 14:07:44.448 TRACE nova.api.openstack.extensions return self._view_builder.detail(req, images)
2016-06-16 14:07:44.448 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/compute/views/images.py", line 79, in detail
2016-06-16 14:07:44.448 TRACE nova.api.openstack.extensions return self._list_view(list_func, request, images, coll_name)
2016-06-16 14:07:44.448 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/compute/views/images.py", line 98, in _list_view
2016-06-16 14:07:44.448 TRACE nova.api.openstack.extensions image_list = [list_func(request, image)["image"] for image in images]
2016-06-16 14:07:44.448 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/compute/views/images.py", line 52, in show
2016-06-16 14:07:44.448 TRACE nova.api.openstack.extensions self._collection_name),
2016-06-16 14:07:44.448 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/compute/views/images.py", line 111, in _get_links
2016-06-16 14:07:44.448 TRACE nova.api.openstack.extensions "href": self._get_href_link(request, identifier, collection_name),
2016-06-16 14:07:44.448 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/common.py", line 435, in _get_href_link
2016-06-16 14:07:44.448 TRACE nova.api.openstack.extensions self._get_project_id(request),
2016-06-16 14:07:44.448 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/common.py", line 405, in _get_project_id
2016-06-16 14:07:44.448 TRACE nova.api.openstack.extensions if project_id in request.url:
2016-06-16 14:07:44.448 TRACE nova.api.openstack.extensions TypeError: 'in ' requires string as left operand, not NoneType
2016-06-16 14:07:44.448 TRACE nova.api.openstack.extensions

@ghost
Copy link

ghost commented Jun 16, 2016

@thongam: This seems as error from nova; please check if you can do the same from openstack CLI.

@thongam
Copy link
Author

thongam commented Jun 16, 2016

From OpenStack CLI, seems is working fine while issue command nova image-list and result is showing.

WARNING: Command image-list is deprecated and will be removed after Nova 15.0.0 is released. Use python-glanceclient or openstackclient instead.
+--------------------------------------+---------------------------------+--------+--------+
| ID | Name | Status | Server |
+--------------------------------------+---------------------------------+--------+--------+
| c90f0452-a260-4d79-98ec-b9a17ff2ac42 | cirros-0.3.4-x86_64-uec | ACTIVE | |
| 018702c8-253a-4f8c-b83f-2f51538010e1 | cirros-0.3.4-x86_64-uec-kernel | ACTIVE | |
| e924cb21-97df-4bd8-beb0-a484fed25f37 | cirros-0.3.4-x86_64-uec-ramdisk | ACTIVE | |
+--------------------------------------+---------------------------------+--------+--------+

I also did a CURL, found out the outcome as below:

a) curl --request GET 'http://[IP]/v2.1/images' --header 'X-Auth-Token:[TOKEN]'
{"computeFault": {"message": "Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.\n<type 'exceptions.TypeError'>", "code": 500}}

The cause of error should come from OpenStack API.

@ghost
Copy link

ghost commented Jun 16, 2016

@thongam : its problem with the openstack behaviour; os4j consumes the API's exposed by openstack.and its behavior is same as curl that is why you see similar response

@thongam
Copy link
Author

thongam commented Jun 17, 2016

Yes, hope the OpenStack team could resolve the issue as soon as possible. Or I may need to downgrade the OpenStack version to Liberty.

Thank you.

@auhlig
Copy link
Member

auhlig commented Jul 13, 2016

@thongam Please close if this issue is no longer valid. Thanks.

@vinodborole
Copy link
Contributor

@thongam closing for now, please reopen if required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants