Bug 1486062 - add support for condition like ceph_release_num
Summary: add support for condition like ceph_release_num
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Ceph-Ansible
Version: 3.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: 3.0
Assignee: Guillaume Abrioux
QA Contact: ceph-qe-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-28 21:28 UTC by seb
Modified: 2017-12-05 23:41 UTC (History)
15 users (show)

Fixed In Version: RHEL: ceph-ansible-3.0.0-0.1.rc17 Ubuntu: ceph-ansible-3.0.0~rc17-2redhat1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-05 23:41:09 UTC
Embargoed:


Attachments (Terms of Use)
File contains contents ansible-playbook log (627.14 KB, text/plain)
2017-09-14 11:48 UTC, Vasishta
no flags Details
ceph-ansible playbook log (19.58 KB, text/plain)
2017-09-27 08:48 UTC, Madhavi Kasturi
no flags Details
File contains ansible-playbook log and contents of all.yml (766.03 KB, text/plain)
2017-09-28 12:07 UTC, Vasishta
no flags Details
File contains contents ansible-playbook log (1.98 MB, text/plain)
2017-10-03 11:49 UTC, Vasishta
no flags Details
rolling update log (46.61 KB, text/plain)
2017-10-05 11:08 UTC, Parikshith
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github ceph ceph-ansible pull 1822 0 None closed ceph-docker-common: detect ceph version 2021-02-03 08:00:14 UTC
Github ceph ceph-ansible pull 1960 0 None closed site: fix condition 2021-02-03 08:00:14 UTC
Github ceph ceph-ansible pull 1961 0 None closed [skip ci] site: s/ceph_stable_release/ceph_release 2021-02-03 08:00:14 UTC
Github ceph ceph-ansible pull 1975 0 None closed site: always play ceph-defaults and ceph-docker-common 2021-02-03 08:00:14 UTC
Github ceph ceph-ansible pull 1999 0 None closed common: remove unusuable conditions 2021-02-03 08:00:14 UTC
Red Hat Product Errata RHBA-2017:3387 0 normal SHIPPED_LIVE Red Hat Ceph Storage 3.0 bug fix and enhancement update 2017-12-06 03:03:45 UTC

Description seb 2017-08-28 21:28:16 UTC
Description of problem:

Encountered in https://bugzilla.redhat.com/show_bug.cgi?id=1482061

TASK [ceph-docker-common : register rbd bootstrap key] ************************************************************************************************************************************************************

fatal: [magna005]: FAILED! => {"failed": true, "msg": "The conditional check 'ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous' failed. The error was: error while evaluating conditional (ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous): 'dict object' has no attribute 'dummy'\n\nThe error appears to have been in '/home/ubuntu/ceph-ansible/roles/ceph-docker-common/tasks/fetch_configs.yml': line 2, 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: register rbd bootstrap key\n  ^ here\n"}

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 5 Vasishta 2017-09-14 11:48:49 UTC
Created attachment 1325942 [details]
File contains contents ansible-playbook log

Hi Sebastien,

I faced similar issue while configuring mgrs. 


TASK [ceph-defaults : set_fact] 

 [WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: ceph_release_num.{{ ceph_stable_release }} > ceph_release_num.jewel


We are setting ceph_stable_release to 'luminous' by default to avoid these issues. Is that okay ? Please let us know if these errors will be handled from ceph-ansible's end or do we need this to be added in Doc.


Redgards,
Vasishta

Comment 6 Vasishta 2017-09-14 11:50:33 UTC
Appropriate log snippet (obsoletes the one mentioned in Comment 5)

fatal: [magna012]: FAILED! => {"failed": true, "msg": "The conditional check 'ceph_release_num.{{ ceph_stable_release }} > ceph_release_num.jewel' failed. The error was: error while evaluating conditional (ceph_release_num.{{ ceph_stable_release }} > ceph_release_num.jewel): 'dict object' has no attribute 'dummy'\n\nThe error appears to have been in '/usr/share/ceph-ansible/roles/ceph-defaults/tasks/facts.yml': line 2, 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- set_fact:\n  ^ here\n"}

Comment 8 Vasishta 2017-09-19 16:34:51 UTC
Hi, 

Based on Comment 5 and Comment 6, moving back to ASSIGNED state

Regards,
Vasishta

Comment 9 Guillaume Abrioux 2017-09-21 13:02:05 UTC
Vasishta,

could you provide the value you set for the variable 'ceph_repository' while encountering the issue you mentioned in c6 ?

Comment 10 Vasishta 2017-09-22 06:11:28 UTC
Hi Guillaume,

I had kept it unchanged,

$ cat group_vars/all.yml | egrep -v ^# | grep -v ^$ |grep ceph_repository
ceph_repository: rhcs


Regards,
Vasishta

Comment 11 Sébastien Han 2017-09-26 22:10:23 UTC
Do you mind testing with the last rc version available? We are not able to reproduce this. Once you can reproduce again, please send the complete output of the play.
Thanks.

Comment 12 Madhavi Kasturi 2017-09-27 08:48:47 UTC
Created attachment 1331342 [details]
ceph-ansible playbook log

Comment 13 Madhavi Kasturi 2017-09-27 09:01:59 UTC
Hi Leseb,

Seeing the issue with latest rc version on Ubuntu node

ceph-ansible version: 3.0.0~rc11-2redhat1 
Ubuntu : 16.04

all.yml file:
ubuntu@magna003:/usr/share/ceph-ansible$ cat group_vars/all.yml | egrep -v ^# | grep -v ^$
---
dummy:
fetch_directory: ~/ceph-ansible-keys
ceph_origin: repository
ceph_repository: rhcs
generate_fsid: true
monitor_interface: eth0
public_network: 10.8.128.0/21


playbook snippet:
TASK [ceph-common : install red hat storage ceph-fuse client for debian] *******
skipping: [magna003.ceph.redhat.com]

TASK [ceph-common : install red hat storage ceph-common for debian] ************
skipping: [magna003.ceph.redhat.com]

TASK [ceph-common : install red hat storage nfs gateway for debian] ************
skipping: [magna003.ceph.redhat.com]

TASK [ceph-common : install red hat storage nfs file gateway] ******************
skipping: [magna003.ceph.redhat.com]

TASK [ceph-common : install red hat storage nfs obj gateway] *******************
skipping: [magna003.ceph.redhat.com]

TASK [ceph-common : install ceph mgr for debian] *******************************
 [WARNING]: when statements should not include jinja2 templating delimiters
such as {{ }} or {% %}. Found: ceph_release_num.{{ ceph_release }} >
ceph_release_num.jewel

fatal: [magna003.ceph.redhat.com]: FAILED! => {"failed": true, "msg": "The conditional check 'ceph_release_num.{{ ceph_release }} > ceph_release_num.jewel' failed. The error was: error while evaluating conditional (ceph_release_num.{{ ceph_release }} > ceph_release_num.jewel): 'dict object' has no attribute 'dummy'\n\nThe error appears to have been in '/usr/share/ceph-ansible/roles/ceph-common/tasks/installs/install_debian_rhcs_packages.yml': line 74, 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: install ceph mgr for debian\n  ^ here\n"}

PLAY RECAP *********************************************************************
magna003.ceph.redhat.com   : ok=27   changed=1    unreachable=0    failed=1   
magna030.ceph.redhat.com   : ok=2    changed=0    unreachable=0    failed=0   
magna056.ceph.redhat.com   : ok=2    changed=0    unreachable=0    failed=0   
magna084.ceph.redhat.com   : ok=2    changed=0    unreachable=0    failed=0   
magna092.ceph.redhat.com   : ok=2    changed=0    unreachable=0    failed=0   

ubuntu@magna003:/usr/share/ceph-ansible$

Comment 14 Vasishta 2017-09-28 12:07:05 UTC
Created attachment 1331938 [details]
File contains ansible-playbook log and contents of all.yml

Hi Sebastien, 

Today I faced similar issue in containerized scenario. 
Task - ceph-defaults : set_fact monitor_name ansible_hostname

Regards,
Vasishta

Comment 15 Sébastien Han 2017-09-28 23:51:13 UTC
Fixed, will be in rc13.

Comment 19 Vasishta 2017-10-03 11:49:35 UTC
Created attachment 1333611 [details]
File contains contents ansible-playbook log

Hi Guillaume,

Fix is working fine for configuration of mgrs, Thanks.

I faced similar issue while configuring nfs, in task ceph-defaults : set_fact monitor_name ansible_hostname. Out of curiosity, I tried the fix in PR 1961 and changed the contents in site-docker.yml, but I faced same issue in task ceph-defaults : generate cluster fsid.

Moving BZ back to ASSIGNED state, please let me know if there are any concerns.

Regards,
Vasishta

Comment 20 Sébastien Han 2017-10-03 13:24:08 UTC
Could you please test with https://github.com/ceph/ceph-ansible/pull/1975 ?

Thanks

Comment 21 Vasishta 2017-10-03 16:00:14 UTC
Hi Sebastien, 

I tried using nfs-site branch, working fine for me.

Regards,
Vasishta

Comment 22 Sébastien Han 2017-10-03 16:45:08 UTC
Thanks! This will be in rc15.

Comment 26 Parikshith 2017-10-05 11:08:19 UTC
Created attachment 1334751 [details]
rolling update log

Comment 28 Sébastien Han 2017-10-05 11:37:38 UTC
Please don't send fragments of the play but the entire one.
By looking at your log I don't know at which stage you're at.

Can you provide more info please?
Thanks.

Comment 29 Guillaume Abrioux 2017-10-05 13:02:11 UTC
fixed upstream here : https://github.com/ceph/ceph-ansible/commit/8fb68297a2b456f626655919ff7ba347e6bc4a36

will be in rc17

Comment 33 Vasishta 2017-10-11 07:49:25 UTC
Working fine for me.
Checked with Madhavi (mkasturi) and Parikshith and Got to know that this is working fine.

Moving to VERIFIED state.

Comment 36 errata-xmlrpc 2017-12-05 23:41:09 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-2017:3387


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