Bug 1376087

Summary: [RFE] Vdsm metrics module in case hawkular should allow authentication (specify credentials)
Product: [oVirt] vdsm Reporter: Petr Kubica <pkubica>
Component: GeneralAssignee: Yaniv Bronhaim <ybronhei>
Status: CLOSED CANTFIX QA Contact: Pavel Stehlik <pstehlik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.18.11CC: bugs, oourfali
Target Milestone: ---Keywords: FutureFeature
Target Release: ---Flags: ykaul: ovirt-future?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-07 19:21:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Petr Kubica 2016-09-14 15:59:22 UTC
Description of problem:
In case using only hawkular-metrics there isn't any authentication request.
But if user wants use complete installtion of hawkular, access to /hawkular/metrics is forbidden without credentials.

Version-Release number of selected component (if applicable):
vdsm-4.18.11-1.el7ev.x86_64

How reproducible:
always

Steps to Reproduce:
1. Use hawkular (I tried http://pilhuhn.blogspot.cz/2016/06/using-hawkular-services-via-docker.html)

Actual results:
hawkular::ERROR::2016-08-17 08:33:26,095::utils::374::root::(wrapper) Unhandled exception
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 371, in wrapper
    return f(*a, **kw)
  File "/usr/lib/python2.7/site-packages/vdsm/concurrent.py", line 177, in run
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/vdsm/metrics/hawkular.py", line 81, in _run
    client.put(items)
  File "/usr/lib/python2.7/site-packages/hawkular/metrics.py", line 273, in put
    self._post(self._get_metrics_raw_url(self._get_url(l)), r[l])
  File "/usr/lib/python2.7/site-packages/hawkular/metrics.py", line 204, in _post
    self._http(url, 'POST', data)
  File "/usr/lib/python2.7/site-packages/hawkular/metrics.py", line 191, in _http
    self._handle_error(e)
  File "/usr/lib/python2.7/site-packages/hawkular/metrics.py", line 226, in _handle_error
    raise e
HawkularMetricsError: HTTP Error 401: <html><head><title>Error</title></head><body>Unauthorized</body></html>

Comment 1 Oved Ourfali 2016-09-15 05:29:08 UTC
We can also consider 4.1, but not sure it will be prioritized.

Comment 2 Yaniv Kaul 2017-06-07 19:21:55 UTC
We don't use it anymore, closing.