Merge "Fix ceph after config-external removal"

This commit is contained in:
Jenkins 2015-09-29 10:20:05 +00:00 committed by Gerrit Code Review
commit 8f7006e323
10 changed files with 27 additions and 25 deletions

View File

@ -20,7 +20,7 @@
name: "bootstrap_osd_{{ item.0 }}"
image: "{{ ceph_osd_image_full }}"
volumes:
- "{{ node_config_directory }}/ceph-osd/:/opt/kolla/ceph-osd/:ro"
- "{{ node_config_directory }}/ceph-osd/:/opt/kolla/config_files/:ro"
- "/dev/:/dev/"
env:
KOLLA_BOOTSTRAP:

View File

@ -13,7 +13,7 @@
insecure_registry: "{{ docker_insecure_registry }}"
name: ceph_mon
image: "{{ ceph_mon_image_full }}"
volumes: "{{ node_config_directory }}/ceph-mon/:/opt/kolla/ceph-mon/:ro"
volumes: "{{ node_config_directory }}/ceph-mon/:/opt/kolla/config_files/:ro"
volumes_from:
- "ceph_mon_data"
env:

View File

@ -13,7 +13,7 @@
insecure_registry: "{{ docker_insecure_registry }}"
name: ceph_mon
image: "{{ ceph_mon_image_full }}"
volumes: "{{ node_config_directory }}/ceph-mon/:/opt/kolla/ceph-mon/:ro"
volumes: "{{ node_config_directory }}/ceph-mon/:/opt/kolla/config_files/:ro"
volumes_from:
- "ceph_mon_data"
env:

View File

@ -37,7 +37,7 @@
image: "{{ ceph_osd_image_full }}"
volumes:
- "/var/lib/ceph/osd/{{ item.1.fs_uuid }}:/var/lib/ceph/osd/ceph-{{ item.0.stdout }}"
- "{{ node_config_directory }}/ceph-osd/:/opt/kolla/ceph-osd/:ro"
- "{{ node_config_directory }}/ceph-osd/:/opt/kolla/config_files/:ro"
- "/dev/:/dev/"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"

View File

@ -4,29 +4,29 @@
{
"source": "/opt/kolla/config_files/ceph.conf",
"dest": "/etc/ceph/ceph.conf",
"owner": "glance",
"owner": "ceph",
"perm": "0600"
}
},
{
"source": "/opt/kolla/config_files/ceph.client.admin.keyring",
"dest": "/etc/ceph/ceph.client.admin.keyring",
"owner": "ceph",
"perm": "0600"
"optional": True
"perm": "0600",
"optional": "True"
},
{
"source": "/opt/kolla/config_files/ceph.client.mon.keyring",
"dest": "/etc/ceph/ceph.client.mon.keyring",
"owner": "ceph",
"perm": "0600"
"optional": True
"perm": "0600",
"optional": "True"
},
{
"source": "/opt/kolla/config_files/ceph.monmap",
"dest": "/etc/ceph/ceph.monmap",
"owner": "ceph",
"perm": "0600"
"optional": True
"perm": "0600",
"optional": "True"
}
]
}

View File

@ -4,7 +4,7 @@
{
"source": "/opt/kolla/config_files/ceph.conf",
"dest": "/etc/ceph/ceph.conf",
"owner": "glance",
"owner": "ceph",
"perm": "0600"
},
{

View File

@ -19,7 +19,7 @@
# TODO(SamYaple): Improve failed_when and changed_when tests
- name: Creating ceph pool for cinder
command: docker exec -it ceph_mon ceph osd pool create volumes 128
command: docker exec ceph_mon ceph osd pool create volumes 128
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
failed_when: False
@ -27,7 +27,7 @@
# TODO(SamYaple): Improve failed_when and changed_when tests
- name: Creating ceph pool for cinder-backup
command: docker exec -it ceph_mon ceph osd pool create backups 128
command: docker exec ceph_mon ceph osd pool create backups 128
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
failed_when: False
@ -35,7 +35,7 @@
# TODO(SamYaple): Improve failed_when and changed_when tests
- name: Pulling cephx keyring for cinder
command: docker exec -it ceph_mon ceph auth get-or-create client.cinder mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=volumes, allow rwx pool=vms, allow rx pool=images'
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=volumes, allow rwx pool=vms, allow rx pool=images'
register: cephx_key_cinder
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
@ -43,7 +43,7 @@
# TODO(SamYaple): Improve failed_when and changed_when tests
- name: Pulling cephx keyring for cinder-backup
command: docker exec -it ceph_mon ceph auth get-or-create client.cinder-backup mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=backups'
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=backups'
register: cephx_key_cinder_backup
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False

View File

@ -13,7 +13,7 @@
# TODO(SamYaple): Improve failed_when and changed_when tests
- name: Creating ceph pool for glance
command: docker exec -it ceph_mon ceph osd pool create images 128
command: docker exec ceph_mon ceph osd pool create images 128
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
failed_when: False
@ -21,7 +21,7 @@
# TODO(SamYaple): Improve failed_when and changed_when tests
- name: Pulling cephx keyring
command: docker exec -it ceph_mon ceph auth get-or-create client.glance mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=images'
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=images'
register: cephx_key
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False

View File

@ -19,7 +19,7 @@
# TODO(SamYaple): Improve failed_when and changed_when tests
- name: Creating ceph pool for vms
command: docker exec -it ceph_mon ceph osd pool create vms 128
command: docker exec ceph_mon ceph osd pool create vms 128
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
failed_when: False
@ -27,7 +27,7 @@
# TODO(SamYaple): Improve failed_when and changed_when tests
- name: Pulling cephx keyring for nova
command: docker exec -it ceph_mon ceph auth get-or-create client.nova mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=volumes, allow rwx pool=vms, allow rx pool=images'
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=volumes, allow rwx pool=vms, allow rx pool=images'
register: cephx_key
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
@ -35,7 +35,7 @@
# TODO(SamYaple): Improve failed_when and changed_when tests
- name: Pulling cephx keyring for libvirt
command: docker exec -it ceph_mon ceph auth get-key client.nova
command: docker exec ceph_mon ceph auth get-key client.nova
register: cephx_raw_key
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False

View File

@ -86,11 +86,13 @@ def copy_files(data):
else:
# Source is a directory
for src in os.listdir(source_path):
LOG.info('Copying {} to {}'.format(src, dest_path))
LOG.info('Copying {} to {}'.format(
os.path.join(source_path, src), dest_path))
if os.path.isdir(src):
shutil.copytree(src, dest_path)
shutil.copytree(os.path.join(source_path, src), dest_path)
else:
shutil.copy(src, dest_path)
shutil.copy(os.path.join(source_path, src), dest_path)
def set_permissions(data):