From 6cbf58a649b24dd923b424905062ddcb1ab80528 Mon Sep 17 00:00:00 2001 From: Al Bailey Date: Tue, 9 Jul 2019 16:30:18 -0500 Subject: [PATCH] Remove cgroups setup for kubelet The service pre-exec startup script negates the need to do any cgroups setup in ansible or puppet. The newer version of kubernetes changes the cgroups folders which exposed that this code is not needed anymore. Change-Id: Iebf73bd1d12a68edc15c3bf7b53cbc5168a0f7e4 Story: 2005860 Task: 35838 Depends-On: https://review.opendev.org/#/c/671147/ Signed-off-by: Al Bailey --- .../tasks/bringup_kubemaster.yml | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/playbookconfig/src/playbooks/bootstrap/roles/bringup-essential-services/tasks/bringup_kubemaster.yml b/playbookconfig/src/playbooks/bootstrap/roles/bringup-essential-services/tasks/bringup_kubemaster.yml index 8b143e393..9415a6a10 100644 --- a/playbookconfig/src/playbooks/bootstrap/roles/bringup-essential-services/tasks/bringup_kubemaster.yml +++ b/playbookconfig/src/playbooks/bootstrap/roles/bringup-essential-services/tasks/bringup_kubemaster.yml @@ -9,7 +9,6 @@ # - Update iptables # - Create daemon.json for insecure unified registry if applicable # - Create manifest directory -# - Set up pods cgroups for minimal set of controllers # - Enable kubelet service (with default/custom registry) # - Run kubeadm init # - Prepare admin.conf @@ -97,43 +96,6 @@ when: k8s_pki_files is defined -- name: Create kubelet cgroup for minimal set - file: - path: "{{ cgroup_root }}/{{ item }}/{{ k8s_cgroup_name }}" - state: directory - recurse: yes - owner: root - group: root - mode: 0700 - with_items: - - cpuset - - cpu - - cpuacct - - memory - - systemd - -- name: Get default k8s cpuset - command: cat /sys/devices/system/cpu/online - register: k8s_cpuset - -- name: Get default k8s nodeset - command: cat /sys/devices/system/node/online - register: k8s_nodeset - -- name: Set mems for cpuset controller - shell: "echo {{ k8s_nodeset.stdout_lines[0] }} > {{ cgroup_root }}/cpuset/{{ k8s_cgroup_name }}/cpuset.mems || :" - -- name: Set cpus for cpuset controller - shell: "echo {{ k8s_cpuset.stdout_lines[0] }} > {{ cgroup_root }}/cpuset/{{ k8s_cgroup_name }}/cpuset.cpus || :" - -- name: Create a tasks file for cpuset controller - file: - path: "{{ cgroup_root }}/cpuset/{{ k8s_cgroup_name }}/tasks" - state: touch - owner: root - group: root - mode: 0644 - - name: Set kubelet node configuration set_fact: node_ip: "{{ controller_0_cluster_host }}"