Files
kubernetes/test/e2e
Kubernetes Submit Queue d71154b910 Merge pull request #36439 from kargakis/update-rollover-test
Automatic merge from submit-queue

test: update rollover test to wait for available rs before adopting

Scenario that happened in https://github.com/kubernetes/kubernetes/issues/35355#issuecomment-257808460

-- Replica set that is about to be adopted has 2 out of 4 ready replicas
-- Deployment is created with 4 replicas, adopts pre-existing replica set, creates a new one, and starts rolling replicas over to the new replica set.
```
Nov  2 01:38:17.088: INFO: At 2016-11-02 01:38:04 -0700 PDT - event for test-rollover-deployment: {deployment-controller } ScalingReplicaSet: Scaled down replica set test-rollover-controller to 3
Nov  2 01:38:17.088: INFO: At 2016-11-02 01:38:04 -0700 PDT - event for test-rollover-deployment: {deployment-controller } ScalingReplicaSet: Scaled up replica set test-rollover-deployment-2505289747 to 1
Nov  2 01:38:17.088: INFO: At 2016-11-02 01:38:04 -0700 PDT - event for test-rollover-deployment-2505289747: {replicaset-controller } SuccessfulCreate: Created pod: test-rollover-deployment-2505289747-iuiei
Nov  2 01:38:17.088: INFO: At 2016-11-02 01:38:04 -0700 PDT - event for test-rollover-deployment-2505289747-iuiei: {default-scheduler } Scheduled: Successfully assigned test-rollover-deployment-2505289747-iuiei to gke-jenkins-e2e-default-pool-33c0400e-6q5m
Nov  2 01:38:17.088: INFO: At 2016-11-02 01:38:05 -0700 PDT - event for test-rollover-deployment: {deployment-controller } ScalingReplicaSet: Scaled up replica set test-rollover-deployment-2505289747 to 2
```
At this point there is no minimum availability for the Deployment (maxUnavailable is 1 meaning desired minimum available is 3 but we only have 2), and the new replica set uses a non-existent image. New replica set is scaled up to 1 (maxSurge is 1), then old replica set is scaled down by one, because cleanupUnhealthyReplicas observes that it has 2 unhealthy replicas - it can only scale down one though because the [maximum replicas it can cleanup is one](d87dfa2723/pkg/controller/deployment/rolling.go (L125)) (4+1-3-1). New replica set is scaled to 2. Available replicas are still 2 (third replica from the old replica set has yet to come up).
-- Deployment is rolled over with a new update. Test reaches for the WaitForDeploymentStatus check but there are only 2 availableReplicas (maxUnavailable is still violated).

This change makes the test wait for a healthy replica set before proceeding thus it should never hit the scenario described above.

@kubernetes/deployment
2016-12-02 12:48:44 -08:00
..
2016-10-21 17:32:32 -07:00
2016-10-21 17:32:32 -07:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 22:30:47 -06:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 22:30:47 -06:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-09-15 18:38:01 -04:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-24 11:52:31 +01:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00
2016-11-23 15:53:09 -08:00