[openstack-dev] Versions api always returns the listen address

Morgan Fainberg morgan.fainberg at gmail.com
Tue Feb 23 11:57:23 UTC 2016


On Tue, Feb 23, 2016 at 3:49 AM, Gyorgy Szombathelyi <
gyorgy.szombathelyi at doclerholding.com> wrote:

> Hi!
>
> Just noticed by a failing
> tempest.api.compute.test_versions.TestVersions.test_get_version_details
> test:
> The versions answer of the components always return the listen address of
> the corresponding daemon.
> Is this the intended behavior? I think it should tell the public endpoint,
> the listening address in a HA cluster
> cannot nor should be reached from the outside.
>
> E.g. we have a  setup, where every service have an apache proxy in front
> of it, so getting the versions returns:
>
> # curl http://192.168.168.100:8774
>
> {"versions": [{"status": "SUPPORTED", "updated": "2011-01-21T11:33:21Z",
> "links": [{"href": "http://127.0.0.1:8774/v2/", "rel": "self"}],
> "min_version": "", "version": "", "id": "v2.0"}, {"status": "CURRENT",
> "updated": "2013-07-23T11:33:21Z", "links": [{"href": "
> http://127.0.0.1:8774/v2.1/", "rel": "self"}], "min_version": "2.1",
> "version": "2.12", "id": "v2.1"}]}
>
> Notice the href: "http://127.0.0.1:8774/xxx" answer.
>
> Or the reason is to not return the public endpoint that it would require a
> keystone session, and the versions API must be lightweight?
>
> Br,
> György
>
>
>
The endpoints are also generally not aware of their URL, and therefore try
to determine via introspection. It would be a good change to make the
endpoints aware of their URLs and/or handle the appropriate (not sure which
HTTP header, or a specific one needs to be defined) to indicate the
Apache/stunnel/nginx/HAProxy/etc front.

--Morgan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160223/28de7cf8/attachment.html>


More information about the OpenStack-dev mailing list