Bug 1824846 - [RFE] make the ansible tower refresh worker continue on playbook import errors
Summary: [RFE] make the ansible tower refresh worker continue on playbook import errors
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.11.6
Assignee: Adam Grare
QA Contact: Jaroslav Henner
Red Hat CloudForms Documentation
URL:
Whiteboard:
: 1819310 (view as bug list)
Depends On:
Blocks: 1822318
TreeView+ depends on / blocked
 
Reported: 2020-04-16 14:38 UTC by Felix Dewaleyne
Modified: 2023-10-06 19:41 UTC (History)
10 users (show)

Fixed In Version: 5.11.6.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-10 15:56:39 UTC
Category: ---
Cloudforms Team: Ansible
Target Upstream Version:
Embargoed:
pm-rhel: cfme-5.11.z+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ManageIQ manageiq issues 20248 0 None open RFE: Providers shouldn't report `Last refresh: Success` when hit some exception during refresh 2020-11-03 15:22:28 UTC
Red Hat Bugzilla 1819310 0 high CLOSED [RFE] Do not completely fail Ansible Tower refresh when a template fails to parse 2023-10-06 19:33:10 UTC
Red Hat Product Errata RHSA-2020:2480 0 None None None 2020-06-10 13:39:20 UTC

Comment 5 CFME Bot 2020-04-22 19:56:06 UTC
New commit detected on ManageIQ/manageiq-providers-ansible_tower/master:

https://github.com/ManageIQ/manageiq-providers-ansible_tower/commit/7fe39c7293bd04f43951401d0ae7dc13240eeb78
commit 7fe39c7293bd04f43951401d0ae7dc13240eeb78
Author:     Adam Grare <agrare>
AuthorDate: Wed Apr 22 17:06:54 2020 +0000
Commit:     Adam Grare <agrare>
CommitDate: Wed Apr 22 17:06:54 2020 +0000

    Catch exceptions when parsing job_templates

    If parsing a job_template raises an exception catch that error and
    continue rather than fail the whole refresh.

    Example failures include invalid YAML in the job_template
    extra_vars_hash that YAML.load() fails to parse.

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1824846

 app/models/manageiq/providers/ansible_tower/inventory/parser/automation_manager.rb | 50 +-
 1 file changed, 30 insertions(+), 20 deletions(-)

Comment 6 CFME Bot 2020-04-23 22:01:06 UTC
New commit detected on ManageIQ/manageiq-providers-ansible_tower/jansa:

https://github.com/ManageIQ/manageiq-providers-ansible_tower/commit/8f6c58b53a0e796fb513d3d40a905e052e53e82f
commit 8f6c58b53a0e796fb513d3d40a905e052e53e82f
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Wed Apr 22 19:53:53 2020 +0000
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Wed Apr 22 19:53:53 2020 +0000

    Merge pull request #218 from agrare/bz_1824846_catch_parser_errors_on_individual_job_templates

    Catch exceptions when parsing job_templates

    (cherry picked from commit 3b0cb7bef5920127f112762c7a5183d95295f72e)

    https://bugzilla.redhat.com/show_bug.cgi?id=1824846

 app/models/manageiq/providers/ansible_tower/inventory/parser/automation_manager.rb | 50 +-
 1 file changed, 30 insertions(+), 20 deletions(-)

Comment 8 CFME Bot 2020-05-15 14:51:11 UTC
New commit detected on ManageIQ/manageiq-providers-ansible_tower/ivanchuk:

https://github.com/ManageIQ/manageiq-providers-ansible_tower/commit/f24adea66fc17c3b4e8782336ba63cad555f05ca
commit f24adea66fc17c3b4e8782336ba63cad555f05ca
Author:     Adam Grare <agrare>
AuthorDate: Wed Apr 22 17:06:54 2020 +0000
Commit:     Adam Grare <agrare>
CommitDate: Wed Apr 22 17:06:54 2020 +0000

    Merge pull request #218 from agrare/bz_1824846_catch_parser_errors_on_individual_job_templates

    Catch exceptions when parsing job_templates

    (cherry picked from commit 3b0cb7bef5920127f112762c7a5183d95295f72e)

    https://bugzilla.redhat.com/show_bug.cgi?id=1824846

 app/models/manageiq/providers/ansible_tower/shared/inventory/parser/automation_manager.rb | 50 +-
 1 file changed, 30 insertions(+), 20 deletions(-)

Comment 9 Nandini Chandra 2020-06-03 17:33:49 UTC
Verified on 5.11.6

Reproducer
1)Add Tower to CFME
2)Make sure the Tower set up has a job template to which a variable with '\\' is being passed.
3)Wait for provider refresh to complete.

On 5.11.6 (with the fix) , I have verified the following after the Tower provider was added:
1)UI shows provider refresh has completed
2)There are no errors in evm.log
3)I'm able to see all the objects under the provider. I also see the job template in question being listed in the UI. The job template shouldn't get listed in the UI since it's not usable. Clicking on the template doesn't take you to the template details page. I'll report a BZ to address this issue.

I also see this warning logged in evm.log. This change was incorporated through https://bugzilla.redhat.com/show_bug.cgi?id=1824846
----] W, [2020-06-03T12:27:42.321964 #1073065:2b0930dc05b4] WARN -- : MIQ(ManageIQ::Providers::AnsibleTower::Inventory::Parser::AutomationManager#configuration_scripts) Failed to parse job_template ID [7]: <unknown>): found unknown escape character while parsing a quoted scalar at line 2 column 10

Comment 10 Jaroslav Henner 2020-06-04 10:06:09 UTC
*** Bug 1819310 has been marked as a duplicate of this bug. ***

Comment 12 Adam Grare 2020-06-05 16:54:43 UTC
https://github.com/ManageIQ/manageiq/pull/20241 contains a change which actually fixes this case rather than just working around it.  The newer version of ruby's yaml parser is able to handle this type of a payload.

Recommend backporting that to resolve this issue in a better way.

Comment 16 errata-xmlrpc 2020-06-10 13:39:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:2480

Comment 20 Jaroslav Henner 2020-11-03 16:27:14 UTC
RHCFQE-14552
https://github.com/ManageIQ/integration_tests/pull/10314


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