Fix: CEPH issues on centos7 01/10801/1
authorgrakiss <grakiss.wanglei@huawei.com>
Thu, 25 Feb 2016 12:19:00 +0000 (07:19 -0500)
committergrakiss <grakiss.wanglei@huawei.com>
Thu, 25 Feb 2016 12:19:00 +0000 (07:19 -0500)
JIRA:COMPASS-323
  - path error for init script
  - fix centos bug for python-crypto installation
  - fix redhat-lsd-core installation

Change-Id: I5b6aaa7310a516d3938e6487aa71642fa0a643cf
Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
deploy/adapters/ansible/roles/ceph-osd/tasks/install_osd.yml
deploy/adapters/ansible/roles/common/tasks/main.yml
deploy/adapters/ansible/roles/common/vars/RedHat.yml

index 5c637a2..e7e4a24 100644 (file)
@@ -28,6 +28,6 @@
   when: ansible_os_family == "Debian"
 
 - name: rebuild osd after reboot for centos
-  lineinfile: dest=/usr/init.d/ceph insertafter="^### END INIT INFO" line="\nsleep 1\nmount /dev/storage-volumes/ceph0 /var/local/osd"
+  lineinfile: dest=/etc/init.d/ceph insertafter="^### END INIT INFO" line="\nsleep 1\nmount /dev/storage-volumes/ceph0 /var/local/osd"
   when: ansible_os_family == "RedHat"
 
index d195703..f004e98 100644 (file)
     echo "# compass" >> /etc/hosts
     echo {{ COMPASS_SERVER.stdout_lines[0] }} {{ name.stdout_lines[0] }} >> /etc/hosts
 
+- name: install python-crypto
+  yum: name=python-crypto state=present
+  register: python_crypto_result
+  ignore_errors: yes
+  when: ansible_os_family == "RedHat"
+
+- name: remove python crypt egg file to work-around https://bugs.centos.org/view.php?id=9896&nbn=2
+  shell: rm -rf /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info
+  when: ansible_os_family == "RedHat" and python_crypto_result.msg == "Error unpacking rpm package python2-crypto-2.6.1-9.el7.x86_64\n"
+
 - name: install packages
   action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest update_cache=yes"
   with_items: packages | union(packages_noarch)
index 50102c5..8143e1c 100644 (file)
@@ -12,6 +12,8 @@ packages:
   - python-devel
   - python-memcached
   - gcc
+  - redhat-lsb-core
+  - python-crypto
 
 pip_packages:
   - crudini