Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1879850 - Setting fact failed in the satellite clone with template error
Summary: Setting fact failed in the satellite clone with template error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Clone
Version: 6.7.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: 6.8.0
Assignee: Chris Roberts
QA Contact: Vladimír Sedmík
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-17 07:25 UTC by Devendra Singh
Modified: 2020-10-27 12:39 UTC (History)
4 users (show)

Fixed In Version: satellite-clone-1.6.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 12:38:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github RedHatSatellite satellite-clone pull 374 0 None closed Update satellite backup check for ansible 2.9 2020-11-23 09:10:20 UTC
Red Hat Product Errata RHBA-2020:4365 0 None None None 2020-10-27 12:38:59 UTC

Description Devendra Singh 2020-09-17 07:25:17 UTC
Description of problem: Setting fact failed in the satellite clone with template error
Version-Release number of selected component (if applicable):
6.7

How reproducible:
always

Steps to Reproduce:
1. Use upstream satellite-clone master branch.
2. Update all the required configuration file to trigger the satellite-clone-playbook.yml job for restore.
3. while setting the fact of satellite-version it gets failed.

: FAILED! => {"msg": "The conditional check 'backup_metadata | success' failed. The error was: template error while templating string: no filter named 'success'. String: {% if backup_metadata | success %} True {% else %} False {% endif %}\n\nThe error appears to be in 'satellite-clone/roles/satellite-clone/tasks/backup_satellite_version_check.yml': line 30, 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: setting fact - satellite_version\n  ^ here\n"}

msg: The conditional check 'backup_metadata | success' failed. The error was: template error while templating string: no filter named 'success'. String: {% if backup_metadata | success %} True {% else %} False {% endif %}

The error appears to be in 'satellite-clone/roles/satellite-clone/tasks/backup_satellite_version_check.yml': line 30, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: setting fact - satellite_version
  ^ here


Actual results:
Setting fact failed in the satellite clone with template error

Expected results:
Setting fact should be completed successfully.

Additional info:

Comment 5 John Mitsch 2020-09-17 15:45:36 UTC
Devendra,

What ansible version was used? I suspect that ansible updated in the rhel-7-server-extras-rpms repo and that version no longer supports the syntax we use.

Comment 6 Devendra Singh 2020-09-17 17:09:30 UTC
(In reply to John Mitsch from comment #5)
> Devendra,
> 
> What ansible version was used? I suspect that ansible updated in the
> rhel-7-server-extras-rpms repo and that version no longer supports the
> syntax we use.
 
We used 2.9.13 ansible version.

(.env) #$ ansible --version
ansible 2.9.13
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/jenkins/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.15 (default, May  9 2018, 11:32:33) [GCC 7.3.1 20180130 (Red Hat 7.3.1-2)]

Comment 7 John Mitsch 2020-09-18 15:25:58 UTC
What version of ansible are we shipping with satellite-clone? I am seeing only 2.4 available for these repos:

[root@sat-clone-test1 ~]# yum provides ansible
... 
ansible-2.4.0.0-1.el7ae.noarch : SSH-based configuration management, deployment, and task execution system
Repo        : rhel-7-server-satellite-maintenance-6-rpms



ansible-2.4.2.0-2.el7.noarch : SSH-based configuration management, deployment, and task execution system
Repo        : rhel-7-server-satellite-maintenance-6-beta-rpms



ansible-2.4.2.0-2.el7.noarch : SSH-based configuration management, deployment, and task execution system
Repo        : rhel-7-server-satellite-maintenance-6-rpms



ansible-2.4.2.0-2.el7.noarch : SSH-based configuration management, deployment, and task execution system
Repo        : @rhel-7-server-extras-rpms

Comment 8 John Mitsch 2020-09-18 15:38:52 UTC
After a discussion off-thread, we are using ansible 2.8 for Satellite 6.7. The current sat-clone syntax should be supported for this.

The satellite to ansible version mapping is 6.6 = 2.6, 6.7 = 2.8, 6.8 = 2.9

It looks like we will run into this issue for 6.8, so we could keep this BZ and align it with 6.8 (but also could just fall under a "support 6.8 for sat-clone" BZ)

No changes should be necessary for 6.7, can QE update the automation to use ansible 2.8 for satellite 6.7 clones and ensure everything else functions as expected?

Comment 9 John Mitsch 2020-09-18 19:49:39 UTC
Though this isn't needed for 6.7, it has been fixed in https://github.com/RedHatSatellite/satellite-clone/archive/1.6.1.tar.gz

Comment 10 Devendra Singh 2020-09-22 10:53:15 UTC
QE verified their automation with the latest upstream fix (https://github.com/RedHatSatellite/satellite-clone/pull/374) and it work fine

Comment 14 errata-xmlrpc 2020-10-27 12:38:46 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 (Satellite 6.8 Satellite Maintenance Release), 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/RHBA-2020:4365


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