mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-17 17:07:36 -02:30
Systemd units, limits, and bin path fixes
* Add restart for weave service unit * Reuse docker_bin_dir everythere * Limit systemd managed docker containers by CPU/RAM. Do not configure native systemd limits due to the lack of consensus in the kernel community requires out-of-tree kernel patches. Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
committed by
Bogdan Dobrelya
parent
6139ee3add
commit
a56d9de502
@@ -12,10 +12,10 @@
|
||||
|
||||
#Plan A: no docker-py deps
|
||||
- name: Install | Copy etcdctl binary from container
|
||||
command: sh -c "/usr/bin/docker rm -f etcdctl-binarycopy;
|
||||
/usr/bin/docker create --name etcdctl-binarycopy {{ etcd_image_repo }}:{{ etcd_image_tag }} &&
|
||||
/usr/bin/docker cp etcdctl-binarycopy:{{ etcd_container_bin_dir }}etcdctl {{ bin_dir }}/etcdctl &&
|
||||
/usr/bin/docker rm -f etcdctl-binarycopy"
|
||||
command: sh -c "{{ docker_bin_dir }}/docker rm -f etcdctl-binarycopy;
|
||||
{{ docker_bin_dir }}/docker create --name etcdctl-binarycopy {{ etcd_image_repo }}:{{ etcd_image_tag }} &&
|
||||
{{ docker_bin_dir }}/docker cp etcdctl-binarycopy:{{ etcd_container_bin_dir }}etcdctl {{ bin_dir }}/etcdctl &&
|
||||
{{ docker_bin_dir }}/docker rm -f etcdctl-binarycopy"
|
||||
when: etcd_deployment_type == "docker"
|
||||
register: etcd_task_result
|
||||
until: etcd_task_result.rc == 0
|
||||
|
||||
@@ -26,12 +26,12 @@
|
||||
- /etc/init.d/etcd-proxy
|
||||
|
||||
- name: "Pre-upgrade | find etcd-proxy container"
|
||||
command: docker ps -aq --filter "name=etcd-proxy*"
|
||||
command: "{{ docker_bin_dir }}/docker ps -aq --filter 'name=etcd-proxy*'"
|
||||
register: etcd_proxy_container
|
||||
failed_when: false
|
||||
|
||||
- name: "Pre-upgrade | remove etcd-proxy if it exists"
|
||||
command: "docker rm -f {{item}}"
|
||||
command: "{{ docker_bin_dir }}/docker rm -f {{item}}"
|
||||
with_items: "{{etcd_proxy_container.stdout_lines}}"
|
||||
|
||||
- name: "Pre-upgrade | check if member list is non-SSL"
|
||||
|
||||
Reference in New Issue
Block a user