Bug 1447013

Summary: Invalid condition in 'copy osd restart script' handler task (ceph-ansible)
Product: [Red Hat Storage] Red Hat Storage Console Reporter: Guillaume Abrioux <gabrioux>
Component: ceph-ansibleAssignee: Guillaume Abrioux <gabrioux>
Status: CLOSED ERRATA QA Contact: Vasishta <vashastr>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2CC: adeza, aschoen, ceph-eng-bugs, gmeno, hnallurv, kdreyer, nthomas, sankarshan, vashastr
Target Milestone: ---   
Target Release: 2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-ansible-2.2.4-1.el7scon Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-19 13:17:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Guillaume Abrioux 2017-05-01 06:47:17 UTC
Description of problem:

ceph-ansible fails when the osd handler is triggered.

RUNNING HANDLER [ceph.ceph-common : copy osd restart script] *******************
fatal: [osd0]: FAILED! => {
    "failed": true
}

MSG:

The conditional check 'item in play_hosts' failed. The error was: error while evaluating conditional (item in play_hosts): 'item' is undefined

The error appears to have been in '/opt/guits/ceph-ansible/roles/ceph-common/handlers/main.yml': line 31, column 5, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- block:
  - name: copy osd restart script
    ^ here


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


How reproducible:

It happens when a parameter that has been modified in group_vars/* results with a change in ceph.con so handlers are triggered. (Handlers are not triggered during the initial deployment).

Steps to Reproduce:
1. Deploy a new cluster
2. Change a parameter in group_vars/osds (a parameter that makes a change in ceph.conf)
3. Launch ceph-ansible again.

Actual results:

The installer will fail when handlers are triggered.

Expected results:

The install doesn't fail, it updates the ceph configuration and restarts properly the ceph cluster.

Comment 3 Guillaume Abrioux 2017-05-01 06:51:16 UTC
- Fixed by https://github.com/ceph/ceph-ansible/commit/d8387cf82c647b85d51d5c28bd3a2c37f02ebd84

- Merged in master.
- Backported in stable-2.2
- New tag v2.2.3

Comment 6 Christina Meno 2017-05-02 16:57:52 UTC
Vasishta,

Would you please set qa_ack + so that we may attach the build containing the fix?

Comment 7 Ken Dreyer (Red Hat) 2017-05-05 02:12:12 UTC
Unfortunately "v2.2.3" was tagged on the master branch, rather than the stable-2.2 branch.

I suggest we delete the v2.2.3 tag upstream and recreate it on the stable branch at commit 2eb098ea5f0106f48f2dceca157ce6f5e4cda8b5. Guillaume and Andrew, are you ok with this plan?

To move this bug forward I've pushed a new tag (v2.2.4) for the tip of stable-2.2 today and we'll ship that here.

Comment 10 Andrew Schoen 2017-05-05 14:13:36 UTC
(In reply to Ken Dreyer (Red Hat) from comment #7)
> Unfortunately "v2.2.3" was tagged on the master branch, rather than the
> stable-2.2 branch.
> 
> I suggest we delete the v2.2.3 tag upstream and recreate it on the stable
> branch at commit 2eb098ea5f0106f48f2dceca157ce6f5e4cda8b5. Guillaume and
> Andrew, are you ok with this plan?
> 
> To move this bug forward I've pushed a new tag (v2.2.4) for the tip of
> stable-2.2 today and we'll ship that here.

Sounds good to me. I've done this and the new v2.2.3 tag is pushed.

https://github.com/ceph/ceph-ansible/tree/v2.2.3

Comment 11 Ken Dreyer (Red Hat) 2017-05-05 14:39:52 UTC
Thanks!

Comment 12 Vasishta 2017-05-22 13:10:38 UTC
Hi, 

Tried changing journal size on second run. It caused change in conf file and ceph-ansible didn't fail when the osd handler is triggered.

RUNNING HANDLER [ceph.ceph-common : restart ceph osds daemon(s)] ***************
changed: [magna068]
------------------------------
RUNNING HANDLER [ceph.ceph-common : copy osd restart script] *******************
changed: [magna071]
changed: [magna106]

RUNNING HANDLER [ceph.ceph-common : restart ceph osds daemon(s)] ***************
changed: [magna071]
changed: [magna106]

Moving this BZ to VERIFIED state. 

Regards,
Vasishta

Comment 14 errata-xmlrpc 2017-06-19 13:17:29 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:1496