Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
This project is now read‑only. Starting Monday, February 2, please use https://ibm-ceph.atlassian.net/ for all bug tracking management.

Bug 1600942

Summary: [cee/sd][doc] document changes in syntax in clients.yml between ceph-asible version 2.2.x and 3.0.x
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Tomas Petr <tpetr>
Component: DocumentationAssignee: Aron Gunn <agunn>
Status: CLOSED CURRENTRELEASE QA Contact: ceph-qe-bugs <ceph-qe-bugs>
Severity: high Docs Contact: Erin Donnelly <edonnell>
Priority: high    
Version: 3.0CC: agunn, asriram, kdreyer, khartsoe, tchandra, tpetr, vashastr, ymane
Target Milestone: z1   
Target Release: 3.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-26 06:55:27 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:
Bug Depends On:    
Bug Blocks: 1668330    

Description Tomas Petr 2018-07-13 12:48:23 UTC
Description of problem:
In ceph-ansible version 2.2.x clients.yml had different syntax for adding client.name keys from syntax used in ceph-ansible version 3.0.x:

- ceph-ansible version 2.2.x
https://github.com/ceph/ceph-ansible/blob/v2.2.11/group_vars/clients.yml.sample
#keys:
#  - { name: client.test, value: "mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=test'" }
# - { name: client.test2, value: "mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=test2'" }

 ceph-ansible version 3.0.x (last shipped 3.0.39) :
https://github.com/ceph/ceph-ansible/blob/v3.0.39/group_vars/clients.yml.sample
#keys:
#  - { name: client.test, key: "ADD-KEYRING-HERE==", mon_cap: "allow r", osd_cap: "allow class-read object_prefix rbd_children, allow rwx pool=test", mode: "0600", acls: [] }
#  - { name: client.test2, key: "ADD-KEYRING-HERE==", mon_cap: "allow r", osd_cap: "allow class-read object_prefix rbd_children, allow rwx pool=test2", mode: "0600", acls: [] }

This should be documented to prevent the ansible-playbook fail with:
 {"msg": "The conditional check 'item.key == 'ADD-KEYRING-HERE=='' failed. The error was: error while evaluating conditional (item.key == 'ADD-KEYRING-HERE=='): 'dict object' has no attribute 'key'\n\nThe error appears to have been in '/usr/share/ceph-ansible/roles/ceph-client/tasks/pre_requisite.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: check keys has been filled in users.key variables\n  ^ here\n"}


The documentation change should be like:
For an update [clients] from RHCS 2.x deployed and managed with ceph-ansible version 2.2.x, check before the update the syntax change in group_vars/clients.yml file against default group_vars/clients.yml.sample

# ceph auth get-or-create client.test
 - the output is a key for client.test, add it to the "ADD-KEYRING-HERE==" in group_vars/clients.yml file and change the syntax like following:
------------
keys:
  - { name: client.test, key: "ADD-KEYRING-HERE==",  mon_cap: "allow r", osd_cap: "allow class-read object_prefix rbd_children, allow rwx pool=test", mode: "0600", acls: [] }

NOTE:
clients.yml changes are not mentioned in [1] , because it is not name  change, but syntax change:

[1] - https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/3/html-single/installation_guide_for_red_hat_enterprise_linux/#changes-in-ansible-variables-between-version-2-and-3


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

How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info: