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

Prevent container orphans when using apiserver.IsRunningWrapper #6329

Merged

Conversation

xrstf
Copy link
Contributor

@xrstf xrstf commented Dec 28, 2020

What this PR does / why we need it:
When the IsRunningWrapper() function is fiddling with initContainers, we must make sure we only accept and deal with a known state. Otherwise it can happen that old init containers are left behind or copies are never cleaned up.

Which issue(s) this PR fixes:
Fixes #6328

Does this PR introduce a user-facing change?:

[ATTN] Fix orphaned apiserver-is-running initContainers in usercluster controlplane. This can cause a short reconciliation burst to bring older usercluster resources in all Seed clusters up to date. Tune the maxReconcileLimit if needed.

@kubermatic-bot kubermatic-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 28, 2020
@xrstf
Copy link
Contributor Author

xrstf commented Dec 28, 2020

/cherrypick release/v2.14
/cherrypick release/v2.15

@kubermatic-bot
Copy link
Contributor

@xrstf: once the present PR merges, I will cherry-pick it on top of release/v2.14 in a new PR and assign it to you.

In response to this:

/cherrypick release/v2.14
/cherrypick release/v2.15

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@xrstf xrstf changed the title Explicitly set initContainers to orphans when using apiserver.IsRunningWrapper Explicitly set initContainers to fix orphans when using apiserver.IsRunningWrapper Dec 28, 2020
@xrstf xrstf changed the title Explicitly set initContainers to fix orphans when using apiserver.IsRunningWrapper Prevent container orphans when using apiserver.IsRunningWrapper Dec 28, 2020
@xrstf
Copy link
Contributor Author

xrstf commented Dec 28, 2020

/retest

Copy link
Member

@kron4eg kron4eg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/retest
/lgtm
/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 29, 2020
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 833f68e310797d43d9a3a164b19d43b2100d2345

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kron4eg, xrstf

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@xrstf
Copy link
Contributor Author

xrstf commented Dec 29, 2020

/retest

1 similar comment
@xrstf
Copy link
Contributor Author

xrstf commented Dec 29, 2020

/retest

@kubermatic-triage-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs

Review the full test history

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

Also, here is a cat.
/meow

@kubermatic-bot
Copy link
Contributor

@kubermatic-triage-bot: cat image

In response to this:

/retest
This bot automatically retries jobs that failed/flaked on approved PRs

Review the full test history

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

Also, here is a cat.
/meow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@kubermatic-triage-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs

Review the full test history

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

Also, here is a cat.
/meow

@kubermatic-bot
Copy link
Contributor

@kubermatic-triage-bot: cat image

In response to this:

/retest
This bot automatically retries jobs that failed/flaked on approved PRs

Review the full test history

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

Also, here is a cat.
/meow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@kubermatic-triage-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs

Review the full test history

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

Also, here is a cat.
/meow

@kubermatic-bot
Copy link
Contributor

@kubermatic-triage-bot: cat image

In response to this:

/retest
This bot automatically retries jobs that failed/flaked on approved PRs

Review the full test history

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

Also, here is a cat.
/meow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@kubermatic-triage-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs

Review the full test history

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

Also, here is a cat.
/meow

@kubermatic-bot
Copy link
Contributor

@kubermatic-triage-bot: cat image

In response to this:

/retest
This bot automatically retries jobs that failed/flaked on approved PRs

Review the full test history

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

Also, here is a cat.
/meow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@kubermatic-triage-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs

Review the full test history

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

Also, here is a cat.
/meow

@kubermatic-bot
Copy link
Contributor

@kubermatic-triage-bot: cat image

In response to this:

/retest
This bot automatically retries jobs that failed/flaked on approved PRs

Review the full test history

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

Also, here is a cat.
/meow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@kron4eg
Copy link
Member

kron4eg commented Dec 29, 2020

/retest

@kubermatic-bot kubermatic-bot merged commit 65ec648 into kubermatic:master Dec 29, 2020
@kubermatic-bot
Copy link
Contributor

@xrstf: #6329 failed to apply on top of branch "release/v2.14":

Applying: explicitly set initContainers to orphans when using apiserver.IsRunningWrapper
Using index info to reconstruct a base tree...
A	pkg/controller/seed-controller-manager/openshift/resources/cloud_credential_operator.go
A	pkg/controller/seed-controller-manager/openshift/resources/console.go
A	pkg/controller/seed-controller-manager/openshift/resources/dns_operator.go
A	pkg/controller/seed-controller-manager/openshift/resources/kube_controller_manager.go
A	pkg/controller/seed-controller-manager/openshift/resources/kube_scheduler.go
A	pkg/controller/seed-controller-manager/openshift/resources/oauth.go
A	pkg/controller/seed-controller-manager/openshift/resources/openshift_apiserver_deployment.go
A	pkg/controller/seed-controller-manager/openshift/resources/openshift_controller_manager.go
A	pkg/controller/seed-controller-manager/openshift/resources/openshift_network_operator.go
A	pkg/controller/seed-controller-manager/openshift/resources/registry_operator.go
A	pkg/resources/clusterautoscaler/clusterautoscaler.go
A	pkg/resources/controllermanager/deployment.go
A	pkg/resources/gatekeeper/deployment.go
A	pkg/resources/kubernetes-dashboard/deployment.go
A	pkg/resources/kubestatemetrics/deployment.go
A	pkg/resources/machinecontroller/deployment.go
A	pkg/resources/machinecontroller/webhook.go
A	pkg/resources/metrics-server/deployment.go
A	pkg/resources/scheduler/deployment.go
A	pkg/resources/usercluster/deployment.go
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): pkg/resources/gatekeeper/deployment.go deleted in HEAD and modified in explicitly set initContainers to orphans when using apiserver.IsRunningWrapper. Version explicitly set initContainers to orphans when using apiserver.IsRunningWrapper of pkg/resources/gatekeeper/deployment.go left in tree.
Auto-merging api/pkg/resources/usercluster/deployment.go
Auto-merging api/pkg/resources/scheduler/deployment.go
Auto-merging api/pkg/resources/metrics-server/deployment.go
Auto-merging api/pkg/resources/machinecontroller/webhook.go
Auto-merging api/pkg/resources/machinecontroller/deployment.go
Auto-merging api/pkg/resources/kubestatemetrics/deployment.go
Auto-merging api/pkg/resources/kubernetes-dashboard/deployment.go
Auto-merging api/pkg/resources/controllermanager/deployment.go
Auto-merging api/pkg/resources/clusterautoscaler/clusterautoscaler.go
Auto-merging api/pkg/controller/seed-controller-manager/openshift/resources/registry_operator.go
Auto-merging api/pkg/controller/seed-controller-manager/openshift/resources/openshift_network_operator.go
Auto-merging api/pkg/controller/seed-controller-manager/openshift/resources/openshift_controller_manager.go
Auto-merging api/pkg/controller/seed-controller-manager/openshift/resources/openshift_apiserver_deployment.go
Auto-merging api/pkg/controller/seed-controller-manager/openshift/resources/oauth.go
Auto-merging api/pkg/controller/seed-controller-manager/openshift/resources/kube_scheduler.go
Auto-merging api/pkg/controller/seed-controller-manager/openshift/resources/kube_controller_manager.go
Auto-merging api/pkg/controller/seed-controller-manager/openshift/resources/dns_operator.go
Auto-merging api/pkg/controller/seed-controller-manager/openshift/resources/console.go
Auto-merging api/pkg/controller/seed-controller-manager/openshift/resources/cloud_credential_operator.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 explicitly set initContainers to orphans when using apiserver.IsRunningWrapper
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release/v2.14
/cherrypick release/v2.15

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@xrstf xrstf deleted the fix-init-container-reconciling branch January 12, 2021 12:24
multi-io pushed a commit to multi-io/kubermatic that referenced this pull request May 15, 2022
…rmatic#6329)

* explicitly set initContainers to orphans when using apiserver.IsRunningWrapper

* fix download-gocache Make target being phony by accident
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InitContainers are not reconciled in User Clusters
4 participants