Bug 1635823 - Unexpected templating type error on ceph_docker_image_tag when converting to containerized cluster
Summary: Unexpected templating type error on ceph_docker_image_tag when converting to ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Ceph-Ansible
Version: 3.1
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: 3.2
Assignee: Noah Watkins
QA Contact: Coady LaCroix
URL:
Whiteboard:
Depends On:
Blocks: 1632498
TreeView+ depends on / blocked
 
Reported: 2018-10-03 18:17 UTC by Coady LaCroix
Modified: 2019-01-03 19:02 UTC (History)
14 users (show)

Fixed In Version: RHEL: ceph-ansible-3.2.0-0.1.beta5.el7cp Ubuntu: ceph-ansible_3.2.0~beta5-2redhat1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-03 19:02:01 UTC
Embargoed:


Attachments (Terms of Use)
cephci_logs (201.14 KB, application/zip)
2018-10-03 18:17 UTC, Coady LaCroix
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github ceph ceph-ansible pull 3191 0 'None' closed Convert image tags to string before searching 2020-03-17 09:09:43 UTC
Red Hat Product Errata RHBA-2019:0020 0 None None None 2019-01-03 19:02:15 UTC

Description Coady LaCroix 2018-10-03 18:17:09 UTC
Created attachment 1490208 [details]
cephci_logs

Description of problem:
When executing the ceph-ansible playbook 'switch-from-non-containerized-to-containerized-ceph-daemons.yml', I am encountering the following fatal error:

2018-10-02 13:32:26,971 - ceph.ceph - INFO - fatal: [ceph-clacroix-1538508508439-node1-mon]: FAILED! => {"failed": true, "msg": "The
 conditional check 'ceph_docker_image_tag | search(\"ubuntu\")' failed. The error was: Unexpected templating type error occurred on 
({% if ceph_docker_image_tag | search(\"ubuntu\") %} True {% else %} False {% endif %}): expected string or buffer\n\nThe error appe
ars to have been in '/usr/share/ceph-ansible/switch-from-non-containerized-to-containerized-ceph-daemons.yml': line 76, column 7, bu
t may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n    - name: set_fac
t ceph_uid for ubuntu\n      ^ here\n"}

Version-Release number of selected component (if applicable):
ceph-ansible-3.1.5-1.el7cp.noarch

ceph version 12.2.5-42.el7cp (82d52d7efa6edec70f6a0fc306f40b89265535fb) luminous (stable)

How reproducible:


Steps to Reproduce:
1. Install ceph 3.1 using ceph-ansible
2. Ensure prereqs are met according to the doc: https://docs.google.com/document/d/1pV6BafagwoxTFgmi3UHcgqt5luH9X7tmZIogi1j4fXE
3. Run playbook: switch-from-non-containerized-to-containerized-ceph-daemons.yml

Actual results:
Failure due to the fatal message above.

Expected results:
Cluster successfully converted to containerized daemons.

Additional info:

Comment 3 Noah Watkins 2018-10-03 20:55:31 UTC
The image tag looks to be non-quoted, so the error is likely caused by a python runtime error not expecting a numeric value (e.g. 3.1)

2018-10-03 10:45:31,360 - test_switch_to_containerized - INFO - gvar: {'ceph_docker_image': 'rhceph/rhceph-3-rhel7', 'ceph_docker_image_tag': 3.1, 'ceph_docker_registry': 'registry.access.redhat.com'}

Comment 4 Noah Watkins 2018-10-03 22:02:02 UTC
https://github.com/ceph/ceph-ansible/pull/3191

Comment 5 Coady LaCroix 2018-10-03 23:29:49 UTC
Quoting the ceph_docker_image_tag value seems to have worked. After changing 3.1 to '3.1' the playbook executes successfully. I think converting the tag value to a string before searching is a good idea.

Comment 6 Noah Watkins 2018-10-03 23:40:38 UTC
I'll leave that PR up; I think it's generally useful to convert to a string too.

Comment 8 Vasu Kulkarni 2018-10-09 17:44:30 UTC
This we have to fix sooner and looks like the fix is already available in github?
the playbook was blocker during 3.1 for OSP folks.

Comment 9 Noah Watkins 2018-10-09 17:54:16 UTC
Yes, this fix is here https://github.com/ceph/ceph-ansible/pull/3191 and I think it will merge and get backported as soon as the QA run finishes which started an hour ago.

Comment 10 Noah Watkins 2018-10-10 17:32:31 UTC
This is merged upstream

Comment 11 Sébastien Han 2018-10-10 18:42:32 UTC
Present in https://github.com/ceph/ceph-ansible/releases/tag/v3.2.0beta4

Comment 17 errata-xmlrpc 2019-01-03 19:02:01 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/RHBA-2019:0020


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