Remove the two different auth profiles

Ceph can function just fine generating the keys before the pools have
been created so we can apply the proper permissions to the auth string
ahead of time. This allows us to not require additional steps to add a
cache tier on the fly in the future.

Change-Id: I8214c567fb7c337f95d908c5699d1da922bfa1a6
Closes-Bug: #1518475
This commit is contained in:
Sam Yaple 2015-11-20 23:21:38 +00:00
parent dd16395ae1
commit 8c1e7061f8
3 changed files with 4 additions and 44 deletions

View File

@ -29,41 +29,21 @@
pool_type: "{{ cinder_backup_pool_type }}" pool_type: "{{ cinder_backup_pool_type }}"
cache_mode: "{{ cinder_backup_cache_mode }}" cache_mode: "{{ cinder_backup_cache_mode }}"
# TODO(SamYaple): Improve failed_when and changed_when tests # TODO(SamYaple): Improve changed_when tests
- name: Pulling cephx keyring for cinder
command: docker exec ceph_mon ceph auth get-or-create client.cinder mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool={{ ceph_cinder_pool_name }}, allow rwx pool={{ ceph_nova_pool_name }}, allow rx pool={{ ceph_glance_pool_name }}'
register: cephx_key_cinder
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
run_once: True
when: not ceph_enable_cache | bool
# TODO(SamYaple): Improve failed_when and changed_when tests
- name: Pulling cephx keyring for cinder - name: Pulling cephx keyring for cinder
command: docker exec ceph_mon ceph auth get-or-create client.cinder mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool={{ ceph_cinder_pool_name }}, allow rwx pool={{ ceph_cinder_pool_name }}-cache, allow rwx pool={{ ceph_nova_pool_name }}, allow rwx pool={{ ceph_nova_pool_name }}-cache, allow rx pool={{ ceph_glance_pool_name }}, allow rx pool={{ ceph_glance_pool_name }}-cache' command: docker exec ceph_mon ceph auth get-or-create client.cinder mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool={{ ceph_cinder_pool_name }}, allow rwx pool={{ ceph_cinder_pool_name }}-cache, allow rwx pool={{ ceph_nova_pool_name }}, allow rwx pool={{ ceph_nova_pool_name }}-cache, allow rx pool={{ ceph_glance_pool_name }}, allow rx pool={{ ceph_glance_pool_name }}-cache'
register: cephx_key_cinder register: cephx_key_cinder
delegate_to: "{{ groups['ceph-mon'][0] }}" delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False changed_when: False
run_once: True run_once: True
when: ceph_enable_cache | bool
# TODO(SamYaple): Improve failed_when and changed_when tests # TODO(SamYaple): Improve changed_when tests
- name: Pulling cephx keyring for cinder-backup
command: docker exec ceph_mon ceph auth get-or-create client.cinder-backup mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool={{ ceph_cinder_backup_pool_name }}'
register: cephx_key_cinder_backup
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
run_once: True
when: not ceph_enable_cache | bool
# TODO(SamYaple): Improve failed_when and changed_when tests
- name: Pulling cephx keyring for cinder-backup - name: Pulling cephx keyring for cinder-backup
command: docker exec ceph_mon ceph auth get-or-create client.cinder-backup mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool={{ ceph_cinder_backup_pool_name }}, allow rwx pool={{ ceph_cinder_backup_pool_name }}-cache' command: docker exec ceph_mon ceph auth get-or-create client.cinder-backup mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool={{ ceph_cinder_backup_pool_name }}, allow rwx pool={{ ceph_cinder_backup_pool_name }}-cache'
register: cephx_key_cinder_backup register: cephx_key_cinder_backup
delegate_to: "{{ groups['ceph-mon'][0] }}" delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False changed_when: False
run_once: True run_once: True
when: ceph_enable_cache | bool
- name: Pushing cephx keyring - name: Pushing cephx keyring
copy: copy:

View File

@ -17,23 +17,13 @@
pool_type: "{{ glance_pool_type }}" pool_type: "{{ glance_pool_type }}"
cache_mode: "{{ glance_cache_mode }}" cache_mode: "{{ glance_cache_mode }}"
# TODO(SamYaple): Improve failed_when and changed_when tests # TODO(SamYaple): Improve changed_when tests
- name: Pulling cephx keyring
command: docker exec ceph_mon ceph auth get-or-create client.glance mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool={{ ceph_glance_pool_name }}'
register: cephx_key
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
run_once: True
when: not ceph_enable_cache | bool
# TODO(SamYaple): Improve failed_when and changed_when tests
- name: Pulling cephx keyring - name: Pulling cephx keyring
command: docker exec ceph_mon ceph auth get-or-create client.glance mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool={{ ceph_glance_pool_name }}, allow rwx pool={{ ceph_glance_pool_name }}-cache' command: docker exec ceph_mon ceph auth get-or-create client.glance mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool={{ ceph_glance_pool_name }}, allow rwx pool={{ ceph_glance_pool_name }}-cache'
register: cephx_key register: cephx_key
delegate_to: "{{ groups['ceph-mon'][0] }}" delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False changed_when: False
run_once: True run_once: True
when: ceph_enable_cache | bool
- name: Pushing cephx keyring - name: Pushing cephx keyring
copy: copy:

View File

@ -23,23 +23,13 @@
pool_type: "{{ nova_pool_type }}" pool_type: "{{ nova_pool_type }}"
cache_mode: "{{ nova_cache_mode }}" cache_mode: "{{ nova_cache_mode }}"
# TODO(SamYaple): Improve failed_when and changed_when tests # TODO(SamYaple): Improve changed_when tests
- name: Pulling cephx keyring for nova
command: docker exec ceph_mon ceph auth get-or-create client.nova mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool={{ ceph_cinder_pool_name }}, allow rwx pool={{ ceph_nova_pool_name }}, allow rx pool={{ ceph_glance_pool_name }}'
register: cephx_key
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
run_once: True
when: not ceph_enable_cache | bool
# TODO(SamYaple): Improve failed_when and changed_when tests
- name: Pulling cephx keyring for nova - name: Pulling cephx keyring for nova
command: docker exec ceph_mon ceph auth get-or-create client.nova mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool={{ ceph_cinder_pool_name }}, allow rwx pool={{ ceph_cinder_pool_name }}-cache, allow rwx pool={{ ceph_nova_pool_name }}, allow rwx pool={{ ceph_nova_pool_name }}-cache, allow rx pool={{ ceph_glance_pool_name }}, allow rx pool={{ ceph_glance_pool_name }}-cache' command: docker exec ceph_mon ceph auth get-or-create client.nova mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool={{ ceph_cinder_pool_name }}, allow rwx pool={{ ceph_cinder_pool_name }}-cache, allow rwx pool={{ ceph_nova_pool_name }}, allow rwx pool={{ ceph_nova_pool_name }}-cache, allow rx pool={{ ceph_glance_pool_name }}, allow rx pool={{ ceph_glance_pool_name }}-cache'
register: cephx_key register: cephx_key
delegate_to: "{{ groups['ceph-mon'][0] }}" delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False changed_when: False
run_once: True run_once: True
when: ceph_enable_cache | bool
# TODO(SamYaple): Improve failed_when and changed_when tests # TODO(SamYaple): Improve failed_when and changed_when tests
- name: Pulling cephx keyring for libvirt - name: Pulling cephx keyring for libvirt