Bug 1571583 - Service Logging Output doesn't work as expected.
Summary: Service Logging Output doesn't work as expected.
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: GA
: cfme-future
Assignee: Lucy Fu
QA Contact: Angelina Nikiforova
Whiteboard: services
Depends On:
TreeView+ depends on / blocked
Reported: 2018-04-25 07:28 UTC by Ilanit Stein
Modified: 2019-08-01 14:31 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-06-11 15:26:30 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:

Attachments (Terms of Use)
my_services_logging.png (166.31 KB, image/png)
2018-04-25 07:28 UTC, Ilanit Stein
no flags Details
service_catalog_item_logging_options.png (202.22 KB, image/png)
2018-04-25 08:58 UTC, Ilanit Stein
no flags Details

Description Ilanit Stein 2018-04-25 07:28:38 UTC
Created attachment 1426463 [details]

Description of problem:
When in the catalog item window 'Logging Output' is set to one of the following options: on error/always/never - 
The Logging displayed under Services->My Services-> Choose the last active service: "Provisioning tab, 
is always the whole same ansible log.  

Example for such log (displayed for all 3 'Logging Output' options):
PLAY [oVirt image template] ****************************************************

TASK [ovirt-image-template : Download the qcow image] **************************
changed: [localhost]

TASK [ovirt-image-template : Check file type] **********************************
ok: [localhost]

TASK [ovirt-image-template : Fail if image is not qcow] ************************
skipping: [localhost]

TASK [ovirt-image-template : Login to oVirt] ***********************************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'engine_url' is undefined\n\nThe error appears to have been in '/var/lib/awx/projects/_9__rhv_repo/roles/ovirt-image-template/tasks/main.yml': line 25, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n- block:\n  - name: Login to oVirt\n    ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'engine_url' is undefined"}

TASK [ovirt-image-template : Remove vm] ****************************************
fatal: [localhost]: FAILED! => {"msg": "The conditional check 'ovirt_templates | length == 0' failed. The error was: error while evaluating conditional (ovirt_templates | length == 0): 'ovirt_templates' is undefined\n\nThe error appears to have been in '/var/lib/awx/projects/_9__rhv_repo/roles/ovirt-image-template/tasks/main.yml': line 104, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n  always:\n    - name: Remove vm\n      ^ here\n"}

PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=2   

Version-Release number of selected component (if applicable):

How reproducible:

Expected results:
Ansible Logging Output should be filtered by the catalog item settings (Always/On error/Never)

Comment 2 Ilanit Stein 2018-04-25 08:58:31 UTC
Created attachment 1426502 [details]

Comment 4 William Fitzgerald 2019-04-04 17:54:38 UTC
I reproduced the problem on latest version

For a simple successful playbook with verbosity set to 0, the logging output is the same for all 3 options.

In this case, There should only be output for always.

Reproducer :

Comment 5 Tina Fitzgerald 2019-04-04 19:22:38 UTC
Hi Lucy,

Can you look into this issue when you have time?


Comment 6 Lucy Fu 2019-04-05 15:23:59 UTC
This seems to be a misunderstanding of Logging Output option which decides what Ansible job stdout would be logged in evm.log file.

The Standard Output section in Provisioning tab under an Active Service would always be displayed if the output is available.

Please check evm.log file to verify if it works as designed.


Comment 7 William Fitzgerald 2019-04-05 17:48:55 UTC
Sorry for my misunderstanding of how this works. I am only seeing the playbook output in the evm.log when Logging is set to always for a successful playbook request.

Works as designed ...

Comment 8 Ilanit Stein 2019-04-08 09:14:16 UTC
Lucy, William,

Thanks for clarifying the issue, and checking it.
Added doc flag, so that the documentation around this will be accurate.

Note You need to log in before you can comment on or make changes to this bug.