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

Bug 1690388

Summary: Missing IP attribute when creating metrics installer machine
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: unspecifiedCC: bugs, lleistne
Target Milestone: ovirt-4.3.3Flags: sradco: ovirt-4.3?
lleistne: testing_ack+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-metrics-1.2.1.3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-04-16 13:58:17 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:
Bug Depends On:    
Bug Blocks: 1631193    

Description Ivana Saranova 2019-03-19 11:49:58 UTC
Description of problem:
When installing metrics with this brew build ID: 863978

I get into an issue with missing IP of the metrics installer machine in task  "Set fact of the bastion machine FQDN". According to ovirt_vm_facs module (https://docs.ansible.com/ansible/latest/modules/ovirt_vm_facts_module.html), there is no 'ip' key in the returned value ovirt_vms (http://ovirt.github.io/ovirt-engine-api-model/master/#types/vm).


Version-Release number of selected component (if applicable):
ovirt-engine-4.3.2-0.1.el7.noarch
ovirt-engine-metrics-1.2.1-1.el7ev.noarch
ansible-2.7.9-1.el7ae.noarch


How reproducible:
Always


Steps to Reproduce:
1. On the Manager machine, copy /etc/ovirt-engine-metrics/config.yml.example to config.yml:
```
# cp /etc/ovirt-engine-metrics/metrics-store-config.yml.example /etc/ovirt-engine-metrics/config.yml.d/metrics-store-config.yml
```
2. Update the values of /etc/ovirt-engine-metrics/metrics-store-config.yml to match the details of your specific environment:
```
# vi /etc/ovirt-engine-metrics/config.yml.d/metrics-store-config.yml
```

3. Go to ovirt-engine-metrics repo:
```
# cd /usr/share/ovirt-engine-metrics
```

4. Run the metrics store installation playbook that creates the metrics store installer virtual machine
```
# ANSIBLE_JINJA2_EXTENSIONS="jinja2.ext.do" ./configure_ovirt_machines_for_metrics.sh --playbook=ovirt-metrics-store-installation.yml
```


Actual results:

TASK [/usr/share/ansible/roles/oVirt.metrics/roles/oVirt.origin-on-ovirt : Set fact of the bastion machine FQDN] ***
task path: /usr/share/ansible/roles/oVirt.metrics/roles/oVirt.origin-on-ovirt/tasks/create_openshift_bastion_vm.yml:20
fatal: [localhost]: FAILED! => {
    "msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'ip'\n\nThe error appears to have been in '/usr/share/ansible/roles/oVirt.metrics/roles/oVirt.origin-on-ovirt/tasks/create_openshift_bastion_vm.yml': line 20, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Set fact of the bastion machine FQDN\n  ^ here\n"
}


Expected results:
Task does not fail.

Additional info:

Comment 1 Ivana Saranova 2019-04-04 14:11:35 UTC
Steps:
1. Set config files according to documentation and README
2. Run the metrics store installation playbook that creates the metrics store installer virtual machine
```
# ANSIBLE_JINJA2_EXTENSIONS="jinja2.ext.do" ./configure_ovirt_machines_for_metrics.sh --playbook=ovirt-metrics-store-installation.yml
```

Result:
FQDN is provided, task does not fail. Playbook finishes 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 2 Sandro Bonazzola 2019-04-16 13:58:17 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.