Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not handle AlreadyExists errors yet #36584

Merged
merged 1 commit into from Nov 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/controller/deployment/deployment_controller.go
Expand Up @@ -301,6 +301,7 @@ func (dc *DeploymentController) handleErr(err error, key interface{}) {
}

utilruntime.HandleError(err)
glog.V(2).Infof("Dropping deployment %q out of the queue: %v", key, err)
dc.queue.Forget(key)
}

Expand Down
6 changes: 4 additions & 2 deletions pkg/controller/deployment/sync.go
Expand Up @@ -357,8 +357,10 @@ func (dc *DeploymentController) getNewReplicaSet(deployment *extensions.Deployme
createdRS, err := dc.client.Extensions().ReplicaSets(namespace).Create(&newRS)
switch {
// We may end up hitting this due to a slow cache or a fast resync of the deployment.
case errors.IsAlreadyExists(err):
return dc.rsLister.ReplicaSets(namespace).Get(newRS.Name)
// TODO: Restore once https://github.com/kubernetes/kubernetes/issues/29735 is fixed
// ie. we start using a new hashing algorithm.
// case errors.IsAlreadyExists(err):
// return dc.rsLister.ReplicaSets(namespace).Get(newRS.Name)
case err != nil:
msg := fmt.Sprintf("Failed to create new replica set %q: %v", newRS.Name, err)
if deployment.Spec.ProgressDeadlineSeconds != nil {
Expand Down