Bug 1533097

Summary: CephPools parameter does not add CephX permission for openstack user
Product: Red Hat OpenStack Reporter: Gregory Charot <gcharot>
Component: openstack-tripleo-heat-templatesAssignee: Giulio Fidente <gfidente>
Status: CLOSED ERRATA QA Contact: Yogev Rabl <yrabl>
Severity: low Docs Contact:
Priority: medium    
Version: 12.0 (Pike)CC: gfidente, jomurphy, jschluet, mburns, rhel-osp-director-maint
Target Milestone: z2Keywords: Triaged, ZStream
Target Release: 12.0 (Pike)   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-7.0.9-1.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-28 17:16:42 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 Gregory Charot 2018-01-10 13:14:45 UTC
Description of problem:

CephPools parameter can be used to create additional Ceph Pools via tripleO

  CephPools:
    - name: tier2
      pg_num: 64

Pool's creation works fine but the openstack's user Ceph key is not updated therefore it is not usable by openstack unless an operator add the caps manually on the ceph cluster.

One could say this is a feature request, i would say that if a user uses director to deploy Ceph and create an extra pool it much likely means he plans on using it with openstack (new cinder backend, etc).

If for any reason this BZ is declined, please update the doc[1] to mention that users need to update ceph key caps manually.


https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/12/html-single/deploying_an_overcloud_with_containerized_red_hat_ceph/#custom-ceph-pools

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

12

How reproducible:

Always

Steps to Reproduce:
1. 
  CephPools:
    - name: tier2
      pg_num: 64
2. Deploy 
3. 

Actual results:
ceph auth get  client.openstack
exported keyring for client.openstack
[client.openstack]
        key = AQC79lNaAAAAABAAxYvFr+ENT0vI79fCoyquHg==
        caps mon = "allow r"
        caps osd = "allow rwx pool=volumes, allow rwx pool=backups, allow rwx pool=vms, allow rwx pool=images, allow rwx pool=metrics

Expected results:

ceph auth get  client.openstack
exported keyring for client.openstack
[client.openstack]
        key = AQC79lNaAAAAABAAxYvFr+ENT0vI79fCoyquHg==
        caps mon = "allow r"
        caps osd = "allow rwx pool=volumes, allow rwx pool=backups, allow rwx pool=vms, allow rwx pool=images, allow rwx pool=metrics, allow rwx pool=tier2"

Additional info:


the custom pool(s) are included as part of openstack_pools but not as part of the openstack_keys.

          openstack_pools:
            list_concat_unique:
              - repeat:
                  template:
                    name: <%pool%>
                    pg_num: {get_param: CephPoolDefaultPgNum}
                    rule_name: ""
                  for_each:
                    <%pool%>:
                      - {get_param: CinderRbdPoolName}
                      - {get_param: CinderBackupRbdPoolName}
                      - {get_param: NovaRbdPoolName}
                      - {get_param: GlanceRbdPoolName}
                      - {get_param: GnocchiRbdPoolName}
              - {get_param: CephPools} # <- HERE

          openstack_keys: &openstack_keys
          - name:
              list_join:
              - '.'
              - - client
                - {get_param: CephClientUserName}
            key: {get_param: CephClientKey}
            mon_cap: "allow r"
            osd_cap:
              str_replace:
               template: "allow class-read object_prefix rbd_children, allow rwx pool=CINDER_POOL, allow rwx pool=CINDERBACKUP_POOL, allow rwx pool=NOVA_POOL, allow rwx pool=GLANCE_POOL, allow rwx pool=GNOCCHI_POOL"   # <- NO CephPools inclusion
               params:
                 NOVA_POOL: {get_param: NovaRbdPoolName}
                 CINDER_POOL: {get_param: CinderRbdPoolName}
                 CINDERBACKUP_POOL: {get_param: CinderBackupRbdPoolName}
                 GLANCE_POOL: {get_param: GlanceRbdPoolName}
                 GNOCCHI_POOL: {get_param: GnocchiRbdPoolName}
            mode: "0644"

Comment 4 Yogev Rabl 2018-03-14 17:43:13 UTC
verified

Comment 7 errata-xmlrpc 2018-03-28 17:16:42 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-2018:0602