Skip to content

Commit

Permalink
feat(provider/google): explicitly fail if a request tries to change s…
Browse files Browse the repository at this point in the history
…ession affinity while there are connected instances

spinnaker/spinnaker#3521
  • Loading branch information
aleksandrov authored and maggieneterval committed Oct 15, 2019
1 parent 685ec69 commit de4839d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ class UpsertGoogleLoadBalancerAtomicOperation extends GoogleAtomicOperation<Map>
def targetPoolResourceOperation
def targetPoolResourceLink

if (needToUpdateSessionAffinity && existingTargetPool.instances.any()) {
task.updateStatus BASE_PHASE, "Impossible to change Session Affinity for target pool $targetPoolName with existing instances in $region"
task.fail()
}

// There's a chance that the target pool doesn't in fact get updated. If needToUpdateTargetPool was set because
// the description.instances property was specified, but the specified set matches the existing set of instances,
// no updates will be made to the target pool.
Expand Down

0 comments on commit de4839d

Please sign in to comment.