Bug 1844852 - [ceph][doc] Defining dashboard_admin_password and grafana_admin_passwords is a "must" for 4.1
Summary: [ceph][doc] Defining dashboard_admin_password and grafana_admin_passwords is ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Documentation
Version: 4.1
Hardware: All
OS: All
high
medium
Target Milestone: rc
: 4.1
Assignee: John Brier
QA Contact: Tejas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-07 15:25 UTC by Mustafa Aydın
Modified: 2020-06-26 02:39 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-22 15:45:31 UTC
Embargoed:


Attachments (Terms of Use)

Description Mustafa Aydın 2020-06-07 15:25:18 UTC
Description of problem:

Upgrading Ceph 4.0 to 4.1 , get the following error;

TASK [ceph-validate : fail when dashboard_admin_password and/or grafana_admin_password are not set] ******************************************************************************************************************************************
Sunday 07 June 2020  11:07:07 -0400 (0:00:00.400)       0:02:10.233 *********** 
fatal: [ceph4osd1]: FAILED! => changed=false 
  msg: you must set dashboard_admin_password and grafana_admin_password.
fatal: [ceph4osd2]: FAILED! => changed=false 
  msg: you must set dashboard_admin_password and grafana_admin_password.
fatal: [ceph4osd3]: FAILED! => changed=false 
  msg: you must set dashboard_admin_password and grafana_admin_password.
fatal: [rgw-secrep01]: FAILED! => changed=false 
  msg: you must set dashboard_admin_password and grafana_admin_password.
fatal: [ceph4admin]: FAILED! => changed=false 
  msg: you must set dashboard_admin_password and grafana_admin_password.


There was no such  requirement at 4.0, if not set , the passwords were set to default;

[mustafa@ceph3admin test_cluster1]$ grep dashboard_admin_password /usr/share/ceph-ansible/roles/ceph-validate/tasks/main.yml
[mustafa@ceph3admin test_cluster1]$ rpm -qa | grep ceph-ansible
ceph-ansible-4.0.14-1.el7cp.noarch



At 4.1, the requirement is to fail when these passwords are not set at group env. files;

/usr/share/ceph-ansible/roles/ceph-validate/tasks/main.yml:

    - name: fail when dashboard_admin_password and/or grafana_admin_password are not set
      fail:
        msg: "you must set dashboard_admin_password and grafana_admin_password."
      when:
        - dashboard_admin_password is undefined
          or grafana_admin_password is undefined
  when: dashboard_enabled | bool


[root@ceph4admin test_cluster2]# rpm -qa | grep ceph-ansible
ceph-ansible-4.0.23-1.el7cp.noarch

Version-Release number of selected component (if applicable):
4.0 to 4.1 upgrade

How reproducible:
always

Steps to Reproduce:
1. Do not set  dashboard_admin_password and grafana_admin_passwords at all.yml
2.Upgrade the ceph containerized cluster from 4.0 to 4.1

Comment 1 Mustafa Aydın 2020-06-07 16:50:09 UTC
```
cat roles/ceph-defaults/defaults/main.yml | grep dashboard_admin
dashboard_admin_user: admin
dashboard_admin_user_ro: false
#dashboard_admin_password: p@ssw0rd
```

Comment 2 Mustafa Aydın 2020-06-07 17:00:28 UTC
It should also be noted that if you give a different password for grafana admin user during the upgrade than the previous one to overcome the problem mentioned at the previous BZ updates, we get the following error, therefore it seems that it should be set to default password "admin" (or what was actually set);

- When I set "grafana_admin_password: redhat"

```
fatal: [ceph4osd1 -> ceph4osd1]: FAILED! => changed=false 
  cmd:
  - docker
  - exec
  - ceph-mon-ceph4osd1
  - ceph
  - --cluster
  - ceph
  - dashboard
  - grafana
  - dashboards
  - update
  delta: '0:00:01.177480'
  end: '2020-06-07 11:46:52.813923'
  msg: non-zero return code
  rc: 22
  start: '2020-06-07 11:46:51.636443'
  stderr: |-
    Error EINVAL: Traceback (most recent call last):
      File "/usr/share/ceph/mgr/mgr_module.py", line 974, in _handle_command
        return self.handle_command(inbuf, cmd)
      File "/usr/share/ceph/mgr/dashboard/module.py", line 386, in handle_command
        push_local_dashboards()
      File "/usr/share/ceph/mgr/dashboard/grafana.py", line 133, in push_local_dashboards
        retry()
      File "/usr/share/ceph/mgr/dashboard/grafana.py", line 90, in __call__
        result = self.func(*self.args, **self.kwargs)
      File "/usr/share/ceph/mgr/dashboard/grafana.py", line 128, in push
        grafana.push_dashboard(body)
      File "/usr/share/ceph/mgr/dashboard/grafana.py", line 55, in push_dashboard
        response.raise_for_status()
      File "/lib/python3.6/site-packages/requests/models.py", line 940, in raise_for_status
        raise HTTPError(http_error_msg, response=self)
    requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: http://7.7.7.101:3000/api/dashboards/db

- when I set "grafana_admin_password: admin" it is fine.

Comment 13 John Brier 2020-06-18 21:31:43 UTC
Created a new bug to track the issue with changing grafana_admin_password during/after upgrade from 4.0 to 4.1: Bug 1848753


Note You need to log in before you can comment on or make changes to this bug.