mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 05:01:46 +00:00
Rename ID -> Name
This commit is contained in:
@@ -73,10 +73,10 @@ func (kl *Kubelet) runOnce(pods []api.BoundPod) (results []RunPodResult, err err
|
||||
results = append(results, res)
|
||||
if res.Err != nil {
|
||||
// TODO(proppy): report which containers failed the pod.
|
||||
glog.Infof("failed to start pod %q: %v", res.Pod.ID, res.Err)
|
||||
failedPods = append(failedPods, res.Pod.ID)
|
||||
glog.Infof("failed to start pod %q: %v", res.Pod.Name, res.Err)
|
||||
failedPods = append(failedPods, res.Pod.Name)
|
||||
} else {
|
||||
glog.Infof("started pod %q", res.Pod.ID)
|
||||
glog.Infof("started pod %q", res.Pod.Name)
|
||||
}
|
||||
}
|
||||
if len(failedPods) > 0 {
|
||||
@@ -100,18 +100,18 @@ func (kl *Kubelet) runPod(pod api.BoundPod) error {
|
||||
return fmt.Errorf("failed to check pod status: %v", err)
|
||||
}
|
||||
if running {
|
||||
glog.Infof("pod %q containers running", pod.ID)
|
||||
glog.Infof("pod %q containers running", pod.Name)
|
||||
return nil
|
||||
}
|
||||
glog.Infof("pod %q containers not running: syncing", pod.ID)
|
||||
glog.Infof("pod %q containers not running: syncing", pod.Name)
|
||||
if err = kl.syncPod(&pod, dockerContainers); err != nil {
|
||||
return fmt.Errorf("error syncing pod: %v", err)
|
||||
}
|
||||
if retry >= RunOnceMaxRetries {
|
||||
return fmt.Errorf("timeout error: pod %q containers not running after %d retries", pod.ID, RunOnceMaxRetries)
|
||||
return fmt.Errorf("timeout error: pod %q containers not running after %d retries", pod.Name, RunOnceMaxRetries)
|
||||
}
|
||||
// TODO(proppy): health checking would be better than waiting + checking the state at the next iteration.
|
||||
glog.Infof("pod %q containers synced, waiting for %v", pod.ID, delay)
|
||||
glog.Infof("pod %q containers synced, waiting for %v", pod.Name, delay)
|
||||
<-time.After(delay)
|
||||
retry++
|
||||
delay *= RunOnceRetryDelayBackoff
|
||||
|
Reference in New Issue
Block a user