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

Bug 1697521

Summary: When installing metrics-store the playbook fails on generate vars.yaml task
Product: [oVirt] ovirt-engine-metrics Reporter: Ivana Saranova <isaranov>
Component: GenericAssignee: Shirly Radco <sradco>
Status: CLOSED CURRENTRELEASE QA Contact: Ivana Saranova <isaranov>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.3.0CC: bugs, dfediuck, lleistne
Target Milestone: ovirt-4.3.3Flags: dfediuck: ovirt-4.3+
lleistne: testing_ack+
Target Release: 1.3.0.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-metrics-1.3.0.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-04-16 13:58:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Metrics RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ivana Saranova 2019-04-08 15:01:24 UTC
Description of problem:
When installing metrics-store according to the documentation and README, the first playbook (deploys metrics installer machine and metrics store machine] fails on the generate vars.yaml task due to missing newline in the vars.yaml.template.

Version-Release number of selected component (if applicable):
ovirt-engine-4.3.3.1-0.1.el7.noarch
ovirt-engine-metrics-1.3.0.1-1.el7ev.noarch

How reproducible:
Always

Steps to Reproduce:
1. install metrics according to documentation and README
2. Run the script 

ANSIBLE_JINJA2_EXTENSIONS="jinja2.ext.do" ./configure_ovirt_machines_for_metrics.sh   --playbook=ovirt-metrics-store-installation.yml --ask-vault-pass


Actual results:
Playbook fails:

TASK [/usr/share/ansible/roles/oVirt.metrics/roles/oVirt.origin-on-ovirt : Include vars.yaml file] *** fatal: [localhost]: FAILED! => {"ansible_facts": {}, "ansible_included_var_files": [], "changed": false, "message": "Syntax Error while loading YAML.\n did not find expected key\n\nThe error appears to have been in '/usr/share/ansible/roles/oVirt.metrics/roles/oVirt.origin-on-ovirt/files/vars.yaml': line 52, column 53, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n authorized_ssh_keys: \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyeSc7AvP0LYOZePA278HGBb48xi4WZ5MxeQTmL73a617uHMRTE+oSgQF7ZdoBXKF8ubMpE/nuJvM/hIwdik0LLuEZfbpgM3sX02veBIDcQ1Bs0By6+yNqzquDJ9O+JZvfXOPVl5a6qlaURzrsUnkAuVEyRiXo0Hu2Glk+umZBujrCQyVoZRZRTsT1BWTePp6CWiYVHwyxMIpkOVBwFcRAPrqSlmbPfBQHu6sZjYHM4GQes2TA1M5tmhA1AhG6J/EjVG9AA6NFKgIcjHi/PDMJkRh0kj5iSPhe/rvUjWPgyduyl72lXYmwrP04CBMxn4MPmxb2h9XIbVVd0a99TaLN\"\n root_password: \"{{ root_password }}\" custom_script: \"{{ cloud_init_script_bastion }}\"\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - \"{{ foo }}\"\n"}

Expected results:
Playbook doesn't fail

Additional info:

Comment 1 Ivana Saranova 2019-04-10 12:56:27 UTC
Steps to Reproduce:
1. install metrics according to documentation and README
2. Run the script 

ANSIBLE_JINJA2_EXTENSIONS="jinja2.ext.do" ./configure_ovirt_machines_for_metrics.sh   --playbook=ovirt-metrics-store-installation.yml --ask-vault-pass

Result:
Playbook finishes successfully, no errors on the generate vars.yaml file.

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

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

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