kubernetes/pkg/controller/deployment
Kubernetes Submit Queue 47320fd3f0 Merge pull request #42938 from enisoc/orphan-race
Automatic merge from submit-queue

GC: Fix re-adoption race when orphaning dependents.

**What this PR does / why we need it**:

The GC expects that once it sees a controller with a non-nil
DeletionTimestamp, that controller will not attempt any adoption.
There was a known race condition that could cause a controller to
re-adopt something orphaned by the GC, because the controller is using a
cached value of its own spec from before DeletionTimestamp was set.

This fixes that race by doing an uncached quorum read of the controller
spec just before the first adoption attempt. It's important that this
read occurs after listing potential orphans. Note that this uncached
read is skipped if no adoptions are attempted (i.e. at steady state).

**Which issue this PR fixes**:

Fixes #42639

**Special notes for your reviewer**:

**Release note**:
```release-note
```

cc @kubernetes/sig-apps-pr-reviews
2017-03-20 01:30:11 -07:00
..
util kubectl: Use v1.5-compatible ownership logic when listing dependents. 2017-03-16 12:28:38 -07:00
BUILD Deployment: Use ControllerRef to route watch events. 2017-03-06 15:12:07 -08:00
deployment_controller_test.go Merge pull request #42938 from enisoc/orphan-race 2017-03-20 01:30:11 -07:00
deployment_controller.go Merge pull request #42938 from enisoc/orphan-race 2017-03-20 01:30:11 -07:00
OWNERS Update OWNERS for pkg/controller/deployment 2017-01-26 10:24:52 -08:00
progress_test.go controller: fix requeueing progressing deployments 2017-02-20 18:19:23 +01:00
progress.go Deployment: Use ControllerRef to list controlled objects. 2017-03-06 15:12:06 -08:00
recreate_test.go react to informer updates 2017-02-13 09:18:32 -05:00
recreate.go Deployment: Use ControllerRef to list controlled objects. 2017-03-06 15:12:06 -08:00
rollback.go Deployment: Use ControllerRef to list controlled objects. 2017-03-06 15:12:06 -08:00
rolling_test.go move client/record 2017-01-31 19:14:13 -05:00
rolling.go Deployment: Use ControllerRef to list controlled objects. 2017-03-06 15:12:06 -08:00
sync_test.go react to informer updates 2017-02-13 09:18:32 -05:00
sync.go Fix revision when SetDeploymentRevision 2017-03-17 23:23:41 +08:00