Skip to content

Commit

Permalink
fix startError because removing the checkpoint info is too fast
Browse files Browse the repository at this point in the history
  • Loading branch information
vutuong committed May 24, 2021
1 parent cc47696 commit 69727b4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 431 deletions.
13 changes: 7 additions & 6 deletions controllers/podmigration_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,20 +165,21 @@ func (r *PodmigrationReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error
for {
status, _ := r.checkPodExist(ctx, newPod.Name, req.Namespace)
if status != nil {
log.Info("", "Live-migration", "Step 4.1 - Check whether if newPod is Running or not - completed"+status.Name+string(status.Status.Phase))
break
} else {
time.Sleep(200 * time.Millisecond)
}
}
log.Info("", "Live-migration", "Step 4.1 - Check whether if newPod is Running or not - completed")
// Step5: Clean checkpointpod process and checkpointPath
if err := r.removeCheckpointPod(ctx, sourcePod, "/var/lib/kubelet/migration/kkk", newPod.Name, req.Namespace); err != nil {
log.Error(err, "unable to remove checkpoint", "pod", sourcePod)
return ctrl.Result{}, err
}
log.Info("", "Live-migration", "Step 5 - Clean checkpointPod process and checkpointPath - completed")
// if err := r.removeCheckpointPod(ctx, sourcePod, "/var/lib/kubelet/migration/kkk", newPod.Name, req.Namespace); err != nil {
// log.Error(err, "unable to remove checkpoint", "pod", sourcePod)
// return ctrl.Result{}, err
// }
// log.Info("", "Live-migration", "Step 5 - Clean checkpointPod process and checkpointPath - completed")

// Step6: Delete source Pod
// // Step6: Delete source Pod
if err := r.deletePod(ctx, sourcePod); err != nil {
log.Error(err, "unable to delete", "source pod", sourcePod)
return ctrl.Result{}, err
Expand Down
287 changes: 0 additions & 287 deletions latency-monitor/latency.go

This file was deleted.

38 changes: 0 additions & 38 deletions latency-monitor/latency_test.go

This file was deleted.

Loading

0 comments on commit 69727b4

Please sign in to comment.