aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-09-29 10:20:05 +0000
committerGerrit Code Review <review@openstack.org>2015-09-29 10:20:05 +0000
commit8f7006e32350bf290bc9188cd8cf3e4f9c34aea3 (patch)
tree34068d2bd2f666f87ffac0d5f1ae93bed11e5e34
parent713977166d4477107abce856adc089e2565e61a8 (diff)
parent5223965b6193757a5d63c7f5ccd466ce7953f6d7 (diff)
downloadkolla-8f7006e32350bf290bc9188cd8cf3e4f9c34aea3.tar.gz
kolla-8f7006e32350bf290bc9188cd8cf3e4f9c34aea3.zip
Merge "Fix ceph after config-external removal"
-rw-r--r--ansible/roles/ceph/tasks/bootstrap_osds.yml2
-rw-r--r--ansible/roles/ceph/tasks/generate_cluster.yml2
-rw-r--r--ansible/roles/ceph/tasks/start_mons.yml2
-rw-r--r--ansible/roles/ceph/tasks/start_osds.yml2
-rw-r--r--ansible/roles/ceph/templates/ceph-mon.json.j216
-rw-r--r--ansible/roles/ceph/templates/ceph-osd.json.j22
-rw-r--r--ansible/roles/cinder/tasks/ceph.yml8
-rw-r--r--ansible/roles/glance/tasks/ceph.yml4
-rw-r--r--ansible/roles/nova/tasks/ceph.yml6
-rw-r--r--docker/base/set_configs.py8
10 files changed, 27 insertions, 25 deletions
diff --git a/ansible/roles/ceph/tasks/bootstrap_osds.yml b/ansible/roles/ceph/tasks/bootstrap_osds.yml
index 59163f8d3..1909db27f 100644
--- a/ansible/roles/ceph/tasks/bootstrap_osds.yml
+++ b/ansible/roles/ceph/tasks/bootstrap_osds.yml
@@ -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:
diff --git a/ansible/roles/ceph/tasks/generate_cluster.yml b/ansible/roles/ceph/tasks/generate_cluster.yml
index 1a0f16b1b..5e4e7c560 100644
--- a/ansible/roles/ceph/tasks/generate_cluster.yml
+++ b/ansible/roles/ceph/tasks/generate_cluster.yml
@@ -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:
diff --git a/ansible/roles/ceph/tasks/start_mons.yml b/ansible/roles/ceph/tasks/start_mons.yml
index 0f70905b8..f8f06d84e 100644
--- a/ansible/roles/ceph/tasks/start_mons.yml
+++ b/ansible/roles/ceph/tasks/start_mons.yml
@@ -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:
diff --git a/ansible/roles/ceph/tasks/start_osds.yml b/ansible/roles/ceph/tasks/start_osds.yml
index 593ec7b15..f10c57526 100644
--- a/ansible/roles/ceph/tasks/start_osds.yml
+++ b/ansible/roles/ceph/tasks/start_osds.yml
@@ -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 }}"
diff --git a/ansible/roles/ceph/templates/ceph-mon.json.j2 b/ansible/roles/ceph/templates/ceph-mon.json.j2
index 0b6f2c772..0580261f9 100644
--- a/ansible/roles/ceph/templates/ceph-mon.json.j2
+++ b/ansible/roles/ceph/templates/ceph-mon.json.j2
@@ -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"
}
]
}
diff --git a/ansible/roles/ceph/templates/ceph-osd.json.j2 b/ansible/roles/ceph/templates/ceph-osd.json.j2
index 288ebc6ba..831d8085f 100644
--- a/ansible/roles/ceph/templates/ceph-osd.json.j2
+++ b/ansible/roles/ceph/templates/ceph-osd.json.j2
@@ -4,7 +4,7 @@
{
"source": "/opt/kolla/config_files/ceph.conf",
"dest": "/etc/ceph/ceph.conf",
- "owner": "glance",
+ "owner": "ceph",
"perm": "0600"
},
{
diff --git a/ansible/roles/cinder/tasks/ceph.yml b/ansible/roles/cinder/tasks/ceph.yml
index ac7fc75fb..927531883 100644
--- a/ansible/roles/cinder/tasks/ceph.yml
+++ b/ansible/roles/cinder/tasks/ceph.yml
@@ -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
diff --git a/ansible/roles/glance/tasks/ceph.yml b/ansible/roles/glance/tasks/ceph.yml
index 904bd3340..b1270eb8e 100644
--- a/ansible/roles/glance/tasks/ceph.yml
+++ b/ansible/roles/glance/tasks/ceph.yml
@@ -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
diff --git a/ansible/roles/nova/tasks/ceph.yml b/ansible/roles/nova/tasks/ceph.yml
index 4ab79ae34..b7dffcc57 100644
--- a/ansible/roles/nova/tasks/ceph.yml
+++ b/ansible/roles/nova/tasks/ceph.yml
@@ -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
diff --git a/docker/base/set_configs.py b/docker/base/set_configs.py
index 19415c6fc..941e74ca2 100644
--- a/docker/base/set_configs.py
+++ b/docker/base/set_configs.py
@@ -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):