]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Fixes for Hammer install and added numerical release checks
authorJames Saint-Rossy <james_saintrossy@cable.comcast.com>
Wed, 24 Aug 2016 04:23:47 +0000 (00:23 -0400)
committerJames Saint-Rossy <james_saintrossy@cable.comcast.com>
Wed, 24 Aug 2016 04:23:47 +0000 (00:23 -0400)
roles/ceph-common/defaults/main.yml
roles/ceph-common/tasks/installs/install_on_redhat.yml
roles/ceph-common/tasks/main.yml
roles/ceph-mon/tasks/start_monitor.yml

index 3e4cc259e5376218c2299bfabd6def9d1f357173..f546538a1c1cd9349e529648946fee9dc5c53ed8 100644 (file)
@@ -115,6 +115,15 @@ ceph_stable_releases:
   - hammer
   - infernalis
 
+ceph_release_num:
+  dumpling: 0.67
+  emperor: 0.72
+  firefly: 0.80
+  giant: 0.87
+  hammer: 0.94
+  infernalis: 9
+  jewel: 10
+
 # Use the option below to specify your applicable package tree, eg. when using non-LTS Ubuntu versions
 # # for a list of available Debian distributions, visit http://download.ceph.com/debian-{{ ceph_stable_release }}/dists/
 # for more info read: https://github.com/ceph/ceph-ansible/issues/305
index b3561fdbccb0b6ee623477457928995770da578a..91f40e6791e3494245c6d0b8f208428be568f9d8 100644 (file)
@@ -3,7 +3,7 @@
   yum:
     name: "{{ item }}"
     state: present
-  with_items: redhat_package_dependencies
+  with_items: "{{ redhat_package_dependencies }}"
   when:
     - ansible_distribution == "RedHat"
     - ansible_pkg_mgr == "yum"
@@ -12,7 +12,7 @@
   dnf:
     name: "{{ item }}"
     state: present
-  with_items: redhat_package_dependencies
+  with_items: "{{ redhat_package_dependencies }}"
   when:
     - ansible_distribution == "RedHat"
     - ansible_pkg_mgr == "dnf"
@@ -21,7 +21,7 @@
   yum:
     name: "{{ item }}"
     state: present
-  with_items: centos_package_dependencies
+  with_items: "{{ centos_package_dependencies }}"
   when:
     - ansible_distribution == "CentOS"
     - ansible_pkg_mgr == "yum"
@@ -30,7 +30,7 @@
   dnf:
     name: "{{ item }}"
     state: present
-  with_items: centos_package_dependencies
+  with_items: "{{ centos_package_dependencies }}"
   when:
     - ansible_distribution == "CentOS"
     - ansible_pkg_mgr == "dnf"
@@ -58,7 +58,7 @@
   copy:
     src: "{{ansible_dir}}/rundep"
     dest: "{{ item }}"
-  with_items: rundep_location.stdout_lines
+  with_items: "{{ rundep_location }}.stdout_lines"
   when:
     - ceph_origin == 'local'
     - use_installer
@@ -66,7 +66,7 @@
 - name: install ceph dependencies
   script: "{{ ansible_dir }}/rundep_installer.sh {{ item }}"
   become: true
-  with_items: rundep_location.stdout_lines
+  with_items: "{{ rundep_location }}.stdout_lines"
   when:
     - ceph_origin == 'local'
     - use_installer
@@ -76,7 +76,7 @@
     name: ceph
     state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
   when:
-    - not use_server_package_split
+    - ceph_release_num.{{ ceph_stable_release}} <= ceph_release_num.infernalis
     - ansible_pkg_mgr == "yum"
     - ceph_origin != 'local'
 
index 54edb2256eae0d6e0bc4447c8224291ed492ec2a..7ae1ac9e3cc2b1b09e040fed88dc2a6d49fd0e4e 100644 (file)
@@ -5,9 +5,13 @@
 
 - include: ./checks/check_firewall.yml
   when: check_firewall
+  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
+  static: False
 
 - include: ./misc/system_tuning.yml
   when: osd_group_name in group_names
+  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
+  static: False
 
 - include: ./pre_requisites/prerequisite_rh_storage_iso_install.yml
   when:
@@ -15,6 +19,8 @@
     - ceph_rhcs_iso_install
   tags:
     - package-install
+  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
+  static: False
 
 - include: ./pre_requisites/prerequisite_rh_storage_cdn_install.yml
   when:
@@ -23,6 +29,8 @@
     - ansible_os_family == "RedHat"
   tags:
     - package-install
+  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
+  static: False
 
 - include: ./installs/install_on_redhat.yml
   when:
@@ -30,6 +38,8 @@
     not ceph_rhcs_iso_install
   tags:
     - package-install
+  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
+  static: False
 
 - include: ./installs/install_rh_storage_on_redhat.yml
   when:
@@ -37,6 +47,8 @@
     - ceph_rhcs
   tags:
     - package-install
+  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
+  static: False
 
 - include: ./installs/install_on_debian.yml
   when:
@@ -44,6 +56,8 @@
     - not ceph_rhcs
   tags:
     - package-install
+  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
+  static: False
 
 - include: ./installs/install_rh_storage_on_debian.yml
   when:
@@ -51,6 +65,8 @@
     - ceph_rhcs
   tags:
     - package-install
+  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
+  static: False
 
 - include: ./installs/install_rgw_on_redhat.yml
   when:
@@ -59,6 +75,8 @@
     - rgw_group_name in group_names
   tags:
     - package-install
+  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
+  static: False
 
 - include: ./installs/install_rgw_on_debian.yml
   when:
     - rgw_group_name in group_names
   tags:
     - package-install
+  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
+  static: False
 
 - include: ./misc/ntp_redhat.yml
   when:
     - ansible_os_family == 'RedHat'
     - ntp_service_enabled
+  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
+  static: False
 
 - include: ./misc/ntp_debian.yml
   when:
     - ansible_os_family == 'Debian'
     - ntp_service_enabled
+  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
+  static: False
 
 - include: facts.yml
 
index 846c77392ead4721047ff7b2fc6bdad3e21a7f64..64146166239f26eea93e8952ae5dfc2d3c904f67 100644 (file)
   when:
     - not use_systemd
 
-# NOTE (leseb): somehow the service ansible module is messing things up
-# as a safety measure we run the raw command
+# legacy ceph system v init scripts require a mon section in order to work
+- name: add mon section into ceph.conf for systemv init scripts
+  ini_file:
+    dest: /etc/ceph/ceph.conf
+    section: mon.{{ ansible_host }}
+    option: host
+    value: "{{ ansible_host }}"
+    state: present
+  when:
+    - ansible_os_family == "RedHat"
+    - ceph_release_num.{{ ceph_stable_release }} < ceph_release_num.infernalis
+# NOTE (jsaintrocc): can't use service module because we need to use the 
+# legacy systemv init for older ceph releases.  Even when the os supports systemd
 - name: start and add that the monitor service to the init sequence
   command: service ceph start mon
   changed_when: false
   when:
-    - ansible_distribution != "Ubuntu"
-    - is_before_infernalis
+    - ansible_os_family == "RedHat"
+    - ceph_release_num.{{ ceph_stable_release }} < ceph_release_num.infernalis
 
 - name: start and add that the monitor service to the init sequence (for or after infernalis)
   command: systemctl enable ceph-mon@{{ monitor_name }}