Bug 1547595

Summary: Avoid logging at error level for ansible tasks with ignore_errors.
Product: [oVirt] ovirt-hosted-engine-setup Reporter: Nikolai Sednev <nsednev>
Component: GeneralAssignee: Ido Rosenzwig <irosenzw>
Status: CLOSED CURRENTRELEASE QA Contact: Nikolai Sednev <nsednev>
Severity: medium Docs Contact:
Priority: high    
Version: 2.2.10CC: bugs, irosenzw, stirabos
Target Milestone: ovirt-4.2.2Keywords: Triaged
Target Release: ---Flags: rule-engine: ovirt-4.2+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-hosted-engine-setup-2.2.13-1 Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-29 10:55:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1455169, 1458709    
Attachments:
Description Flags
engine logs
none
alma04 logs none

Description Nikolai Sednev 2018-02-21 15:15:59 UTC
Created attachment 1398808 [details]
engine logs

Description of problem:
Avoid logging at error level for ansible tasks with ignore_errors.
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [Make the engine aware that the external VM is stopped]
[ ERROR ] Error: Fault reason is "Operation Failed". Fault detail is "[Desktop does not exist]". HTTP response code is 400.
[ ERROR ] fatal: [localhost]: FAILED! => {"changed": false, "msg": "Fault reason is \"Operation Failed\". Fault detail is \"[Desktop does not exist]\". HTTP response code is 400."}
[ INFO  ] TASK [Wait for the local bootstrap VM to be down at engine eyes]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [Remove boostrap external VM from the engine]
[ INFO  ] changed: [localhost]
[ INFO  ] Stage: Clean up
[ INFO  ] Cleaning temporary resources
[ INFO  ] TASK [Gathering Facts]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [include_tasks]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [Remove local vm dir]
[ INFO  ] changed: [localhost]
[ INFO  ] Generating answer file '/var/lib/ovirt-hosted-engine-setup/answers/answers-20180221155736.conf'
[ INFO  ] Generating answer file '/etc/ovirt-hosted-engine/answers.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ INFO  ] Hosted Engine successfully deployed

alma04 ~]# hosted-engine --vm-status


--== Host 1 status ==--

conf_on_shared_storage             : True
Status up-to-date                  : True
Hostname                           : alma04
Host ID                            : 1
Engine status                      : {"health": "good", "vm": "up", "detail": "Up"}
Score                              : 3400
stopped                            : False
Local maintenance                  : False
crc32                              : 96138d6e
local_conf_timestamp               : 5529
Host timestamp                     : 5528
Extra metadata (valid at timestamp):
        metadata_parse_version=1
        metadata_feature_version=1
        timestamp=5528 (Wed Feb 21 16:39:00 2018)
        host-id=1
        score=3400
        vm_conf_refresh_time=5529 (Wed Feb 21 16:39:01 2018)
        conf_on_shared_storage=True
        maintenance=False
        state=EngineUp
        stopped=False


Version-Release number of selected component (if applicable):
ovirt-hosted-engine-ha-2.2.5-1.el7ev.noarch
ovirt-hosted-engine-setup-2.2.10-1.el7ev.noarch
rhvm-appliance-4.2-20180202.0.el7.noarch
Linux 3.10.0-851.el7.x86_64 #1 SMP Mon Feb 12 07:53:52 EST 2018 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 7.5 Beta (Maipo)

How reproducible:
100%

Steps to Reproduce:
1.Deploy SHE ansible over NFS on RHEL7.5 host.

Actual results:
Although deployment succeeds, there are errors in CLI during deployment and after trying to log in to UI, customer receives these in browser:
"This page isn’t working
nsednev-he-2.qa.lab.tlv.redhat.com redirected you too many times.
Try clearing your cookies."

Expected results:
No errors should appear. Browser should let the customer log in normally, without closing all browser tabs and and opening new browser session.

Additional info:
Sosreport from engine and host.

Comment 1 Nikolai Sednev 2018-02-21 15:17:08 UTC
Created attachment 1398809 [details]
alma04 logs

Comment 2 Nikolai Sednev 2018-03-18 15:09:36 UTC
Works for me on these components:
ovirt-hosted-engine-ha-2.2.7-1.el7ev.noarch
ovirt-hosted-engine-setup-2.2.13-1.el7ev.noarch
rhvm-appliance-4.2-20180202.0.el7.noarch
Linux 3.10.0-861.el7.x86_64 #1 SMP Wed Mar 14 10:21:01 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 7.5 (Maipo)
Deployed over NFS and did not seen any originally reported errors.

[ INFO  ] TASK [Make the engine aware that the external VM is stopped]
[ INFO  ] TASK [Wait for the local bootstrap VM to be down at engine eyes]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [Remove boostrap external VM from the engine]
[ INFO  ] changed: [localhost]
[ INFO  ] TASK [Include custom tasks for after setup customization]
[ INFO  ] Stage: Clean up
[ INFO  ] Cleaning temporary resources
[ INFO  ] TASK [Gathering Facts]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [include_tasks]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [Remove local vm dir]
[ INFO  ] changed: [localhost]
[ INFO  ] Generating answer file '/var/lib/ovirt-hosted-engine-setup/answers/answers-20180318170504.conf'
[ INFO  ] Generating answer file '/etc/ovirt-hosted-engine/answers.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ INFO  ] Hosted Engine successfully deployed

Comment 3 Sandro Bonazzola 2018-03-29 10:55:03 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

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