]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commit
containers: use --cpus instead --cpu-quota
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 10 Jan 2020 09:55:06 +0000 (10:55 +0100)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Thu, 28 Jan 2021 21:37:50 +0000 (16:37 -0500)
commitb903446fa4a70c0985962ca7e9c8fc5442f9e512
tree37b4c2cc1f494a49109a4870ab58e2ec816e5791
parent14267fe0c4a2ebd186197c30c52adc2009d5400a
containers: use --cpus instead --cpu-quota

When using docker 1.13.1, the current condition:

```
{% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version_compare('13', '>=')) or container_binary == 'podman' -%}
```

is wrong because it compares the first digit (1) whereas it should
compare the second one.
It means we always use `--cpu-quota` although documentation recommend
using `--cpus` when docker version is 1.13.1 or higher.

From the doc:
> --cpu-quota=<value> Impose a CPU CFS quota on the container. The number of
> microseconds per --cpu-period that the container is limited to before
> throttled. As such acting as the effective ceiling.
> If you use Docker 1.13 or higher, use --cpus instead.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 3e262e072b0e86bbb431c47bc691bcad70783443)
infrastructure-playbooks/docker-to-podman.yml
roles/ceph-container-common/tasks/main.yml
roles/ceph-iscsi-gw/templates/rbd-target-api.service.j2
roles/ceph-iscsi-gw/templates/rbd-target-gw.service.j2
roles/ceph-iscsi-gw/templates/tcmu-runner.service.j2
roles/ceph-mds/templates/ceph-mds.service.j2
roles/ceph-mgr/templates/ceph-mgr.service.j2
roles/ceph-mon/templates/ceph-mon.service.j2
roles/ceph-osd/templates/ceph-osd.service.j2
roles/ceph-rbd-mirror/templates/ceph-rbd-mirror.service.j2
roles/ceph-rgw/templates/ceph-radosgw.service.j2