Have you tried this trick
https://github.com/openstack/glance/blob/11cfe49b8f88f68d83028b5920891bb16792da72/glance/cmd/__init__.py#L23-L49
?

I think that'd work for you and we may have to update the documentation
using this bug as an example to update the docs!

** Changed in: glance
       Status: New => Opinion

** Changed in: glance
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1599123

Title:
  Glance API doesn't work in IPv6 only environment

Status in Glance:
  Opinion

Bug description:
  When using IPv6 only deployment, including communication between
  glance-api and glance-registry, glance client itself can make glance
  image-list without problems, however, nova image-list fails with error
  500. Same applies is glance client is called by using v1 API:

  root@ubuntu1604-openstack:~# glance --os-image-api-version 2 image-list
  +--------------------------------------+---------+
  | ID                                   | Name    |
  +--------------------------------------+---------+
  | f32fd367-a451-4c09-b4fa-b2a60195aa38 | cirros  |
  | ad83b2f0-b99e-4340-b191-27f61de9955d | testimg |
  +--------------------------------------+---------+
  root@ubuntu1604-openstack:~# glance --os-image-api-version 1 image-list
  500 Internal Server Error: The server has either erred or is incapable of 
performing the requested operation. (HTTP 500)
  root@ubuntu1604-openstack:~# nova image-list
  ERROR (ClientException): Unexpected API Error. Please report this at 
http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
  <class 'glanceclient.exc.HTTPInternalServerError'> (HTTP 500) (Request-ID: 
req-279e9161-ec28-40af-a312-b2a5de829aef)

  Snippet from glance-registry.conf:
  bind_host = fd00:0:0:0::b00

  Snippet form glance-api.conf:
  registry_host = fd00:0:0:0::b00

  When symbolic name of the node is used in glance-api.conf, everything
  works fine.

  The log says:
  2016-07-05 13:11:24.858 3742 DEBUG eventlet.wsgi.server [-] (3742) accepted 
('fd00:0:0:0::b00', 47916, 0, 0) server 
/usr/lib/python2.7/dist-packages/eventlet/wsgi.py:867
  2016-07-05 13:11:24.861 3742 DEBUG glance.api.middleware.version_negotiation 
[-] Determining version of request: GET /v1/images/detail Accept: */* 
process_request 
/usr/local/lib/python2.7/dist-packages/glance/api/middleware/version_negotiation.py:46
  2016-07-05 13:11:24.862 3742 DEBUG glance.api.middleware.version_negotiation 
[-] Using url versioning process_request 
/usr/local/lib/python2.7/dist-packages/glance/api/middleware/version_negotiation.py:58
  2016-07-05 13:11:24.864 3742 DEBUG glance.api.middleware.version_negotiation 
[-] Matched version: v1 process_request 
/usr/local/lib/python2.7/dist-packages/glance/api/middleware/version_negotiation.py:70
  2016-07-05 13:11:24.865 3742 DEBUG glance.api.middleware.version_negotiation 
[-] new path /v1/images/detail process_request 
/usr/local/lib/python2.7/dist-packages/glance/api/middleware/version_negotiation.py:71
  2016-07-05 13:11:25.131 3742 DEBUG glance.common.client 
[req-7c1cf0e3-40e3-4ae2-bd3d-4f2923510386 f2875bc77df6479ea0a55ab4471c2ec0 
4ef8aba5c14c4ff99fe71d9588fcbdfc - - -] Constructed URL: 
http://fd00:0:0:0::b00:9191/images/detail?sort_key=name&sort_dir=asc&limit=20 
_construct_url 
/usr/local/lib/python2.7/dist-packages/glance/common/client.py:398
  2016-07-05 13:11:25.137 3742 ERROR glance.registry.client.v1.client 
[req-7c1cf0e3-40e3-4ae2-bd3d-4f2923510386 f2875bc77df6479ea0a55ab4471c2ec0 
4ef8aba5c14c4ff99fe71d9588fcbdfc - - -] Registry client request GET 
/images/detail raised ClientConnectionError

  
  From where it is obvious that wrong URL is constructed:
  http://fd00:0:0:0::b00:9191/images/...

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1599123/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to