node: e2e: add test for the checkpoint recovery
Add a e2e test to exercise the checkpoint recovery flow. This means we need to actually create a old (V1, pre-1.20) checkpoint, but if we do it only in the e2e test, it's still fine. Signed-off-by: Francesco Romani <fromani@redhat.com>
This commit is contained in:
@@ -452,6 +452,18 @@ func stopKubelet() func() {
|
||||
}
|
||||
}
|
||||
|
||||
// killKubelet sends a signal (SIGINT, SIGSTOP, SIGTERM...) to the running kubelet
|
||||
func killKubelet(sig string) {
|
||||
kubeletServiceName := findKubeletServiceName(true)
|
||||
|
||||
// reset the kubelet service start-limit-hit
|
||||
stdout, err := exec.Command("sudo", "systemctl", "reset-failed", kubeletServiceName).CombinedOutput()
|
||||
framework.ExpectNoError(err, "Failed to reset kubelet start-limit-hit with systemctl: %v, %v", err, stdout)
|
||||
|
||||
stdout, err = exec.Command("sudo", "systemctl", "kill", "-s", sig, kubeletServiceName).CombinedOutput()
|
||||
framework.ExpectNoError(err, "Failed to stop kubelet with systemctl: %v, %v", err, stdout)
|
||||
}
|
||||
|
||||
func kubeletHealthCheck(url string) bool {
|
||||
insecureTransport := http.DefaultTransport.(*http.Transport).Clone()
|
||||
insecureTransport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
|
||||
|
Reference in New Issue
Block a user