Bug 1600942 - [cee/sd][doc] document changes in syntax in clients.yml between ceph-asible version 2.2.x and 3.0.x
Summary: [cee/sd][doc] document changes in syntax in clients.yml between ceph-asible v...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Documentation
Version: 3.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: z1
: 3.2
Assignee: Aron Gunn
QA Contact: ceph-qe-bugs
Erin Donnelly
URL:
Whiteboard:
Depends On:
Blocks: 1668330
TreeView+ depends on / blocked
 
Reported: 2018-07-13 12:48 UTC by Tomas Petr
Modified: 2021-09-09 15:02 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-26 06:55:27 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHCEPH-1635 0 None None None 2021-09-09 15:02:49 UTC

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:


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