Skip to content

Commit

Permalink
Support Ansible 2.5
Browse files Browse the repository at this point in the history
Raises the maximum Ansible version in requirements.txt to Ansible 2.5.x
for both kayobe and kolla ansible.

Also removes the hack to use a patched parted module for ceph block
device management, as Ansible 2.4 contains the required fix.

Change-Id: I0d2f564eb1ddb63b07829d6f0d918af26887db97
Story: 2001649
Task: 6668
  • Loading branch information
markgoddard committed Jun 6, 2018
1 parent f034ae4 commit 07b2f06
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 38 deletions.
3 changes: 1 addition & 2 deletions ansible/ceph-block-devices.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
- name: Ensure Ceph disk are tagged
hosts: overcloud
hosts: overcloud
tags:
- kolla-ceph
roles:
- role: stackhpc.parted-1-1
- role: kolla-ceph
when: kolla_enable_ceph | bool
1 change: 1 addition & 0 deletions ansible/roles/kolla-ansible/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,6 @@
dest: "{{ kolla_ansible_venv }}/lib/python2.7/site-packages/selinux"
state: link
when:
- ansible_os_family == 'RedHat'
- ansible_selinux != False
- ansible_selinux.status != 'disabled'
2 changes: 1 addition & 1 deletion ansible/roles/kolla-ansible/templates/requirements.txt.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ kolla-ansible=={{ kolla_openstack_release }}
{% endif %}
# Limit the version of ansible used by kolla-ansible to avoid new releases from
# breaking tested code. Changes to this limit should be tested.
ansible<2.4
ansible<2.6
11 changes: 5 additions & 6 deletions ansible/roles/kolla-ceph/tasks/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# (ktibi) Need to remove parted_1_1 module when kayobe will support ansible 2.4

- name: Ensure required packages are installed
package:
Expand All @@ -10,18 +9,18 @@

- name: Check the presence of a partition on the OSD disks
become: True
parted_1_1:
parted:
device: "{{ item.osd }}"
with_items: "{{ ceph_disks }}"
register: "disk_osd_info"

- name: Check the presence of a partition on the journal disks
become: True
parted_1_1:
parted:
device: "{{ item.journal }}"
with_items: "{{ ceph_disks }}"
register: "disk_journal_info"
when:
when:
- item.journal is defined

- name: Fail if the Ceph OSD disks have already a partition
Expand Down Expand Up @@ -51,7 +50,7 @@

- name: Create tag partition for Ceph OSD
become: True
parted_1_1:
parted:
device: "{{ item.item.osd }}"
number: 1
label: gpt
Expand All @@ -68,7 +67,7 @@

- name: Create tag partition for Ceph external journal
become: True
parted_1_1:
parted:
device: "{{ item.item.journal }}"
number: 1
label: gpt
Expand Down
12 changes: 4 additions & 8 deletions ansible/roles/kolla-ceph/tests/test-bootstrapped-journal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

- name: Create tag partition for the fake OSD
become: True
parted_1_1:
parted:
device: "{{ osd_tempfile.path }}"
number: 1
label: gpt
Expand All @@ -34,7 +34,7 @@

- name: Create tag partition for the fake journal
become: True
parted_1_1:
parted:
device: "{{ journal_tempfile.path }}"
number: 1
label: gpt
Expand All @@ -45,10 +45,6 @@
osd_id: "{{ osd_tempfile.path | basename }}{{ ansible_hostname }}"

- block:
- name: Import parted role
include_role:
name: ../../stackhpc.parted-1-1

- name: Test the kolla-ceph role
include_role:
name: ../../kolla-ceph
Expand All @@ -58,7 +54,7 @@
journal: "{{ journal_tempfile.path }}"

- name: Get name of fake OSD partition
parted_1_1:
parted:
device: "{{ osd_tempfile.path }}"
register: "disk_osd_info"
become: True
Expand All @@ -80,7 +76,7 @@
expected: "{{ 'KOLLA_CEPH_OSD_BOOTSTRAP_' ~ ((osd_tempfile.path | basename ~ ansible_hostname) | hash('md5'))[:9] }}"

- name: Get name of fake journal partition
parted_1_1:
parted:
device: "{{ journal_tempfile.path }}"
register: "disk_journal_info"
become: True
Expand Down
12 changes: 4 additions & 8 deletions ansible/roles/kolla-ceph/tests/test-data-journal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

- name: Create tag partition for the fake OSD
become: True
parted_1_1:
parted:
device: "{{ osd_tempfile.path }}"
number: 1
label: gpt
Expand All @@ -33,7 +33,7 @@

- name: Create tag partition for the fake journal
become: True
parted_1_1:
parted:
device: "{{ journal_tempfile.path }}"
number: 1
label: gpt
Expand All @@ -44,10 +44,6 @@
osd_id: "{{ (osd_tempfile.path | basename ~ ansible_hostname) }}"

- block:
- name: Import parted role
include_role:
name: ../../stackhpc.parted-1-1

- name: Test the kolla-ceph role
include_role:
name: ../../kolla-ceph
Expand All @@ -57,7 +53,7 @@
journal: "{{ journal_tempfile.path }}"

- name: Get name of fake OSD partition
parted_1_1:
parted:
device: "{{ osd_tempfile.path }}"
register: "disk_osd_info"
become: True
Expand All @@ -79,7 +75,7 @@
expected: "{{ 'KOLLA_CEPH_DATA_' ~ ((osd_tempfile.path | basename ~ ansible_hostname)| hash('md5'))[:9] }}"

- name: Get name of fake journal partition
parted_1_1:
parted:
device: "{{ journal_tempfile.path }}"
register: "disk_journal_info"
become: True
Expand Down
8 changes: 2 additions & 6 deletions ansible/roles/kolla-ceph/tests/test-journal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
command: fallocate -l 10M {{ journal_tempfile.path }}

- block:
- name: Import parted role
include_role:
name: ../../stackhpc.parted-1-1

- name: Test the kolla-ceph role
include_role:
name: ../../kolla-ceph
Expand All @@ -33,7 +29,7 @@
journal: "{{ journal_tempfile.path }}"

- name: Get name of fake OSD partition
parted_1_1:
parted:
device: "{{ osd_tempfile.path }}"
register: "disk_osd_info"
become: True
Expand All @@ -55,7 +51,7 @@
expected: "{{ 'KOLLA_CEPH_OSD_BOOTSTRAP_' ~ ((osd_tempfile.path | basename ~ ansible_hostname)| hash('md5'))[:9] }}"

- name: Get name of fake journal partition
parted_1_1:
parted:
device: "{{ journal_tempfile.path }}"
register: "disk_journal_info"
become: True
Expand Down
6 changes: 1 addition & 5 deletions ansible/roles/kolla-ceph/tests/test-no-journal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
command: fallocate -l 10M {{ tempfile.path }}

- block:
- name: Import parted role
include_role:
name: ../../stackhpc.parted-1-1

- name: Test the kolla-ceph role
include_role:
name: ../../kolla-ceph
Expand All @@ -25,7 +21,7 @@
- osd: "{{ tempfile.path }}"

- name: Get name of fake partition
parted_1_1:
parted:
device: "{{ tempfile.path }}"
register: "disk_osd_info"
become: True
Expand Down
4 changes: 4 additions & 0 deletions releasenotes/notes/ansible-2.5-785e3c764f450d09.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
features:
- Adds support for the Ansible 2.5 release. The version requirement has been
increased for both kayobe and kolla ansible.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pbr>=2.0 # Apache-2.0
# with the fix backported. It can be installed by uncommenting the following
# line and commenting the one after.
# -e git+https://github.com/stackhpc/[email protected]#egg=ansible-issue-30350-2.3 # GPLv3
ansible<2.4.0 # GPLv3
ansible>=2.4.0,<2.6.0 # GPLv3
cliff>=2.5.0 # Apache
netaddr!=0.7.16,>=0.7.13 # BSD
PyYAML>=3.10.0 # MIT
Expand Down
1 change: 0 additions & 1 deletion requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
- src: https://github.com/stackhpc/ansible-users
version: append
name: singleplatform-eng.users
- src: stackhpc.parted-1-1
- src: stackhpc.drac
- src: stackhpc.drac-facts
- src: stackhpc.grafana-conf
Expand Down

0 comments on commit 07b2f06

Please sign in to comment.