Description of problem: When installing metrics store the default value for openshift_distribution is wrong. Default value for openshift_distribution should be 'origin' according to the READMEs and documentation, but if you don't specify this value in the configuration file, playbook assumes you want to install RHEL VMs instead of CentOS (which should happen only if you set openshift_distribution to 'enterprise'). Also setting openshift_distribution to any value - empty, random words - passes successfully and playbook assumes you want to install RHEL VMs. Version-Release number of selected component (if applicable): ovirt-engine-4.3.4.1-0.1.el7.noarch ovirt-engine-metrics-1.3.1-1.el7ev.noarch How reproducible: Always Steps to Reproduce: 1. Prepare configuration files according to the documentation, don't use the openshift_distribution variable (it's not in the configuration files by default) 2. Run the installation script ` ANSIBLE_JINJA2_EXTENSIONS="jinja2.ext.do" ./configure_ovirt_machines_for_metrics.sh --playbook=ovirt-metrics-store-installation.yml --ask-vault-pass ` 3. Check that installation passed successfully. Actual results: Installation fails on "msg": "Template with name 'rhelguest76' and version 'None' in cluster 'cluster1' was not found'" Expected results: Installation is successful and playbook uses template with name 'centos76'. Additional info: After further inspection, the problem seems to be with the default value not being set in the proper role.
Please attach ansible log
Sorry for the delay. After inspecting the configuration files further, I noticed that there is a file name 10-rhv_vars.yml, which is not documented in the official documentation or README for the metrics installation role and has the variable openshift_distribution set to the non default value "openshift-enterprise", causing the default value of openshift_distribution not being used. This file is in the official package. If I delete the file, the default value is used. If I set the variable openshift_distribution to empty or anything neither 'origin' nor 'openshift-enterprise', playbook expects a RHEL template and fails. There should be some sort of validation for the correct values. Ansible log: TASK [oVirt.vm-infra : Wait for VMs to be added] ******************************************* [DEPRECATION WARNING]: evaluating create_openshift_bastion_vm as a bare variable, this behaviour will go away and you might need to add |bool to the expression in the future. Also see CONDITIONAL_BARE_VARS configuration toggle.. This feature will be removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. FAILED - RETRYING: Wait for VMs to be added (21 retries left). An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ValueError: Template with name 'rhelguest76' and version 'None' in cluster 'cluster1' was not found' failed: [localhost] (item={'failed': False, u'finished': 0, u'results_file': u'/root/.ansible_async/898234832828.32349', u'ansible_job_id': u'898234832828.32349', u'started': 1, 'changed': False}) => {"ansible_job_id": "898234832828.32349", "ansible_loop_var": "item", "attempts": 2, "changed": false, "finished": 1, "item": {"ansible_job_id": "898234832828.32349", "changed": false, "failed": false, "finished": 0, "results_file": "/root/.ansible_async/898234832828.32349", "started": 1}, "msg": "Template with name 'rhelguest76' and version 'None' in cluster 'cluster1' was not found'"}
In oVirt the default for openshift_distribution is "origin". In RHV this is overridden by the 10-rhv_vars.yml that updates the variable to "openshift-enterprise". I will update the README for this variable to explain the value for RHV.
We don't have capacity now to verify metrics bugs. Moving to async 4.3.5-1.
I tried to verify this with ovirt-engine-metrics-1.3.3.2-1.el7ev.noarch. First part of the reported issue is verified. I tested this on RHEL-based engine and I can confirm that when I did not specify openshift_distribution variable, "openshift-enterprise" was used in accordance with current README. However, I don't think I can verify this because the reported (Ivana) also pointed out this: Also setting openshift_distribution to any value - empty, random words - passes successfully and playbook assumes you want to install RHEL VMs. This is still true. In my test run, I set openshift_distibution variable to "dog" in /etc/ovirt-engine-metrics/config.yml.d/metrics-store-config.yml. However, it seems that "openshift-enterprise" was assumed nonetheless. This is caused by the logic operation on line 226 in /usr/share/ansible/roles/oVirt.metrics/roles/oVirt.origin-on-ovirt/tasks/create_openshift_bastion_vm.yml. As per description, this BZ should also handle cases when user provides invalid value in openshift_distribution variable. I think in that case it would be best to fail the playbook very early and inform user about what happened. Log from verification is attached.
Moving out to 4.3.6, failed QA on 4.3.5 and not worth an async.
Closing low severity bugs, based on QE capacity, if you would like to still verify this issue please reopen.