Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

glance image-list gets HTTP 500 error

Hi, I am wondering why I cannot get glance to work. When I do glance --debug image-list I get this output:

    [root@ost-mgmt-rhel7-001 ~]# glance --debug image-list
    curl -i -X GET -H 'User-Agent: python-glanceclient' -H 'Content-Type: application/octet-stream' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'X-Auth-Token: {SHA1}xxxxxxxxxxxx'  --cert None --key None https://ost-el7.example.com:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20
    Request returned failure status 500.
    Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 602, in main
        args.func(client, args)
      File "/usr/lib/python2.7/site-packages/glanceclient/v1/shell.py", line 107, in do_image_list
        utils.print_list(images, columns)
      File "/usr/lib/python2.7/site-packages/glanceclient/common/utils.py", line 121, in print_list
        for o in objs:
      File "/usr/lib/python2.7/site-packages/glanceclient/v1/images.py", line 196, in paginate
        images, resp = self._list(url, "images")
      File "/usr/lib/python2.7/site-packages/glanceclient/v1/images.py", line 62, in _list
        resp, body = self.client.get(url)
      File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 253, in get
        return self._request('GET', url, **kwargs)
      File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 221, in _request
        raise exc.from_response(resp, resp.content)
    HTTPInternalServerError: HTTPInternalServerError (HTTP 500)
    HTTPInternalServerError (HTTP 500)

I see --cert None --key None in the debug output so I was thinking that I need to set these values:

ca_file = None (StrOpt) CA certificate file to use to verify connecting clients. cert_file = None (StrOpt) Certificate file to use when starting API server securely. key_file = None (StrOpt) Private key file to use when starting API server securely.

But I have no idea what to set them too.

glance image-list gets HTTP 500 error

Hi, I am wondering why I cannot get glance to work. When I do glance --debug image-list I get this output:

    [root@ost-mgmt-rhel7-001 ~]# glance --debug image-list
    curl -i -X GET -H 'User-Agent: python-glanceclient' -H 'Content-Type: application/octet-stream' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'X-Auth-Token: {SHA1}xxxxxxxxxxxx'  --cert None --key None https://ost-el7.example.com:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20
    Request returned failure status 500.
    Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 602, in main
        args.func(client, args)
      File "/usr/lib/python2.7/site-packages/glanceclient/v1/shell.py", line 107, in do_image_list
        utils.print_list(images, columns)
      File "/usr/lib/python2.7/site-packages/glanceclient/common/utils.py", line 121, in print_list
        for o in objs:
      File "/usr/lib/python2.7/site-packages/glanceclient/v1/images.py", line 196, in paginate
        images, resp = self._list(url, "images")
      File "/usr/lib/python2.7/site-packages/glanceclient/v1/images.py", line 62, in _list
        resp, body = self.client.get(url)
      File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 253, in get
        return self._request('GET', url, **kwargs)
      File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 221, in _request
        raise exc.from_response(resp, resp.content)
    HTTPInternalServerError: HTTPInternalServerError (HTTP 500)
    HTTPInternalServerError (HTTP 500)

I see --cert None --key None in the debug output so I was thinking that I need to set these values:

ca_file = None (StrOpt) CA certificate file to use to verify connecting clients. cert_file = None (StrOpt) Certificate file to use when starting API server securely. key_file = None (StrOpt) Private key file to use when starting API server securely.

But I have no idea what to set them too.

Here's an Update: When I execute the curl that is described in the debug output ...

    curl -i -X GET \
    -H 'User-Agent: python-glanceclient' \
    -H 'Content-Type: application/octet-stream'   \
    -H 'Accept-Encoding: gzip, deflate' \
    -H 'Accept: */*'   \
    -H 'X-Auth-Token: {SHA1}f61557e61a6f594ab6613c79a1e092b78fe46835' \
    --cert None \
    --key None  \
    'https://ost-el7.example.com:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20' ; echo

... I get this output ...

    HTTP/1.1 401 Unauthorized
    Content-Length: 358
    Content-Type: text/html; charset=UTF-8
    Www-Authenticate: Keystone uri='https://ost-el7.example.com:5000/v2.0'
    Date: Mon, 02 Mar 2015 20:35:05 GMT

    <html>
     <head>
      <title>401 Unauthorized</title>
     </head>
     <body>
      <h1>401 Unauthorized</h1>
      This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.<br /><br />



     </body>
    </html>

glance image-list gets HTTP 500 error

Hi, I am wondering why I cannot get glance to work. When I do glance --debug image-list I get this output:

    [root@ost-mgmt-rhel7-001 ~]# glance --debug image-list
    curl -i -X GET -H 'User-Agent: python-glanceclient' -H 'Content-Type: application/octet-stream' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'X-Auth-Token: {SHA1}xxxxxxxxxxxx'  --cert None --key None https://ost-el7.example.com:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20
    Request returned failure status 500.
    Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 602, in main
        args.func(client, args)
      File "/usr/lib/python2.7/site-packages/glanceclient/v1/shell.py", line 107, in do_image_list
        utils.print_list(images, columns)
      File "/usr/lib/python2.7/site-packages/glanceclient/common/utils.py", line 121, in print_list
        for o in objs:
      File "/usr/lib/python2.7/site-packages/glanceclient/v1/images.py", line 196, in paginate
        images, resp = self._list(url, "images")
      File "/usr/lib/python2.7/site-packages/glanceclient/v1/images.py", line 62, in _list
        resp, body = self.client.get(url)
      File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 253, in get
        return self._request('GET', url, **kwargs)
      File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 221, in _request
        raise exc.from_response(resp, resp.content)
    HTTPInternalServerError: HTTPInternalServerError (HTTP 500)
    HTTPInternalServerError (HTTP 500)

I see --cert None --key None in the debug output so I was thinking that I need to set these values:

ca_file = None (StrOpt) CA certificate file to use to verify connecting clients. cert_file = None (StrOpt) Certificate file to use when starting API server securely. key_file = None (StrOpt) Private key file to use when starting API server securely.

But I have no idea what to set them too.

Here's an Update: When I execute the curl that is described in the debug output ...

    curl -i -X GET \
    -H 'User-Agent: python-glanceclient' \
    -H 'Content-Type: application/octet-stream'   \
    -H 'Accept-Encoding: gzip, deflate' \
    -H 'Accept: */*'   \
    -H 'X-Auth-Token: {SHA1}f61557e61a6f594ab6613c79a1e092b78fe46835' \
    --cert None \
    --key None  \
    'https://ost-el7.example.com:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20' ; echo

... I get this output ...

    HTTP/1.1 401 Unauthorized
    Content-Length: 358
    Content-Type: text/html; charset=UTF-8
    Www-Authenticate: Keystone uri='https://ost-el7.example.com:5000/v2.0'
    Date: Mon, 02 Mar 2015 20:35:05 GMT

    <html>
     <head>
      <title>401 Unauthorized</title>
     </head>
     <body>
      <h1>401 Unauthorized</h1>
      This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.<br /><br />



     </body>
    </html>

Update:

Update:

Thanks Haneef, I do not thank glance is working. Here's how I checked.

    [root@ost-mgmt-rhel7-001 ~]# cat test_glance.sh
    #!/bin/sh

    export OS_TENANT_NAME=admin
    export OS_USERNAME=admin
    export OS_PASSWORD=xxxxxxxxxxxx
    export OS_AUTH_URL=https://ost-el7.example.com:35357/v2.0

    token=`keystone token-get | grep " id " | cut -d \| -f3 | sed -e's/ //g'`
    #glance --debug image-list
    echo "token is [$token]"
    curl -ki -X GET \
    -H 'User-Agent: python-glanceclient' \
    -H 'Content-Type: application/octet-stream' \
    -H 'Accept-Encoding: gzip, deflate' \
    -H 'Accept: */*' \
    -H 'X-Auth-Token: $token' \
    "https://ost-el7.example.com:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20"
    [root@ost-mgmt-rhel7-001 ~]# ./test_glance.sh
    token is [51374b41fa3c40eab14b30b4759416d5]
    HTTP/1.1 401 Unauthorized
    Content-Length: 358
    Content-Type: text/html; charset=UTF-8
    Www-Authenticate: Keystone uri='https://ost-el7.example.com:5000/v2.0'
    Date: Tue, 03 Mar 2015 05:44:54 GMT

    <html>
     <head>
      <title>401 Unauthorized</title>
     </head>
     <body>
      <h1>401 Unauthorized</h1>
      This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.<br /><br />



     </body>
    </html>

glance image-list gets HTTP 500 error

Hi, I am wondering why I cannot get glance to work. When I do glance --debug image-list I get this output:

    [root@ost-mgmt-rhel7-001 ~]# glance --debug image-list
    curl -i -X GET -H 'User-Agent: python-glanceclient' -H 'Content-Type: application/octet-stream' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'X-Auth-Token: {SHA1}xxxxxxxxxxxx'  --cert None --key None https://ost-el7.example.com:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20
    Request returned failure status 500.
    Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 602, in main
        args.func(client, args)
      File "/usr/lib/python2.7/site-packages/glanceclient/v1/shell.py", line 107, in do_image_list
        utils.print_list(images, columns)
      File "/usr/lib/python2.7/site-packages/glanceclient/common/utils.py", line 121, in print_list
        for o in objs:
      File "/usr/lib/python2.7/site-packages/glanceclient/v1/images.py", line 196, in paginate
        images, resp = self._list(url, "images")
      File "/usr/lib/python2.7/site-packages/glanceclient/v1/images.py", line 62, in _list
        resp, body = self.client.get(url)
      File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 253, in get
        return self._request('GET', url, **kwargs)
      File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 221, in _request
        raise exc.from_response(resp, resp.content)
    HTTPInternalServerError: HTTPInternalServerError (HTTP 500)
    HTTPInternalServerError (HTTP 500)

I see --cert None --key None in the debug output so I was thinking that I need to set these values:

ca_file = None (StrOpt) CA certificate file to use to verify connecting clients. cert_file = None (StrOpt) Certificate file to use when starting API server securely. key_file = None (StrOpt) Private key file to use when starting API server securely.

But I have no idea what to set them too.

Here's an Update: When I execute the curl that is described in the debug output ...

    curl -i -X GET \
    -H 'User-Agent: python-glanceclient' \
    -H 'Content-Type: application/octet-stream'   \
    -H 'Accept-Encoding: gzip, deflate' \
    -H 'Accept: */*'   \
    -H 'X-Auth-Token: {SHA1}f61557e61a6f594ab6613c79a1e092b78fe46835' \
    --cert None \
    --key None  \
    'https://ost-el7.example.com:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20' ; echo

... I get this output ...

    HTTP/1.1 401 Unauthorized
    Content-Length: 358
    Content-Type: text/html; charset=UTF-8
    Www-Authenticate: Keystone uri='https://ost-el7.example.com:5000/v2.0'
    Date: Mon, 02 Mar 2015 20:35:05 GMT

    <html>
     <head>
      <title>401 Unauthorized</title>
     </head>
     <body>
      <h1>401 Unauthorized</h1>
      This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.<br /><br />



     </body>
    </html>

Update:

Update:

Thanks Haneef, I do not thank glance is working. Here's how I checked.

    [root@ost-mgmt-rhel7-001 ~]# cat test_glance.sh
    #!/bin/sh

    export OS_TENANT_NAME=admin
    export OS_USERNAME=admin
    export OS_PASSWORD=xxxxxxxxxxxx
    export OS_AUTH_URL=https://ost-el7.example.com:35357/v2.0

    token=`keystone token-get | grep " id " | cut -d \| -f3 | sed -e's/ //g'`
    #glance --debug image-list
    echo "token is [$token]"
    curl -ki -X GET \
    -H 'User-Agent: python-glanceclient' \
    -H 'Content-Type: application/octet-stream' \
    -H 'Accept-Encoding: gzip, deflate' \
    -H 'Accept: */*' \
    -H 'X-Auth-Token: $token' \
    "https://ost-el7.example.com:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20"
    [root@ost-mgmt-rhel7-001 ~]# ./test_glance.sh
    token is [51374b41fa3c40eab14b30b4759416d5]
[51374b41fa3c40eab14b30b475gghhrrd5]
    HTTP/1.1 401 Unauthorized
    Content-Length: 358
    Content-Type: text/html; charset=UTF-8
    Www-Authenticate: Keystone uri='https://ost-el7.example.com:5000/v2.0'
    Date: Tue, 03 Mar 2015 05:44:54 GMT

    <html>
     <head>
      <title>401 Unauthorized</title>
     </head>
     <body>
      <h1>401 Unauthorized</h1>
      This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.<br /><br />



     </body>
    </html>

glance image-list gets HTTP 500 error

Hi, I am wondering why I cannot get glance to work. When I do glance --debug image-list I get this output:

    [root@ost-mgmt-rhel7-001 ~]# glance --debug image-list
    curl -i -X GET -H 'User-Agent: python-glanceclient' -H 'Content-Type: application/octet-stream' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'X-Auth-Token: {SHA1}xxxxxxxxxxxx'  --cert None --key None https://ost-el7.example.com:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20
    Request returned failure status 500.
    Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 602, in main
        args.func(client, args)
      File "/usr/lib/python2.7/site-packages/glanceclient/v1/shell.py", line 107, in do_image_list
        utils.print_list(images, columns)
      File "/usr/lib/python2.7/site-packages/glanceclient/common/utils.py", line 121, in print_list
        for o in objs:
      File "/usr/lib/python2.7/site-packages/glanceclient/v1/images.py", line 196, in paginate
        images, resp = self._list(url, "images")
      File "/usr/lib/python2.7/site-packages/glanceclient/v1/images.py", line 62, in _list
        resp, body = self.client.get(url)
      File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 253, in get
        return self._request('GET', url, **kwargs)
      File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 221, in _request
        raise exc.from_response(resp, resp.content)
    HTTPInternalServerError: HTTPInternalServerError (HTTP 500)
    HTTPInternalServerError (HTTP 500)

I see --cert None --key None in the debug output so I was thinking that I need to set these values:

ca_file = None (StrOpt) CA certificate file to use to verify connecting clients. cert_file = None (StrOpt) Certificate file to use when starting API server securely. key_file = None (StrOpt) Private key file to use when starting API server securely.

But I have no idea what to set them too.

Here's an Update: When I execute the curl that is described in the debug output ...

    curl -i -X GET \
    -H 'User-Agent: python-glanceclient' \
    -H 'Content-Type: application/octet-stream'   \
    -H 'Accept-Encoding: gzip, deflate' \
    -H 'Accept: */*'   \
    -H 'X-Auth-Token: {SHA1}f61557e61a6f594ab6613c79a1e092b78fe46835' \
    --cert None \
    --key None  \
    'https://ost-el7.example.com:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20' ; echo

... I get this output ...

    HTTP/1.1 401 Unauthorized
    Content-Length: 358
    Content-Type: text/html; charset=UTF-8
    Www-Authenticate: Keystone uri='https://ost-el7.example.com:5000/v2.0'
    Date: Mon, 02 Mar 2015 20:35:05 GMT

    <html>
     <head>
      <title>401 Unauthorized</title>
     </head>
     <body>
      <h1>401 Unauthorized</h1>
      This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.<br /><br />



     </body>
    </html>

Update:

Update:

Thanks Haneef, I do not thank glance is working. Here's how I checked.

    [root@ost-mgmt-rhel7-001 ~]# cat test_glance.sh
    #!/bin/sh

    export OS_TENANT_NAME=admin
    export OS_USERNAME=admin
    export OS_PASSWORD=xxxxxxxxxxxx
    export OS_AUTH_URL=https://ost-el7.example.com:35357/v2.0

    token=`keystone token-get | grep " id " | cut -d \| -f3 | sed -e's/ //g'`
    #glance --debug image-list
    echo "token is [$token]"
    curl -ki -X GET \
    -H 'User-Agent: python-glanceclient' \
    -H 'Content-Type: application/octet-stream' \
    -H 'Accept-Encoding: gzip, deflate' \
    -H 'Accept: */*' \
    -H 'X-Auth-Token: $token' \
    "https://ost-el7.example.com:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20"
    [root@ost-mgmt-rhel7-001 ~]# ./test_glance.sh
    token is [51374b41fa3c40eab14b30b475gghhrrd5]
    HTTP/1.1 401 Unauthorized
    Content-Length: 358
    Content-Type: text/html; charset=UTF-8
    Www-Authenticate: Keystone uri='https://ost-el7.example.com:5000/v2.0'
    Date: Tue, 03 Mar 2015 05:44:54 GMT

    <html>
     <head>
      <title>401 Unauthorized</title>
     </head>
     <body>
      <h1>401 Unauthorized</h1>
      This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.<br /><br />



     </body>
    </html>

Update:

Sorry for being so clueless but I think this is what you wanted me to try:

   [root@ost-mgmt-rhel7-001 ~]# keystone token-get
    Expecting an auth URL via either --os-auth-url or env[OS_AUTH_URL]
    [root@ost-mgmt-rhel7-001 ~]# export OS_AUTH_URL=https://ost-el7.example.com:5000/v2.0
    [root@ost-mgmt-rhel7-001 ~]# keystone token-get
    Expecting authentication method via
      either a service token, --os-token or env[OS_SERVICE_TOKEN],
      credentials, --os-username or env[OS_USERNAME]
    [root@ost-mgmt-rhel7-001 ~]# export OS_USERNAME=glance
    [root@ost-mgmt-rhel7-001 ~]# keystone token-get
    OS Password:
    +----------+----------------------------------+
    | Property |              Value               |
    +----------+----------------------------------+
    | expires  |       2015-03-03T21:05:42Z       |
    |    id    | fb272ff07f6b41de976cf31e3a594271 |
    | user_id  | 4bad6c54cfe849148e8c1614415a664d |
    +----------+----------------------------------+
    [root@ost-mgmt-rhel7-001 ~]# glance --debug image-list
    OS Password:
    You must provide a project_id or project_name (with project_domain_name or project_domain_id) via   --os-project-id (env[OS_PROJECT_ID])  --os-project-name (env[OS_PROJECT_NAME]),  --os-project-domain-id (env[OS_PROJECT_DOMAIN_ID])  --os-project-domain-name (env[OS_PROJECT_DOMAIN_NAME])
    [root@ost-mgmt-rhel7-001 ~]# glance --debug image-list
    OS Password:
    You must provide a project_id or project_name (with project_domain_name or project_domain_id) via   --os-project-id (env[OS_PROJECT_ID])  --os-project-name (env[OS_PROJECT_NAME]),  --os-project-domain-id (env[OS_PROJECT_DOMAIN_ID])  --os-project-domain-name (env[OS_PROJECT_DOMAIN_NAME])
    [root@ost-mgmt-rhel7-001 ~]#

Also the [keystone_authtoken] section looks like this in my /etc/glance/glance-*conf files.

    [keystone_authtoken]
    identity_uri = https://ost-el7.example.com:35357
    admin_tenant_name=services
    admin_user=glance
    admin_password=xxxxxxx
    auth_uri=https://ost-el7.example.com:5000/v2.0