Remove ceph_client role execution from playbooks

The ceph_client role is now executed inside the nova, cinder, and
glance roles  as an include_role statement to avoid service restart
and library linking race conditions.

NOTE: This commit also includes I9f529082fd646e58a6365ec7994f2c87fc9dfb8e,
since a circular dependency exists between this patch and the setuptools
pin bump due to a bug in setuptools. The following is the commit message
of I9f529082fd646e58a6365ec7994f2c87fc9dfb8e in its entirety:
"Update setuptools to 36.2.0

Due to [1] the downgrade of setuptools is not
possible, so this patch is updating setuptools
to the current version as a stop-gap until a
fix is released.

[1] https://github.com/pypa/setuptools/issues/1086"

Also includes a backport of Ia1d02070be2d5ab89e5ef51d96773395516d0c8d,
which is a minor var optimization related to this work.

Some changes were made to the way cinder_backends_rbd_inuse is generated
from the master patch, since master no longer requires the var to be
available to the cinder role due to Ie1c549461cfd6799d7535fda673b8c3872afe4af.

In ocata that change did not take place yet so we need to keep that
var available to cinder.

Depends-On: Iea317a20d37ae6f187df3eb7db6290d6b99e6997
Depends-On: I1d24a82f22663150f0db5bbfcb4d957d600db5c2
Depends-On: I620552d7de367d89a99d1622a4e0c89e78336e86
Change-Id: I6a76e63881150677352520ce9658f1cf6b7e5456
(cherry picked from commit be1419dbdf)
This commit is contained in:
Logan V 2017-07-12 13:21:27 -05:00 committed by Jesse Pretorius
parent 65a9167e07
commit 504da781cc
10 changed files with 19 additions and 49 deletions

View File

@ -69,11 +69,11 @@
- name: os_cinder
scm: git
src: https://git.openstack.org/openstack/openstack-ansible-os_cinder
version: 324dbed4d807569dd2b4dafa394d09e471268776
version: 3e8a5bb467fbef16cc2ea3ac5217b4dd0a0e0a8c
- name: os_glance
scm: git
src: https://git.openstack.org/openstack/openstack-ansible-os_glance
version: efcf03d2c4c572ee81a6b7c78ca47eefebc199a9
version: 802c3dcad5b9f578fdac969e327bfece75509ef2
- name: os_gnocchi
scm: git
src: https://git.openstack.org/openstack/openstack-ansible-os_gnocchi
@ -105,7 +105,7 @@
- name: os_nova
scm: git
src: https://git.openstack.org/openstack/openstack-ansible-os_nova
version: d0e2a1c886bb71df68d508b2073a9b2dfdd3bf45
version: 31500234b0f8f77f2b0a676b0018413c6433539c
- name: os_rally
scm: git
src: https://git.openstack.org/openstack/openstack-ansible-os_rally

View File

@ -17,5 +17,5 @@ ldappool==2.1.0
### These pins are updated through the sources-branch-updater script ###
###
pip==9.0.1
setuptools==33.1.1
setuptools==36.2.0
wheel==0.29.0

View File

@ -97,15 +97,6 @@
- role: "os_cinder"
cinder_storage_address: "{{ storage_address }}"
- role: "ceph_client"
openstack_service_system_user: "{{ cinder_system_user_name }}"
openstack_service_venv_bin: "{{ cinder_bin }}"
when:
- "'cinder_volume' in group_names"
- "cinder_backend_rbd_inuse | default(false) | bool"
tags:
- ceph
- role: "rsyslog_client"
rsyslog_client_log_rotate_file: cinder_log_rotate
rsyslog_client_log_dir: "/var/log/cinder"

View File

@ -61,15 +61,6 @@
roles:
- role: "os_glance"
- role: "ceph_client"
openstack_service_system_user: "{{ glance_system_user_name }}"
openstack_service_venv_bin: "{{ glance_bin }}"
when:
- "'glance_api' in group_names"
- "{{ 'rbd' in [glance_default_store | default('none')] + glance_additional_stores | default([]) }}"
tags:
- ceph
- role: "openstack_openrc"
tags:
- openrc

View File

@ -122,16 +122,7 @@
nova_spicehtml5_git_repo: "{{ openstack_repo_git_url }}/spice-html5"
nova_spicehtml5_git_install_branch: "{{ spicehtml5_git_install_branch }}"
nova_management_address: "{{ management_address }}"
- role: "ceph_client"
openstack_service_system_user: "{{ nova_system_user_name }}"
openstack_service_venv_bin: "{{ nova_bin }}"
when:
- "'nova_compute' in group_names"
- "(nova_libvirt_images_rbd_pool is defined) or
(cinder_backends_rbd_inuse | default(false)) | bool"
tags:
- ceph
nova_cinder_rbd_inuse: "{{ hostvars['localhost']['cinder_backends_rbd_inuse'] }}"
- role: "openstack_openrc"
tags:

View File

@ -53,7 +53,7 @@ repo_release_path: "{{ openstack_repo_url }}/os-releases/{{ openstack_release }}
# These pins are updated through the sources-branch-updater script
pip_packages:
- pip==9.0.1
- setuptools==33.1.1
- setuptools==36.2.0
- wheel==0.29.0
pip_links:
@ -152,20 +152,6 @@ cinder_service_region: "{{ service_region }}"
cinder_service_port: 8776
# If there are Swift hosts in the environment, then enable cinder backups to it
cinder_service_backup_program_enabled: "{{ groups['swift_all'] is defined and groups['swift_all'] | length > 0 }}"
# cinder_backend_rbd_inuse: True if current host has an rbd backend
cinder_backend_rbd_inuse: '{{ (cinder_backends|default("")|to_json).find("cinder.volume.drivers.rbd.RBDDriver") != -1 }}'
# cinder_backends_rbd_inuse: true if at least 1 cinder_backend on any
# cinder_volume host uses Ceph RBD
# http://stackoverflow.com/questions/9486393/jinja2-change-the-value-of-a-variable-inside-a-loop
cinder_backends_rbd_inuse: >-
{% set _var = {'rbd_inuse': False} %}{%
for host in groups.cinder_volume %}{%
if hostvars[host].cinder_backend_rbd_inuse | bool %}{%
if _var.update({'rbd_inuse': True }) %}{%
endif %}{%
endif %}{%
endfor %}{{
_var.rbd_inuse }}
cinder_ceph_client: cinder
# These are here rather than in cinder_all because

View File

@ -34,7 +34,9 @@ glance_default_store: "{{ ((groups['swift_all'] is defined) and (groups['swift_a
cinder_backend_lvm_inuse: '{{ (cinder_backends|default("")|to_json).find("cinder.volume.drivers.lvm.LVMVolumeDriver") != -1 }}'
cinder_service_in_ldap: "{{ service_ldap_backend_enabled }}"
cinder_glance_api_servers: "{{ glance_api_servers }}"
cinder_glance_api_version: "{{ (cinder_backends_rbd_inuse|bool and glance_default_store == 'rbd') | ternary('2','1') }}"
# If an RBD backend is in use on any cinder_volume and glance is also rbd
# backed we should use glance api v2
cinder_glance_api_version: "{{ (hostvars['localhost']['cinder_backends_rbd_inuse'] | bool and glance_default_store == 'rbd') | ternary('2','1') }}"
# Ensure that the package state matches the global setting
cinder_package_state: "{{ package_state }}"

View File

@ -13,5 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# cinder_backend_rbd_inuse: True if current host has an rbd backend
# this is defined identically downstream in the os_cinder role, but redefined
# here so it can be consumed by the nova group vars
cinder_backend_rbd_inuse: '{{ (cinder_backends|default("")|to_json).find("cinder.volume.drivers.rbd.RBDDriver") != -1 }}'
lxc_container_config_list:
- "lxc.aa_profile=unconfined"

View File

@ -14,3 +14,7 @@
# limitations under the License.
ansible_python_interpreter: /usr/bin/python
# cinder_backends_rbd_inuse: true if at least 1 cinder_backend on any
# cinder_volume host uses Ceph RBD
cinder_backends_rbd_inuse: "{{ True in groups['cinder_volume'] | map('extract', hostvars, 'cinder_backend_rbd_inuse') }}"

View File

@ -20,7 +20,7 @@ LINE='----------------------------------------------------------------------'
MAX_RETRIES=${MAX_RETRIES:-5}
ANSIBLE_PARAMETERS=${ANSIBLE_PARAMETERS:--e gather_facts=False}
STARTTIME="${STARTTIME:-$(date +%s)}"
PIP_INSTALL_OPTIONS=${PIP_INSTALL_OPTIONS:-'pip==9.0.1 setuptools==33.1.1 wheel==0.29.0 '}
PIP_INSTALL_OPTIONS=${PIP_INSTALL_OPTIONS:-'pip==9.0.1 setuptools==36.2.0 wheel==0.29.0 '}
COMMAND_LOGS=${COMMAND_LOGS:-"/openstack/log/ansible_cmd_logs"}
# The default SSHD configuration has MaxSessions = 10. If a deployer changes