tripleo-validations/validations/rabbitmq-limits.yaml
Florian Fuchs 38d5d58c9b Fix docker img filter in rabbitmq validation
To determine the current rabbitmq file descriptor limit, a command has to be
executed in the rabbitmq container. The validation uses the `docker ps` command
to find the container ID, but currently uses a name filter that is too strict
to find the right image.

This patch changes the filter to make sure the container image is found.

Change-Id: Ic93411be72314b1ebd10956c003b559ebe14ecde
2018-03-22 13:42:01 +00:00

21 lines
744 B
YAML

---
- hosts: Controller
vars:
metadata:
name: Rabbitmq limits
description: >
Make sure the rabbitmq file descriptor limits are set to reasonable values.
groups:
- post-deployment
min_fd_limit: 16384
tasks:
- name: Get file_descriptors total_limit
become: true
register: actual_fd_limit
shell: docker exec $(docker ps -q --filter "name=rabbitmq" | head -1) rabbitmqctl eval 'proplists:get_value(max_fds, erlang:system_info(check_io)).'
changed_when: false
- name: Verify the actual limit exceeds the minimal value
fail:
msg: "{{ actual_fd_limit.stdout }} must be greater than or equal to {{ min_fd_limit }}"
failed_when: "actual_fd_limit.stdout|int < min_fd_limit"