Bug 1840358
| Summary: | Possible to delete 2 masters simultaneously if kubelet unreachable | |||
|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Michael Gugino <mgugino> | |
| Component: | Cloud Compute | Assignee: | Michael Gugino <mgugino> | |
| Cloud Compute sub component: | Other Providers | QA Contact: | sunzhaohua <zhsun> | |
| Status: | CLOSED ERRATA | Docs Contact: | ||
| Severity: | low | |||
| Priority: | unspecified | CC: | agarcial, mimccune, wking | |
| Version: | 4.6 | |||
| Target Milestone: | --- | |||
| Target Release: | 4.6.0 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1884195 (view as bug list) | Environment: | ||
| Last Closed: | 2020-10-27 16:01:40 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1884195 | |||
|
Description
Michael Gugino
2020-05-26 19:07:21 UTC
Looking into this some, etcd-quorum-guard only tolerates NoExecute and NoSchedule for a short time (120) seconds. After that point, the NodeLifeCycleManager scheduler will delete it. Once the pod is marked for deletion, it will not hang up our draining process. On the flip side, if I remove the TolerationSeconds and the pod tolerates the condition indefinitely, then drain is blocked indefinitely by this issue: https://github.com/kubernetes/kubernetes/issues/80389#issuecomment-634429215 Which means, even if we modify the LifeCycleManager to utilize eviction rather than delete, we're still in a race with PDBs because once the pod goes Ready: False, PDBs will block us. This can be mitigated with the following two PRs combined: https://github.com/kubernetes/kubernetes/pull/83906 and https://github.com/kubernetes/kubernetes/pull/81175 The latter PR needs to be updated, but the basic premise is that we can validate the PDBs actually have minAvailable or Desired - Disrupted, then we know we can safely evict the not-ready pod because it's already not counted towards the PDBs. > While the test procedure is entirely contrived.
While I was shadowing SRE yesterday, we saw a cluster in exactly this situation (one happy control-plane machine, one with a happy etcd member but dead kubelet, and one with both the etcd member and kubelet dead). To recover, we exec'ed into the etcd member on the fully-healthy node, ran some etcdctl to find the fully dead node, bounced that node, waited for its etcd member to rejoin, and then bounced the semy-healthy node. It recovered the cluster, but involved more poking around under the hood than I'd have liked ;).
(In reply to W. Trevor King from comment #2) > > While the test procedure is entirely contrived. > > While I was shadowing SRE yesterday, we saw a cluster in exactly this > situation (one happy control-plane machine, one with a happy etcd member but > dead kubelet, and one with both the etcd member and kubelet dead). To > recover, we exec'ed into the etcd member on the fully-healthy node, ran some > etcdctl to find the fully dead node, bounced that node, waited for its etcd > member to rejoin, and then bounced the semy-healthy node. It recovered the > cluster, but involved more poking around under the hood than I'd have liked > ;). Wow, great feedback. I was uncertain how often or likely this would happen out in the real world. These situations can certainly be tricky for our users. Once we have control-plane replacement automation and MachineHealthChecks, we can account for this scenario in a variety of ways, though the reboot case is a tricky one. Verified clusterversion:4.6.0-0.nightly-2020-09-26-202331 1. Stop the kubelet on 2/3 master nodes 2. Delete first stopped master via machine-api 3. Delete second stopped master via machine-api Nither could be deleted. % ./oc get node NAME STATUS ROLES AGE VERSION ip-10-0-141-237.us-east-2.compute.internal Ready worker 7h36m v1.19.0+fff8183 ip-10-0-144-243.us-east-2.compute.internal NotReady master 7h46m v1.19.0+fff8183 ip-10-0-179-155.us-east-2.compute.internal Ready worker 7h36m v1.19.0+fff8183 ip-10-0-180-200.us-east-2.compute.internal NotReady master 7h45m v1.19.0+fff8183 ip-10-0-212-210.us-east-2.compute.internal Ready master 7h45m v1.19.0+fff8183 ip-10-0-221-81.us-east-2.compute.internal Ready worker 7h36m v1.19.0+fff8183 % ./oc get machine NAME PHASE TYPE REGION ZONE AGE zhsun927aws-b2hfl-master-0 Running m5.xlarge us-east-2 us-east-2a 7h54m zhsun927aws-b2hfl-master-1 Running m5.xlarge us-east-2 us-east-2b 7h54m zhsun927aws-b2hfl-master-2 Running m5.xlarge us-east-2 us-east-2c 7h54m zhsun927aws-b2hfl-worker-us-east-2a-l42dg Running m5.large us-east-2 us-east-2a 7h40m zhsun927aws-b2hfl-worker-us-east-2b-tdvj6 Running m5.large us-east-2 us-east-2b 7h40m zhsun927aws-b2hfl-worker-us-east-2c-9d2g2 Running m5.large us-east-2 us-east-2c 7h40m % ./oc delete machine zhsun927aws-b2hfl-master-0 machine.machine.openshift.io "zhsun927aws-b2hfl-master-0" deleted ^C % ./oc delete machine zhsun927aws-b2hfl-master-1 machine.machine.openshift.io "zhsun927aws-b2hfl-master-1" deleted ^C Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (OpenShift Container Platform 4.6 GA Images), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:4196 |