Bug 1808495

Summary: ceph-ansible sets expected_num_objects unexpectedly when creating pools
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Guillaume Abrioux <gabrioux>
Component: Ceph-AnsibleAssignee: Guillaume Abrioux <gabrioux>
Status: CLOSED ERRATA QA Contact: Vasishta <vashastr>
Severity: high Docs Contact:
Priority: high    
Version: 4.0CC: aschoen, ceph-eng-bugs, ceph-qe-bugs, fpantano, gmeno, hyelloji, johfulto, nthomas, tserlin, ykaul
Target Milestone: rcFlags: hyelloji: needinfo-
Target Release: 4.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-ansible-4.0.16-1.el8, ceph-ansible-4.0.16-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-19 17:32:46 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 2020-02-28 16:14:29 UTC
Description of problem:

ceph-ansible sets expected_num_objects unexpectedly when creating pools


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


How reproducible:
100%

Steps to Reproduce:
- Deploy a ceph cluster and ask ceph-ansible to create openstack pool(s) (or cephfs pool)


Actual results:
The command executed is as the following one:

ceph --cluster ceph osd pool create volumes 32 32 replicated_rule 1

which is incorrect.

Expected results:

ceph-ansible to create osd pool using the right syntax as documented [1]

[1] https://docs.ceph.com/docs/nautilus/rados/operations/pools/#create-a-pool

From the documentation, the osd pool creation command is :

```
ceph osd pool create {pool-name} {pg-num} [{pgp-num}] [replicated] \
     [crush-rule-name] [expected-num-objects]
ceph osd pool create {pool-name} {pg-num}  {pgp-num}   erasure \
     [erasure-code-profile] [crush-rule-name] [expected_num_objects]
```

it means we pass '1' (from item.type) as value for
`expected_num_objects` by default which is very likely not what we want.

Comment 6 Vasishta 2020-04-28 12:23:58 UTC
Working fine for cephfs pool with 
ceph-ansible-4.0.22-1.el7cp.noarch

Comment 8 errata-xmlrpc 2020-05-19 17:32: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, 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-2020:2231