Bug 1869099

Summary: Prometheus APIs are only available through plain http
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Patrick C. F. Ernzer <pcfe>
Component: Ceph-AnsibleAssignee: Guillaume Abrioux <gabrioux>
Status: CLOSED DUPLICATE QA Contact: Ameena Suhani S H <amsyedha>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.1CC: aschoen, ceph-eng-bugs, gmeno, nthomas, ykaul
Target Milestone: rc   
Target Release: 5.*   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-17 15:28:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Patrick C. F. Ernzer 2020-08-16 20:05:58 UTC
Description of problem:
Upstream's https://github.com/ceph/ceph-ansible/pull/5155 seems absent in ceph-ansible-4.0.25.2-1.el8cp.noarch


Version-Release number of selected component (if applicable):
ceph-ansible-4.0.25.2-1.el8cp.noarch

How reproducible:
always

Steps to Reproduce:
1. configure SSL for grafana and dashboard via ceph-ansible
2. open dashboard

Actual results:
alertmanager-api-host uses https
[root@f5-422-03 /]# ceph dashboard get-alertmanager-api-host
https://192.168.40.159:9093

Expected results:
alertmanager-api-host uses http

Additional info:
This seems fixed at the above upstream URL but not in ceph-ansible-4.0.25.2-1.el8cp.noarch

The https URL can be overridden with 
ceph dashboard set-alertmanager-api-host http://…

[root@ceph-ansible ~]# rpm -q ceph-ansible
ceph-ansible-4.0.25.2-1.el8cp.noarch
[root@ceph-ansible ~]# rpm -V ceph-ansible
[root@ceph-ansible ~]# grep set-alertmanager-api-host /usr/share/ceph-ansible/roles/ceph-dashboard/tasks/configure_dashboard.yml
  command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} dashboard set-alertmanager-api-host {{ dashboard_protocol }}://{{ grafana_server_addrs | first }}:{{ alertmanager_port }}"

Comment 1 Patrick C. F. Ernzer 2020-08-16 20:07:37 UTC
[root@ceph-ansible ~]# curl https://192.168.40.159:9093/api/v1/alerts
curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number

[root@ceph-ansible ~]# curl http://192.168.40.159:9093/api/v1/alerts
{"status":"success","data":[]}

Comment 2 Patrick C. F. Ernzer 2020-08-17 15:28:37 UTC

*** This bug has been marked as a duplicate of bug 1866006 ***