HCL-TECH-SOFTWARE / connections-automation

Deployment and upgrade automation scripts for HCL Connections 7.0 based on Ansible
Apache License 2.0
17 stars 30 forks source link

kubeadm 1.24 init fails #223

Closed stoeps13 closed 1 year ago

stoeps13 commented 1 year ago

The role creates /etc/containerd/config.toml with the command containerd config default but then the command kubeadmin init falis.

Error message:

{"changed": true, "cmd": ["kubeadm", "init", "--config=/tmp/k8s_ansible/kubeadm-config.yaml"], "delta": "0:00:00.522020", "end": "2022-11-02 07:57:42.970618", "msg": "non-zero return code", "rc": 1, "start": "2022-11-02 07:57:42.448598", "stderr": "error execution phase preflight: [preflight] Some fatal errors occurred:\n\t[ERROR CRI]: container runtime is not running: output: E1102 07:57:42.752076    2098 remote_runtime.go:948] \"Status from runtime service failed\" err=\"rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService\"\ntime=\"2022-11-02T07:57:42Z\" level=fatal msg=\"getting status of runtime: rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService\"\n, error: exit status 1\n[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`\nTo see the stack trace of this error execute with --v=5 or higher", "stderr_lines": ["error execution phase preflight: [preflight] Some fatal errors occurred:", "\t[ERROR CRI]: container runtime is not running: output: E1102 07:57:42.752076    2098 remote_runtime.go:948] \"Status from runtime service failed\" err=\"rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService\"", "time=\"2022-11-02T07:57:42Z\" level=fatal msg=\"getting status of runtime: rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService\"", ", error: exit status 1", "[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`", "To see the stack trace of this error execute with --v=5 or higher"], "stdout": "[init] Using Kubernetes version: v1.24.1\n[preflight] Running pre-flight checks", "stdout_lines": ["[init] Using Kubernetes version: v1.24.1", "[preflight] Running pre-flight checks"]}

This article https://stackoverflow.com/questions/49658051/kubeadm-join-unable-to-check-if-the-container-runtime says delete the config.toml.

Deleting the config.toml and restarting containerd fixes this, but I'm not sure if this has side effects.

sabrina-yee commented 1 year ago

Issue was related to https://github.com/HCL-TECH-SOFTWARE/connections-automation/issues/221. Using the new playbook will address this issue.