Merge pull request #47115 from zhangxiaoyu-zidif/add-check-err-for-kubelet

Automatic merge from submit-queue (batch tested with PRs 47115, 51196, 51204, 51208, 51206)

Delete redundant err definition

**What this PR does / why we need it**:
Delete reduandant err definition
Line 307 has err definition and initialization.


**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-08-24 07:20:03 -07:00 committed by GitHub
commit 9537241702

View File

@ -351,7 +351,6 @@ func (kl *Kubelet) GetPodCgroupParent(pod *v1.Pod) string {
// GenerateRunContainerOptions generates the RunContainerOptions, which can be used by
// the container runtime to set parameters for launching a container.
func (kl *Kubelet) GenerateRunContainerOptions(pod *v1.Pod, container *v1.Container, podIP string) (*kubecontainer.RunContainerOptions, bool, error) {
var err error
useClusterFirstPolicy := false
cgroupParent := kl.GetPodCgroupParent(pod)
opts := &kubecontainer.RunContainerOptions{CgroupParent: cgroupParent}