From f2e85eb28e0ebe1bdf61867507629e9b5f56c541 Mon Sep 17 00:00:00 2001 From: Matt Thompson Date: Wed, 4 Nov 2015 12:03:35 +0000 Subject: [PATCH] Symlink ceph libraries out of venv Currently, we install python-rados and python-rbd via apt when ceph integration is enabled, which causes issues when venvs are used in the environment. This commit adds a temporary work-around by creating symlinks in the venv to the installed libraries outside. There is currently a ceph issue [1] in progress to make this possible, and once this has been completed we can update ceph_client role to install python packages instead. [1] http://tracker.ceph.com/issues/5900 Change-Id: Ia7a3ceae002054fd75e0305892b20ce1143f8dcc Closes-Bug: #1509837 --- tasks/nova_compute_kvm_install.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tasks/nova_compute_kvm_install.yml b/tasks/nova_compute_kvm_install.yml index ba2564ac..67c74fbc 100644 --- a/tasks/nova_compute_kvm_install.yml +++ b/tasks/nova_compute_kvm_install.yml @@ -77,6 +77,28 @@ - nova-install - nova-pip-packages +# TODO(mattt): remove once ceph_client role can install ceph packages from pypi +# This is being done as a temporary workaround since we currently cannot obtain +# ceph-related libraries from pypi. There is work in progress [1] to address +# this. +# [1] http://tracker.ceph.com/issues/5900 +- name: Link ceph libraries into the venv + file: + src: "{{ item.name }}" + dest: "{{ nova_venv_bin | dirname }}/lib/python2.7/site-packages/{{ item.name | basename }}" + state: "{{ item.state }}" + force: "yes" + with_items: + - { state: link, name: "/usr/lib/python2.7/dist-packages/rados.py" } + - { state: link, name: "/usr/lib/python2.7/dist-packages/rbd.py" } + when: + - nova_venv_enabled | bool + - inventory_hostname in groups['nova_compute'] + - (cinder_backends_rbd_inuse|bool or nova_libvirt_images_rbd_pool is defined) + tags: + - nova-install + - nova-pip-packages + - name: Install pip packages (no venv) pip: name: "{{ item }}"