Skip to content

Commit

Permalink
Dont run client dummy container on ppc64le hosts
Browse files Browse the repository at this point in the history
The dummy client container currently wont work on ppc64le hosts.
This PR creates a filtered client group that contains only hosts
that are not ppc64le - which can then be the group to run the
dummy container against.

This is for the specific case of a containerized_deployment where
there is a mixture of non-ppc64le hosts and ppc64le hosts.
Currently ppc64le is not supported with Ceph server components.

Signed-off-by: Andy McCrae <andy.mccrae@gmail.com>
  • Loading branch information
andymcc committed Aug 30, 2018
1 parent 561ec92 commit cb5eb9a
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions roles/ceph-client/tasks/create_users_keys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
when:
- keys_tmp is defined

# dummy container run is currently not supported for ppc64le
# this task creates a group that contains only non-ppc64le clients
- name: create filtered clients group
add_host:
name: "{{ item }}"
groups: _filtered_clients
with_items: "{{ groups[client_group_name] }}"
when:
- hostvars[item]['ansible_architecture'] != 'ppc64le'

- name: run a dummy container (sleep 300) from where we can create pool(s)/key(s)
command: >
docker run \
Expand All @@ -25,7 +35,7 @@
changed_when: false
when:
- containerized_deployment
- inventory_hostname == groups.get(client_group_name) | first
- inventory_hostname == groups.get('_filtered_clients') | first

- name: set_fact delegated_node
set_fact:
Expand Down Expand Up @@ -57,7 +67,7 @@
when:
- cephx
- keys | length > 0
- inventory_hostname == groups.get(client_group_name) | first
- inventory_hostname == groups.get('_filtered_clients') | first

- name: slurp client cephx key(s)
slurp:
Expand All @@ -69,7 +79,7 @@
when:
- cephx
- keys | length > 0
- inventory_hostname == groups.get(client_group_name) | first
- inventory_hostname == groups.get('_filtered_clients') | first

- name: list existing pool(s)
command: >
Expand All @@ -81,7 +91,7 @@
delegate_to: "{{ delegated_node }}"
when:
- condition_copy_admin_key
- inventory_hostname == groups.get(client_group_name, []) | first
- inventory_hostname == groups.get('_filtered_clients', []) | first

- name: create ceph pool(s)
command: >
Expand All @@ -103,7 +113,7 @@
when:
- pools | length > 0
- condition_copy_admin_key
- inventory_hostname in groups.get(client_group_name) | first
- inventory_hostname in groups.get('_filtered_clients') | first
- item.1.rc != 0

- name: get client cephx keys
Expand All @@ -114,6 +124,6 @@
owner: "{{ ceph_uid }}"
group: "{{ ceph_uid }}"
with_items:
- "{{ hostvars[groups[client_group_name][0]]['slurp_client_keys']['results'] }}"
- "{{ hostvars[groups['_filtered_clients'][0]]['slurp_client_keys']['results'] }}"
when:
- not item.get('skipped', False)

0 comments on commit cb5eb9a

Please sign in to comment.