Bug 1678275 - ovirt-metrics-store-installation.yml fails on creating a bastion VM
Summary: ovirt-metrics-store-installation.yml fails on creating a bastion VM
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine-metrics
Classification: oVirt
Component: Generic
Version: 1.2.0.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.3.3
: ---
Assignee: Shirly Radco
QA Contact: Ivana Saranova
URL:
Whiteboard:
Depends On:
Blocks: 1631193
TreeView+ depends on / blocked
 
Reported: 2019-02-18 12:09 UTC by Jan Zmeskal
Modified: 2019-04-16 13:58 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-04-16 13:58:31 UTC
oVirt Team: Metrics
Embargoed:
sradco: ovirt-4.3?
lleistne: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 97643 0 None None None 2019-02-24 16:07:25 UTC

Description Jan Zmeskal 2019-02-18 12:09:07 UTC
Description of problem:
When you run
/usr/share/ovirt-engine-metrics/configure_ovirt_machines_for_metrics.sh --playbook=ovirt-metrics-store-installation.yml
it fails with the following error: http://pastebin.test.redhat.com/716709

I think I know where the problem is. If you take a look at roles/oVirt.metrics-store-installation/defaults/mainl.yml, you can see that variable template_cluster is set to value of variable ovirt_cluster_name (line 12). 
Then, if user specifies different value for ovirt_cluster_name in their config.yml (which I did), the default value ("Default") is overridden. However, that does not happen for the template_cluster variable. 
Therefore, when oVirt.image-template role gets to the point where it tries to create VM, it's attempting to create it in an invalid cluster ("Default") which does not exist in my environment.

Workaround for this is to go to roles/oVirt.metrics-store-installation/tasks/main.yml, go to this task:

- name: Include oVirt image-template role
  include_role:
    name: oVirt.image-template

And expand it like this:

- name: Include oVirt image-template role
  include_role:
    name: oVirt.image-template
  vars:
    template_cluster: <my_cluster_name>

Then the creation of bastion VM works correctly.


Version-Release number of selected component (if applicable):
ovirt-engine-metrics-1.2.1-0.0.master.20190217232716.el7.noarch.rpm (built from patch set 37 of https://gerrit.ovirt.org/#/c/97643/)

How reproducible:
100 %

Steps to Reproduce:
1. Use this config.yml: http://pastebin.test.redhat.com/716722
2. Run ovirt-metrics-store-installation.yml playbook

Additional info:
- This is a regression since I have not had this issue in version ovirt-engine-metrics-1.2.1-0.0.master.20190214134529.el7.noarch.rpm (built from patchset 29).
- Log from failed attempt is attached to this bug

Comment 2 Jan Zmeskal 2019-02-20 15:50:57 UTC
Shirly, I believe this is already fixed, am I right? If yes, please reference the patch fixing it and put it in ON_QA.

Comment 3 Jan Zmeskal 2019-02-25 13:34:34 UTC
Moving to POST since the patch this BZ depends on (https://gerrit.ovirt.org/#/c/97643/) has not been merged yet. Once it's merged, this can be moved to MODIFIED. Once it's a part of consumable package, this can be moved to ON_QA and verified by QA.

Comment 4 Sandro Bonazzola 2019-03-12 12:54:23 UTC
4.3.1 has been released, please re-target this bug as soon as possible.

Comment 5 Ivana Saranova 2019-04-02 15:58:41 UTC
Steps:
1) set ovirt_cluster_name to cluster which is not Default
2) Run ovirt-metrics-store-installation.yml playbook

Results:
VM is created in correct cluster, playbook ends successfully.

Verified in: 
ovirt-engine-4.2.8.5-0.1.el7ev.noarch
ovirt-engine-metrics-1.2.1.3-1.el7ev.noarch

Also verified in:
ovirt-engine-4.3.3.1-0.1.el7.noarch
ovirt-engine-metrics-1.2.1.3-1.el7ev.noarch

Comment 6 Sandro Bonazzola 2019-04-16 13:58:31 UTC
This bugzilla is included in oVirt 4.3.3 release, published on April 16th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.3 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.


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