Update qgroup setup to be more explicit

The default qgroup setup was setting the qgroup limits to none which
allows the system to dynamical expand or contract. While this works
there can be a lag between the time it takes to grow vs the time it
takes to hit the limit. This change sets the limits accordingly should a
deployer not have a container specific limit set already.

Change-Id: Iea2498bfe1c391f4b4bee295c8f04b2655f404d9
This commit is contained in:
Jesse Pretorius 2018-07-03 10:13:32 +01:00 committed by Kevin Carter
parent 7ea32e9219
commit 6b0bd02729
1 changed files with 25 additions and 0 deletions

View File

@ -29,6 +29,31 @@
- skip_ansible_lint
- always
- name: Pull filesystem information
command: "btrfs filesystem show --raw /var/lib/machines"
changed_when: false
register: filesystem
delegate_to: "{{ physical_host }}"
tags:
- skip_ansible_lint
- always
- name: Set qgroup space fact
set_fact:
nspawn_host_qgroup_space_limit: "{{ filesystem.stdout.strip().splitlines()[-1].split()[3] }}"
when:
- nspawn_host_qgroup_space_limit == 'none'
tags:
- always
- name: Set qgroup compression fact
set_fact:
nspawn_host_qgroup_compression_limit: "{{ filesystem.stdout.strip().splitlines()[-1].split()[3] }}"
when:
- nspawn_host_qgroup_compression_limit == 'none'
tags:
- always
- name: Set facts
set_fact:
nspawn_systemd_version: "{{ systemd_version.stdout_lines[0].split()[-1] }}"