Bug 1679521 - When user only edits config.yml.example, they may experience data domain mismatch during OKD deployment
Summary: When user only edits config.yml.example, they may experience data domain mism...
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-21 10:25 UTC by Jan Zmeskal
Modified: 2019-04-16 13:58 UTC (History)
2 users (show)

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


Attachments (Terms of Use)

Description Jan Zmeskal 2019-02-21 10:25:52 UTC
Description of problem:
The expected way of preparing metrics installation is described here: https://gerrit.ovirt.org/#/c/97643/48/roles/oVirt.metrics-store-installation/README.md 
User is supposed to copy /etc/ovirt-engine-metrics/config.yml.example and customize the default values for the variables. It works fine for most of the variables, but there is one potential problem. Let me describe the scenario:
- User specifies this: openshift_ovirt_storage_domain_name: my_nfs_0
- Then they run ovirt-metrics-store-installation.yml playbook
- During this playbook, OS image specified in qcow_url is downloaded
- That image is then uploaded to RHV engine with name "rhelguest76" unless overridden by the user
- During the upload, the role oVirt.image-template needs to determine storage domain for the disk of the template 
- The way this storage domain is determined can be seen here: https://github.com/oVirt/ovirt-ansible-image-template/blob/43b04c27d001f98655d97b8e4553d6797a251d4f/tasks/qcow2_image.yml#L67
- It basically looks at all the data domains in your Data Center and takes the first one
- Here comes the problem! Let's say the first data domain it finds is "hosted_storage". It might very well happen in hosted engine environment
- Disk for your template is thus placed into hosted_storage data domain and the ovirt-metrics-store-installation.yml finishes successfully
- Then you start install_okd.yml playbook. During its execution, it tries to create OKD all-in-one node from previously created template
- HOWEVER, your template's disk is located on hosted_stored while we specified openshift_ovirt_storage_domain_name: my_nfs_0. Here's where the playbook fails - because we cannot create a new VM disk on different storage domain.


Version-Release number of selected component (if applicable):
ovirt-engine-metrics-1.2.1-0.0.master.20190220121053.el7.noarch (patchset 48)

How reproducible:
Depends on environment

Steps to Reproduce:
Basically the description

Actual results:
- install_okd.yml might fail because of this

Expected results:
- The template created in bastion creation phase should be in the same data domain that is specified in openshift_ovirt_storage_domain_name variable.

Additional info:
Two workarounds exist: 
1) After the bastion creation, you can manually copy your template's disk to the correct storage domain
2) You can specify this in your config.yml:
template_disk_storage: my_nfs_0
There's basically nothing wrong with the second option. The problem is that it's definitely not obvious to the user that such an option can be used though. It's not specified neither in README nor in example config. But that's probably okay. There's not really a new for another variable in config as long as we make sure that the template is created in the same storage domain as specified in openshift_ovirt_storage_domain_name variable.

Comment 1 Shirly Radco 2019-02-21 14:54:44 UTC
Now when you update config.yml it should update in all places.

Comment 2 Jan Zmeskal 2019-02-25 13:31:59 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 3 Ivana Saranova 2019-04-04 08:44:16 UTC
Steps:
1) set ovirt_cluster_name to cluster which is not Default
2) Run ovirt-metrics-store-installation.yml playbook

Results:
Template is not in specified storage domain, though playbook doesn't fail (probably because there is enough space on the hosted_storage) and metrics-store machine is created in specified data domain.

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

Verified tested in:
ovirt-engine-4.3.3.1-0.1.el7.noarch
ovirt-engine-metrics-1.2.1.3-1.el7ev.noarch

Comment 4 Sandro Bonazzola 2019-04-16 13:58:34 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.