[MANOPD-77175] add ignorePreflightErrors support #185
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
During init, join, ugrade procedures kubeadm runs
preflight
procedure to do some preliminary checks. In case of any error kubeadm stops working. Sometimes it is necessary to ignore some preflight errors to deploy or upgrade successfully (for example, if /var/lib/etcd contains files/folders which cannot be removed).Fixes # (issue)
MANOPD-77175
Solution
New section is added to the inventory:
Default errors included in
ignorePreflightErrors
arePort-6443
,CoreDNSUnsupportedPlugins
. Previously they were hardcoded in the corresponding commands.Custom ignorePreflightErrors settings from cluster.yaml are added to default values from defaults.yaml and duplicates are removed.
How to apply
None
Test Cases
TestCase 1
Deploy a cluster with 3 masters and at least 1 worker. cluster.yaml doesn't contain
kubeadm_flags
section (default settings are used).ER: the cluster is deployed successfully.
TestCase 2
Upgrade the cluster from TestCase 1 to the next kubernetes version.
ER: the cluster is upgraded successfully.
TestCase 3
Deploy a cluster with 3 masters and at least 1 worker. cluster.yaml contains
kubeadm_flags
section which includesPort-6443
,CoreDNSUnsupportedPlugins
and something else. For example,DirAvailable--var-lib-etcd
,Swap
,blah-blah-blah
.ER: the cluster is deployed successfully.
TestCase 4
Upgrade the cluster from TestCase 3 to the next kubernetes version.
ER: the cluster is upgraded successfully.
Checklist
Unit tests
Indicate new or changed unit tests and what they do, if any.