Bug 1400967 - [ceph-ansible] ceph-ansible failing to check raw journal devices
Summary: [ceph-ansible] ceph-ansible failing to check raw journal devices
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Storage Console
Classification: Red Hat Storage
Component: ceph-ansible
Version: 2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: 2
Assignee: Sébastien Han
QA Contact: ceph-qe-bugs
URL:
Whiteboard:
: 1405370 (view as bug list)
Depends On: 1405630
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-02 13:04 UTC by Vimal Kumar
Modified: 2020-04-15 14:56 UTC (History)
13 users (show)

Fixed In Version: ceph-ansible-2.1.1-1.el7scon
Doc Type: Bug Fix
Doc Text:
Previously, installation using the ceph-ansible utility failed on the "fix partitions gpt header or labels of the journal devices" task in the ceph-osd role because of an empty variable. The underlying source code has been modified, and the installation no longer fails in this case.
Clone Of:
Environment:
Last Closed: 2017-03-14 15:51:25 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2905941 0 None None None 2017-02-16 15:28:08 UTC
Red Hat Product Errata RHSA-2017:0515 0 normal SHIPPED_LIVE Important: ansible and ceph-ansible security, bug fix, and enhancement update 2017-04-18 21:12:31 UTC

Description Vimal Kumar 2016-12-02 13:04:08 UTC
a) Description of problem:

An installation using ceph-ansible failed on the section "fix partitions gpt header or labels of the journal devices" task in ceph-osd role. 

The error should look something like “failed to evaluate raw_multi_journal and item.0.rc != 0 conditional”. 

A few variables definitions from group_vars/osds looks like the following:

~~~
devices:
  - /dev/sdb
  - /dev/sdc
  - /dev/sdd
  - /dev/sde
  - /dev/sdf
  - /dev/sdh
  - /dev/sdi
  - /dev/sdj
  - /dev/sdk
  - /dev/sdl
  - /dev/sdn
  - /dev/sdo
  - /dev/sdp
  - /dev/sdq
  - /dev/sdr

raw_multi_journal: true
raw_journal_devices:
  - /dev/sda
  - /dev/sda
  - /dev/sda
  - /dev/sda
  - /dev/sda
  - /dev/sdg
  - /dev/sdg
  - /dev/sdg
  - /dev/sdg
  - /dev/sdg
  - /dev/sdm
  - /dev/sdm
  - /dev/sdm
  - /dev/sdm
  - /dev/sdm
~~~

To fix this, the following patch was applied by the customer to get the playbook run properly.

~~~
# git diff HEAD^1
diff --git a/roles/ceph-osd/tasks/check_devices.yml b/roles/ceph-osd/tasks/check_devices.yml
index c916ff4..14a9898 100644
--- a/roles/ceph-osd/tasks/check_devices.yml
+++ b/roles/ceph-osd/tasks/check_devices.yml
@@ -108,7 +108,7 @@
   shell: "sgdisk --zap-all --clear --mbrtogpt -g -- {{ item.1 }} || sgdisk --zap-all --clear --mbrtogpt -g -- {{ item.1 }}"
   with_together:
     - journal_partition_status.results
-    - raw_journal_devices
+    - "{{ raw_journal_devices|default([])|unique }}"
   changed_when: false
   when:
     raw_multi_journal and
~~~

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

RHCS2.0

c) How reproducible:

Always

d) Additional info

This has been fixed by https://github.com/ceph/ceph-ansible/blob/master/roles/ceph-osd/defaults/main.yml#L129.

Comment 3 seb 2016-12-02 17:00:18 UTC
If the target release is 3 then you will get the fix during the next sync between upsteam and downstream.

Comment 6 Alfredo Deza 2017-01-12 13:01:15 UTC
*** Bug 1405370 has been marked as a duplicate of this bug. ***

Comment 9 Tejas 2017-02-06 07:46:07 UTC
This bug has been Fixed as part of ceph-ansible version:
ceph-ansible-2.1.6-1.el7scon.noarch

When this ships customers can use this build.
Moving to Verified.

Comment 11 errata-xmlrpc 2017-03-14 15:51:25 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-2017:0515


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