Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Kubernetes prereqs to epicli preflight checks #2665

Closed
8 of 13 tasks
romsok24 opened this issue Oct 6, 2021 · 3 comments
Closed
8 of 13 tasks

Add Kubernetes prereqs to epicli preflight checks #2665

romsok24 opened this issue Oct 6, 2021 · 3 comments
Assignees

Comments

@romsok24
Copy link
Contributor

romsok24 commented Oct 6, 2021

Is your feature request related to a problem? Please describe.
I'm frustrated when the installation of Epicli gets interrupted by two VM-related problems described below
when runing on the VM with default setup.
It is annoying, because it disturbs the k8s installation at the phase when it needs complete cleaning up to continuue
in order not to drop into another problem described in this issue.

Describe the solution you'd like
If the epicli preflight tests could have check some well know k8s prerequisites on the early run phase,
the cleaning would not be needed and simple eplicli installation restart ( after meeting the prereqs ) would be sufficient to continue.

Additional context
There are two problems discovered by me and related to these k8s prereqs:

  • swap is not allowed on k8s master node and it causes
TASK [kubernetes_common : Update in-cluster configuration] failing
FAILED! => {"changed": true, "cmd": "kubeadm init phase upload-config kubeadm  --config /etc/kubeadm/kubeadm-config.yml\n",
 "delta": "0:00:09.968956", "end": "2021-10-04 08:48:07.427857", "msg": "non-zero return code", "rc": 1, "start":
 syslog:
 F1004 09:08:26.307669    8807 server.go:274] failed to run Kubelet: running with swap on is not supported, please disable swap! or set --fail-swap-on flag to false. /proc/swaps contained: [Filename#011#011#011#011Type#011#011Size#011Used#011Priority /swap.img    
  • min 2 cpu are required on k8s master node
TASK [kubernetes_master : Initialize Kubernetes cluster] ***********************
02:46:04 ERROR cli.engine.ansible.AnsibleCommand - fatal: [ubu1804a]: FAILED! => {"changed": true, "cmd": "kubeadm init  --config /etc/kubeadm/kubeadm-config.yml\n", "delta": "0:00:00.472219", "end": "2021-10-03 02:46:04.260587", "msg": "non-zero return code", "rc": 1, "start": "2021-10-03 02:46:03.788368", "stderr": "W1003 02:46:03.937267   20378 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]\nerror execution phase preflight: [preflight] Some fatal errors occurred:\n\t[ERROR NumCPU]: the number of available CPUs 1 is less than the required 2\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": ["W1003 02:46:03.937267   20378 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]", "error execution phase preflight: [preflight] Some fatal errors occurred:", "\t[ERROR NumCPU]: the number of available CPUs 1 is less than the required 2", "[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.18.6\n[preflight] Running pre-flight checks", "stdout_lines": ["[init] Using Kubernetes version: v1.18.6", "[preflight] Running pre-flight checks"]}	

DoD checklist

  • Changelog updated
  • COMPONENTS.md updated / doesn't need to be updated
  • Schema updated / doesn't need to be updated
  • Feature has automated tests
  • Automated tests passed (QA pipelines)
    • apply
    • upgrade
  • Idempotency tested
  • Documentation added / updated / doesn't need to be updated
  • All conversations in PR resolved
  • Solution meets requirements and is done according to design doc
  • Usage compliant with license
  • Backport tasks created / doesn't need to be backported
@atsikham
Copy link
Contributor

@romsok24 could you elaborate a bit more about swap? I see that in common role that is always executed, swap is disabled, so interested in how you got that issue.

@atsikham atsikham self-assigned this Dec 20, 2021
@atsikham atsikham changed the title [FEATURE REQUEST] Add kubernetes prereqs to EPI preflight tests Add Kubernetes prereqs to epicli preflight checks Dec 20, 2021
@romsok24
Copy link
Contributor Author

It's been >2mth since I build this environment so would be hard to give many details... but what I can remember is the installation type: it was air-gapped infrastructure ( implemented as described here ) prepared by me before starting epicli. The infra was build with Hyper-V isolated switch. The VMs were manually installed from official Ubu18.04 iso image with default image.

@przemyslavic przemyslavic self-assigned this Dec 29, 2021
@seriva seriva closed this as completed Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants