Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1870122

Summary: hosted-engine upgrade to 4.4 with dwh on remote machine fails due to grafana
Product: Red Hat Enterprise Virtualization Manager Reporter: Yedidyah Bar David <didi>
Component: rhvm-applianceAssignee: Nir Levy <nlevy>
Status: CLOSED ERRATA QA Contact: Pavel Novotny <pnovotny>
Severity: high Docs Contact:
Priority: urgent    
Version: 4.4.0CC: arachman, bugs, dfediuck, emarcus, lleistne, nlevy
Target Milestone: ovirt-4.4.2Keywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, when upgrading a self-hosted engine from RHV 4.3 to RHV 4.4, Grafana was installed by default during the engine-setup process, and if the remote database option was selected for Data Warehouse setup, the upgrade failed. In this release, Grafana deployment is disabled by default in self-hosted engine installations, and the upgrade process succeeds.
Story Points: ---
Clone Of: 1866780 Environment:
Last Closed: 2020-09-23 16:25:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1866780    
Bug Blocks:    

Description Yedidyah Bar David 2020-08-19 11:44:18 UTC
+++ This bug was initially created as a clone of Bug #1866780 +++

Description of problem:

If a 4.3 hosted engine is set up with a remote dwh, upgrading it to 4.4 fails. It repeatedly "asks" the user for grafana db user credentials, but because it runs with --accept-defaults, without user interaction, it does this in a loop. Since we recently limited this loop to 1000 times (bug 1840756), it eventually fails.

The log contains lots of copies of:

Grafana database host []: \n[ ERROR ] Host name is not valid:  did not resolve into an IP address\n          Grafana database host []: \n[ ERROR ] Host name is not valid:  did not resolve into an IP address\n          Grafana database host []: \n[ ERROR ] Host name is not valid:  did not resolve into an IP address\n          Grafana database host []: \n[ ERROR ] Host name is not valid:  did not resolve into an IP address\n          Grafana database host []: \n[ ERROR ] Host name is not valid:  did not resolve into an IP address\n          Grafana database host []: \n[ ERROR ] Host name is not valid:  did not resolve into an IP address\n          Grafana database host []: \n[ ERROR ] Host name is not valid:  did not resolve into an IP address\n          Grafana database host []:

Version-Release number of selected component (if applicable):
4.4

How reproducible:
Always

Steps to Reproduce:
1. Setup 4.3 hosted-engine
2. Migrate DWH to a separate machine
3. Upgrade to 4.4

Actual results:
See above

Expected results:
Succeeds

Additional info:

Not sure if we want to be "smart" and disable grafana setup only if dwh is not included in the backup, or simply always, for hosted-engine (and then the patch is just a single line in the appliance.

A workaround (didn't verify, trying it as of writing):

Create a file e.g. /usr/share/ansible/roles/ovirt.hosted_engine_setup/hooks/enginevm_before_engine_setup/disable-grafana.yml , with content:

- name: Disable grafana
  lineinfile:
    path: /root/ovirt-engine-answers
    line: "OVESETUP_GRAFANA_CORE/enable=bool:False"
    state: present

--- Additional comment from Yedidyah Bar David on 2020-08-18 13:12:48 IDT ---

Had an internal discussion, and decided to patch the appliance - add a single line to the engine-setup answer file, to not configure grafana. Result:

Standalone setups (both new install and upgrade) will configure grafana by default

Hosted-engine setups (both new install and upgrade) will not configure grafana.

For configuring grafana later, login to the dwh machine (can be same as engine, or separate - if migrated etc.) and run:

engine-setup --reconfigure-optional-components

Comment 4 Pavel Novotny 2020-09-14 08:54:17 UTC
Verified in
rhvm-appliance-4.4-20200909.1.el8ev

Deployment of hosted-engine passed, no errors encountered regarding engine-setup with answer file.
Grafana was not configured. Verified it's disabled in the answer file:

~~~ ovirt-engine-setup.log
...
2020-09-11 17:18:15,170+0300 DEBUG otopi.context context.dumpEnvironment:775 ENV OVESETUP_GRAFANA_CORE/enable=bool:'False'
...
~~~

Grafana can be additionally installed via `engine-setup --reconfigure-optional-components`.

Comment 9 errata-xmlrpc 2020-09-23 16:25:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (RHV Appliance (rhvm-appliance) 4.4.z Async [ovirt-4.4.2]), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:3826

Comment 10 Red Hat Bugzilla 2023-09-14 06:05:55 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days