Ceilometer using External Endpoint URLs

Bug #1179560 reported by Jacob Godin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
In Progress
High
xingzhou

Bug Description

I have a working copy of ceilometer up and running (api, collector, and central agent). However, when trying to get my compute agents working properly, I'm running into problems with the Nova endpoint they're trying to use. We have our setup configured so that our compute nodes have no external access, AKA are limited to LAN only.

Unfortunately, Ceilometer seems to grab the publicurl for the Nova endpoint and attempt to use it. Here's an excerpt of the error:
2013-05-06 14:54:52 INFO [urllib3.connectionpool] Starting new HTTP connection (1): 10.x.x.x
2013-05-06 14:54:52 DEBUG [urllib3.connectionpool] "POST /v2.0/tokens HTTP/1.1" 200 None
2013-05-06 14:54:53 INFO [urllib3.connectionpool] Starting new HTTP connection (1): X.X.X.X
2013-05-06 14:54:53 ERROR [ceilometer.nova_client] [Errno 101] ENETUNREACH
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/ceilometer/nova_client.py", line 33, in with_logging
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/ceilometer/nova_client.py", line 69, in instance_get_all_by_host
    search_opts=search_opts))
  File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/servers.py", line 375, in list
    return self._list("/servers%s%s" % (detail, query_string), "servers")
  File "/usr/lib/python2.7/dist-packages/novaclient/base.py", line 62, in _list
    _resp, body = self.api.client.get(url)
  File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 230, in get
    return self._cs_request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 217, in _cs_request
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 199, in _time_request
    resp, body = self.request(url, method, **kwargs)
  File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 170, in request
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/api.py", line 44, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 279, in request
    resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 374, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 206, in send
    raise ConnectionError(sockerr)
ConnectionError: [Errno 101] ENETUNREACH

I am using Keystone's admin url to authenticate, so that seems to be posting properly (10.x.x.x). However, you can see that it then tries to use X.X.X.X to talk to Nova API.

Changed in ceilometer:
status: New → Triaged
importance: Undecided → High
Revision history for this message
xingzhou (xingzhou) wrote :

I suppose that there should be a config option which identifies whether to use public, internal or admin url for each project that ceilometer polls, am I correct?

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

We should only ever need to use the admin URLs.

Revision history for this message
Jacob Godin (jacobgodin) wrote : Re: [Bug 1179560] Re: Ceilometer using External Endpoint URLs
Download full text (3.4 KiB)

I think that admin should be default for sure, but some may want the option
On 2013-05-16 7:50 AM, "Doug Hellmann" <email address hidden> wrote:

> We should only ever need to use the admin URLs.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1179560
>
> Title:
> Ceilometer using External Endpoint URLs
>
> Status in Ceilometer:
> Triaged
>
> Bug description:
> I have a working copy of ceilometer up and running (api, collector,
> and central agent). However, when trying to get my compute agents
> working properly, I'm running into problems with the Nova endpoint
> they're trying to use. We have our setup configured so that our
> compute nodes have no external access, AKA are limited to LAN only.
>
> Unfortunately, Ceilometer seems to grab the publicurl for the Nova
> endpoint and attempt to use it. Here's an excerpt of the error:
> 2013-05-06 14:54:52 INFO [urllib3.connectionpool] Starting new HTTP
> connection (1): 10.x.x.x
> 2013-05-06 14:54:52 DEBUG [urllib3.connectionpool] "POST /v2.0/tokens
> HTTP/1.1" 200 None
> 2013-05-06 14:54:53 INFO [urllib3.connectionpool] Starting new HTTP
> connection (1): X.X.X.X
> 2013-05-06 14:54:53 ERROR [ceilometer.nova_client] [Errno 101]
> ENETUNREACH
> Traceback (most recent call last):
> File "/usr/lib/python2.7/dist-packages/ceilometer/nova_client.py",
> line 33, in with_logging
> return func(*args, **kwargs)
> File "/usr/lib/python2.7/dist-packages/ceilometer/nova_client.py",
> line 69, in instance_get_all_by_host
> search_opts=search_opts))
> File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/servers.py",
> line 375, in list
> return self._list("/servers%s%s" % (detail, query_string), "servers")
> File "/usr/lib/python2.7/dist-packages/novaclient/base.py", line 62,
> in _list
> _resp, body = self.api.client.get(url)
> File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line
> 230, in get
> return self._cs_request(url, 'GET', **kwargs)
> File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line
> 217, in _cs_request
> **kwargs)
> File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line
> 199, in _time_request
> resp, body = self.request(url, method, **kwargs)
> File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line
> 170, in request
> **kwargs)
> File "/usr/lib/python2.7/dist-packages/requests/api.py", line 44, in
> request
> return session.request(method=method, url=url, **kwargs)
> File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line
> 279, in request
> resp = self.send(prep, stream=stream, timeout=timeout,
> verify=verify, cert=cert, proxies=proxies)
> File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line
> 374, in send
> r = adapter.send(request, **kwargs)
> File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line
> 206, in send
> raise ConnectionError(sockerr)
> ConnectionError: [Errno 101] ENETUNREACH
>
> I am using Keystone's admin url to authenticate, so that seems to b...

Read more...

xingzhou (xingzhou)
Changed in ceilometer:
assignee: nobody → xingzhou (xingzhou)
Revision history for this message
xingzhou (xingzhou) wrote :

Submitted a patch for review: https://review.openstack.org/#/c/36408/1

Changed in ceilometer:
status: Triaged → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.