LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   [Devstack/Openstack] Glance - The client is assumed to be in error. (HTTP 400) (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/%5Bdevstack-openstack%5D-glance-the-client-is-assumed-to-be-in-error-http-400-a-4175659063/)

czezz 08-13-2019 08:44 AM

[Devstack/Openstack] Glance - The client is assumed to be in error. (HTTP 400)
 
When I try to list images via glance command it goes in to an error.
However, it does work when I try the same via openstack command.

What can be wrong in my devstack configuration?
Code:

stack@vlab:~$ glance image-list
Expecting to find domain in user. The server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400) (Request-ID: req-941b6122-830f-4813-931a-667200e35db6)


stack@vlab:~$ openstack image list
+--------------------------------------+--------------------------+--------+
| ID                                  | Name                    | Status |
+--------------------------------------+--------------------------+--------+
| eae4193d-1dc9-4ac3-b8e1-b402c4ec88d4 | cirros-0.4.0-x86_64-disk | active |
+--------------------------------------+--------------------------+--------+


berndbausch 08-13-2019 09:07 AM

Use the --debug option to see the API requests issued by the commands, then compare.

The reference to domain indicates it's an authentication problem. My guess is that the two commands do something different with Keystone.

czezz 08-13-2019 10:19 AM

While im still digging in, I post here output in debug mode.

Code:

stack@vlab:~$ glance --debug image-list
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/glanceclient/shell.py", line 687, in main
    OpenStackImagesShell().main(argv)
  File "/usr/local/lib/python2.7/dist-packages/glanceclient/shell.py", line 544, in main
    client = self._get_versioned_client('2', args)
  File "/usr/local/lib/python2.7/dist-packages/glanceclient/shell.py", line 433, in _get_versioned_client
    region_name=args.os_region_name)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py", line 1113, in get_endpoint
    return auth.get_endpoint(self, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/base.py", line 380, in get_endpoint
    allow_version_hack=allow_version_hack, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/base.py", line 271, in get_endpoint_data
    service_catalog = self.get_access(session).service_catalog
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/base.py", line 134, in get_access
    self.auth_ref = self.get_auth_ref(session)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/v3/base.py", line 178, in get_auth_ref
    authenticated=False, log=False, **rkwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py", line 1019, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py", line 869, in request
    raise exceptions.from_response(resp, method, url)
BadRequest: Expecting to find domain in user. The server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400) (Request-ID: req-155614ae-3dda-4c04-96e7-e5fed3bb1c34)
Expecting to find domain in user. The server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400) (Request-ID: req-155614ae-3dda-4c04-96e7-e5fed3bb1c34)


berndbausch 08-13-2019 10:53 AM

If that is the full debug output, I am totally at a loss. I don't see any HTTP request, yet there is one mentioned in the error message.

By the way, do you run both commands with the same shell environment? The error indicates lack of environment variable OS_PROJECT_DOMAIN_NAME or OS_PROJECT_DOMAIN_ID.

czezz 08-14-2019 02:32 AM

Yes, the same shell.
This is "source" file I use.

Code:

stack@vlab:~$ cat source_admin
export OS_AUTH_URL="http://192.168.56.103/identity"
export OS_USERNAME="admin"
export OS_TENANT_NAME="admin"
export OS_PASSWORD="nomoresecret"
export OS_CACERT=/etc/ssl/certs/ca.crt
export LC_ALL=en_US.UTF-8
export OS_PROJECT_DOMAIN_NAME="Default"
export OS_IDENTITY_API_VERSION=3


radiojivatty 11-29-2019 03:47 PM

Quote:

Originally Posted by czezz (Post 6024672)
When I try to list images via glance command it goes in to an error.
However, it does work when I try the same via openstack command.

What can be wrong in my devstack configuration?
Code:

stack@vlab:~$ glance image-list
Expecting to find domain in user. The server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400) (Request-ID: req-941b6122-830f-4813-931a-667200e35db6)


stack@vlab:~$ openstack image list audacity temp mail origin
+--------------------------------------+--------------------------+--------+
| ID                                  | Name                    | Status |
+--------------------------------------+--------------------------+--------+
| eae4193d-1dc9-4ac3-b8e1-b402c4ec88d4 | cirros-0.4.0-x86_64-disk | active |
+--------------------------------------+--------------------------+--------+


This is "source" file I use.


All times are GMT -5. The time now is 07:46 PM.