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

Bug 1566523

Summary: Metrics playbook is not idempotent
Product: [oVirt] ovirt-engine-metrics Reporter: Lukas Svaty <lsvaty>
Component: GenericAssignee: Shirly Radco <sradco>
Status: CLOSED CURRENTRELEASE QA Contact: Lukas Svaty <lsvaty>
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: bugs
Target Milestone: ovirt-4.2.3Flags: rule-engine: ovirt-4.2+
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-10 06:32:49 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 Lukas Svaty 2018-04-12 13:04:52 UTC
Description of problem:
configure_metrics playbook fails on patching externalIPs of the container as it is already set by previous run, therefore breaking idempotency of ansible

Version-Release number of selected component (if applicable):
ovirt-engine-metrics-1.1.4-0.0.master.20180408064245.el7.centos.noarch

How reproducible:
100%

Steps to Reproduce:
1. /usr/share/ovirt-engine-metrics/configure_ovirt_machines_for_metrics.sh
2. /usr/share/ovirt-engine-metrics/configure_ovirt_machines_for_metrics.sh
3.

Actual results:
TASK [oVirt.metrics/roles/oVirt.metrics-store-setup : Assign an IP Address to the Elasticsearch Service] **********************************************************************************************************
fatal: [10-37-138-124.rhev.lab.eng.brq.redhat.com]: FAILED! => {"changed": true, "cmd": "oc patch svc logging-es -p '{\"spec\":{\"externalIPs\":[\"10.37.138.124\"]}}'", "delta": "0:00:00.987452", "end": "2018-04-12 14:58:03.210222", "msg": "non-zero return code", "rc": 1, "start": "2018-04-12 14:58:02.222770", "stderr": "", "stderr_lines": [], "stdout": "service \"logging-es\" not patched", "stdout_lines": ["service \"logging-es\" not patched"]}


Expected results:
Check if externalIPs are set, if they are, do not patch

Comment 1 Lukas Svaty 2018-04-19 13:16:13 UTC
patch not included in ovirt-engine-metrics-1.1.4-1.el7ev.noarch

please make sure ovirt-milestone is correct

Comment 2 Lukas Svaty 2018-04-19 13:17:27 UTC
apologies, updated wrong bug, verified in ovirt-engine-metrics-1.1.4-1.el7ev.noarch

Comment 3 Sandro Bonazzola 2018-05-10 06:32:49 UTC
This bugzilla is included in oVirt 4.2.3 release, published on May 4th 2018.

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