Browse Source
Fix containerd install for fcos (#8107)
* Fix containerd install for fcos
* rm orphaned runc and containerd binaries
pull/8164/head
Marcus Fenner
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
28 additions and
2 deletions
-
roles/container-engine/containerd/tasks/main.yml
-
roles/container-engine/runc/defaults/main.yml
-
roles/container-engine/runc/tasks/main.yml
-
roles/kubespray-defaults/defaults/main.yaml
|
|
@ -57,6 +57,19 @@ |
|
|
|
- --strip-components=1 |
|
|
|
notify: restart containerd |
|
|
|
|
|
|
|
- name: containerd | Remove orphaned binary |
|
|
|
file: |
|
|
|
path: "/usr/bin/{{ item }}" |
|
|
|
state: absent |
|
|
|
when: containerd_bin_dir != "/usr/bin" |
|
|
|
ignore_errors: true # noqa ignore-errors |
|
|
|
with_items: |
|
|
|
- containerd |
|
|
|
- containerd-shim |
|
|
|
- containerd-shim-runc-v1 |
|
|
|
- containerd-shim-runc-v2 |
|
|
|
- ctr |
|
|
|
|
|
|
|
- name: containerd | Generate systemd service for containerd |
|
|
|
template: |
|
|
|
src: containerd.service.j2 |
|
|
|
|
|
@ -1,5 +1,5 @@ |
|
|
|
--- |
|
|
|
|
|
|
|
runc_bin_dir: /usr/bin/ |
|
|
|
runc_bin_dir: "{{ bin_dir }}" |
|
|
|
|
|
|
|
runc_package_name: runc |
|
|
@ -1,8 +1,14 @@ |
|
|
|
--- |
|
|
|
- name: runc | set is_ostree |
|
|
|
set_fact: |
|
|
|
is_ostree: "{{ ostree.stat.exists }}" |
|
|
|
|
|
|
|
- name: runc | Uninstall runc package managed by package manager |
|
|
|
package: |
|
|
|
name: "{{ runc_package_name }}" |
|
|
|
state: absent |
|
|
|
when: |
|
|
|
- not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk") or (ansible_distribution == "Flatcar")) |
|
|
|
|
|
|
|
- name: runc | Download runc binary |
|
|
|
include_tasks: "../../../download/tasks/download_file.yml" |
|
|
@ -15,3 +21,10 @@ |
|
|
|
dest: "{{ runc_bin_dir }}/runc" |
|
|
|
mode: 0755 |
|
|
|
remote_src: true |
|
|
|
|
|
|
|
- name: runc | Remove orphaned binary |
|
|
|
file: |
|
|
|
path: /usr/bin/runc |
|
|
|
state: absent |
|
|
|
when: runc_bin_dir != "/usr/bin" |
|
|
|
ignore_errors: true # noqa ignore-errors |
|
|
@ -67,7 +67,7 @@ haproxy_config_dir: "/etc/haproxy" |
|
|
|
# Directory where the binaries will be installed |
|
|
|
bin_dir: /usr/local/bin |
|
|
|
docker_bin_dir: /usr/bin |
|
|
|
containerd_bin_dir: /usr/bin |
|
|
|
containerd_bin_dir: "{{ bin_dir }}" |
|
|
|
etcd_data_dir: /var/lib/etcd |
|
|
|
# Where the binaries will be downloaded. |
|
|
|
# Note: ensure that you've enough disk space (about 1G) |
|
|
|