Bug 1847966
| Summary: | grafana setup with "weird" characters is broken | ||
|---|---|---|---|
| Product: | [oVirt] ovirt-engine-dwh | Reporter: | Yedidyah Bar David <didi> | 
| Component: | Setup | Assignee: | Yedidyah Bar David <didi> | 
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Pavel Novotny <pnovotny> | 
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 4.4.0 | CC: | bugs, emarcus, michal.skrivanek, pelauter, sradco | 
| Target Milestone: | ovirt-4.4.2 | Flags: | pm-rhel:
                ovirt-4.4+
                 pelauter: planning_ack+ sbonazzo: devel_ack+ lleistne: testing_ack+  | 
  
| Target Release: | 4.4.2.1 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | ovirt-engine-dwh-4.4.2.1 | Doc Type: | Bug Fix | 
| Doc Text: | 
       Cause: 
engine-setup did not handle well passwords (admin password, secret_key, DB user password) when creating grafana configuration/provisioning files.
Consequence: 
Passwords with "weird" characters didn't work well. "Weird" characters are those that are significant for the file format - quotes etc. "Didn't work well" means that they either caused grafana to fail, or the passwords to not work - meaning, e.g., admin user could not log in with the supplied passwords.
Fix: 
engine-setup was patched to quote/escape passwords/secrets.
Result: 
Now everything works well even when the user supplies passwords that contain such characters. 
 | 
        
        
        
        Story Points: | --- | 
| Clone Of: | Environment: | ||
| Last Closed: | 2020-09-18 07:12:50 UTC | Type: | Bug | 
| Regression: | --- | Mount Type: | --- | 
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Metrics | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| 
 
        
          Description
        
        
          Yedidyah Bar David
        
        
        
        
        
          2020-06-17 12:59:11 UTC
        
       
      
      
      
    FailedQA in ovirt-engine-4.4.1.8-0.7.el8ev.noarch otopi-common-1.9.2-1.el8ev.noarch grafana-6.3.6-1.el8.x86_64 Running engine-setup with answer file with string %'"$@&*();:! as admin password (for engine & Grafana) and as part of the org. name no longer causes the setup to fail. engine-setup completes successfully. However the admin user is not able to log into Grafana with the password - error "Invalid username or password". Tried several times with copy&pasting the passwd and manual input also. Logging into Webadmin with the same password works OK. grafana.log: t=2020-07-13T20:18:32+0200 lvl=eror msg="Invalid username or password" logger=context userId=0 orgId=0 uname= error="Invalid Username or Password" t=2020-07-13T20:18:32+0200 lvl=info msg="Request Completed" logger=context userId=0 orgId=0 uname= method=POST path=/login status=401 remote_addr=10.40.195.100 time_ms=102 size=42 referer=https://10-37-138-223.rhev.lab.eng.brq.redhat.com/ovirt-engine-grafana/login From Grafana documentation: password The database user’s password (not applicable for sqlite3). If the password contains # or ; you have to wrap it with triple quotes. For example """#password;""" https://grafana.com/docs/grafana/latest/administration/configuration/#password do you want to document it? looks reasonable. if so then please turn this into a doc bug (In reply to Michal Skrivanek from comment #3) > do you want to document it? looks reasonable. if so then please turn this > into a doc bug I believe this might require code on our side to add the triple quotes, since we use the engine password by default. Can engine use passwords with the # and ; characters? (In reply to Shirly Radco from comment #2) > From Grafana documentation: > > password > The database user’s password (not applicable for sqlite3). If the password > contains # or ; you have to wrap it with triple quotes. For example > """#password;""" IIUC this is not applicable to admin password. We should check both. > > https://grafana.com/docs/grafana/latest/administration/configuration/ > #password Since the engine password does support the # and ; characters, we should wrap the Grafana password with triple quotes in case it includes them. Verified in ovirt-engine-4.4.2.3-0.6.el8ev.noarch ovirt-engine-dwh-4.4.2.1-1.el8ev.noarch grafana-6.3.6-1.el8.x86_64 Special characters in the answer file now work properly. Tried again with %'"$@&*();:! as password and engine-setup completed successfully as well as log into Webadmin, VM Portal and Grafana. This bugzilla is included in oVirt 4.4.2 release, published on September 17th 2020. Since the problem described in this bug report should be resolved in oVirt 4.4.2 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.  |