From f517b14cff8ba64e936b6999f184721873753c34 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Mon, 27 Feb 2017 12:44:29 -0600 Subject: [PATCH] Move ceph client role to playbooks for faster run time The change will limit the hosts the ceph client role is executed against by checking the ceph conditionals before simply executing the role. This will help general run times especially on large scale clouds. Change-Id: Ic7130368c5a2bb231c35bb459a2bebaa28a5a968 Signed-off-by: Kevin Carter --- playbooks/os-cinder-install.yml | 3 +++ playbooks/os-glance-install.yml | 9 ++++++--- playbooks/os-gnocchi-install.yml | 3 +++ playbooks/os-nova-install.yml | 4 ++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/playbooks/os-cinder-install.yml b/playbooks/os-cinder-install.yml index b5da67e7dd..8b158246d5 100644 --- a/playbooks/os-cinder-install.yml +++ b/playbooks/os-cinder-install.yml @@ -103,6 +103,9 @@ - role: "ceph_client" openstack_service_system_user: "{{ cinder_system_user_name }}" openstack_service_venv_bin: "{{ cinder_bin }}" + when: + - inventory_hostname in groups['cinder_volume'] + - cinder_backend_rbd_inuse | default(false) | bool tags: - ceph - role: "rsyslog_client" diff --git a/playbooks/os-glance-install.yml b/playbooks/os-glance-install.yml index 678969d50b..6a3a6476f2 100644 --- a/playbooks/os-glance-install.yml +++ b/playbooks/os-glance-install.yml @@ -70,14 +70,17 @@ - include: common-tasks/package-cache-proxy.yml roles: - role: "os_glance" - - role: "openstack_openrc" - tags: - - openrc - role: "ceph_client" openstack_service_system_user: "{{ glance_system_user_name }}" openstack_service_venv_bin: "{{ glance_bin }}" + when: + - inventory_hostname in groups['glance_api'] + - (glance_default_store | default('none') | lower == 'rbd') tags: - ceph + - role: "openstack_openrc" + tags: + - openrc - role: "rsyslog_client" rsyslog_client_log_rotate_file: glance_log_rotate rsyslog_client_log_dir: "/var/log/glance" diff --git a/playbooks/os-gnocchi-install.yml b/playbooks/os-gnocchi-install.yml index 010eaa7503..9c48186d09 100644 --- a/playbooks/os-gnocchi-install.yml +++ b/playbooks/os-gnocchi-install.yml @@ -46,6 +46,9 @@ - role: "ceph_client" openstack_service_system_user: "{{ gnocchi_system_user_name }}" openstack_service_venv_bin: "" + when: + - inventory_hostname in groups['gnocchi_api'] + - (gnocchi_storage_driver | default('none') | lower == 'ceph') tags: - ceph - role: "os_gnocchi" diff --git a/playbooks/os-nova-install.yml b/playbooks/os-nova-install.yml index 7f59da439d..63e90e0dff 100644 --- a/playbooks/os-nova-install.yml +++ b/playbooks/os-nova-install.yml @@ -147,6 +147,10 @@ - role: "ceph_client" openstack_service_system_user: "{{ nova_system_user_name }}" openstack_service_venv_bin: "{{ nova_bin }}" + when: + - inventory_hostname in groups['nova_compute'] + - nova_libvirt_images_rbd_pool is defined or + cinder_backends_rbd_inuse | default(false) | bool tags: - ceph - role: "openstack_openrc"