Bug 1870055
| Summary: | OVESETUP_GRAFANA_CONFIG/grafanaUser might be undefined | ||
|---|---|---|---|
| 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, gdeolive, lleistne |
| Target Milestone: | ovirt-4.4.6 | Flags: | pm-rhel:
ovirt-4.4+
gdeolive: testing_ack+ |
| Target Release: | 4.4.6.2 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | ovirt-engine-dwh-4.4.6.2 | Doc Type: | No Doc Update |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-05-14 07:24:32 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Integration | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
This is now required, with patch [1] merged (for bug 1879373). [1] https://gerrit.ovirt.org/c/ovirt-engine/+/114268 Reproduction/Verification, with a recent engine (that includes [1]): - engine-setup - engine-backup --file=f1 - engine-cleanup - engine-backup --mode=restore --file=f1 --provision-all-databases With an older engine, reproduction is harder. See comment 0. (For reference:) The reason that with [1] it's now mandatory also in this rather-simple flow, is that with [1], the grafana DB is no longer restored before we provision databases, and the condition in _misc_set_access also checks NEW_DATABASE - which will be true at this point. Before [1], it was false, so we didn't enter _misc_set_access, so didn't run into this bug. [1] https://gerrit.ovirt.org/c/ovirt-engine/+/114268 Verified in ovirt-engine-4.4.6.6-0.10.el8ev.noarch ovirt-engine-dwh-4.4.6.2-1.el8ev.noarch Verified according to steps in comment 2: - engine install & engine-setup - engine-backup --file=f1 - engine-cleanup - engine-backup --mode=restore --file=f1 --provision-all-databases All steps finished with success. |
Description of problem: Under certain conditions (see below), OVESETUP_GRAFANA_CONFIG/grafanaUser will not be set, and will cause certain utilities to fail with: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/otopi/context.py", line 132, in _executeMethod method['method']() File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-common/ovirt-engine-grafana-dwh/db/grafana.py", line 80, in _misc_set_access self.environment[ogdwhcons.ConfigEnv.GRAFANA_USER] KeyError: 'OVESETUP_GRAFANA_CONFIG/grafanaUser' This is because it's set only in engine-setup plugin, but used in common plugin - which is used in all utilities, including engine-cleanup and ovirt-engine-rename. This is a result of the fix to bug 1846365, so is broken since it. The flow where it happened was something like: 1. Run engine-setup with grafana and dwh enabled, but have it fail before starting grafana service 2. engine-cleanup In our specific case, the flow was something like: 1. Install and setup 4.3 engine. Configure it to use 3rd-party cert and SSO. 2. Migrate dwh to its own machine. 3. Upgrade the engine to 4.4. 4. Upgrade dwh to 4.4: 4.1. Install el8 machine 4.2. Run engine-backup on the 4.3 dwh machine 4.3. Restore this backup on the el8 machine 4.4. engine-setup - It failed, due to bug 1866811, when starting httpd 5. engine-cleanup Above flow is still not supported, though - see also bug 1846279.