Skip to content

Commit

Permalink
fix(provider/gce): Fix deploying instance without autohealing (#2481)
Browse files Browse the repository at this point in the history
  • Loading branch information
ezimanyi committed Apr 4, 2018
1 parent 935e4d2 commit 0414a9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,11 @@ class BasicGoogleDeployHandler implements DeployHandler<BasicGoogleDeployDescrip

// Note: Cache queries for these health checks must occur in this order since queryHealthCheck() will make a live
// call that fails on a missing health check.
def autoHealingHealthCheck = GCEUtil.queryNestedHealthCheck(project, description.accountName, description.autoHealingPolicy.healthCheck, compute, cacheView, task, BASE_PHASE, this) ?:
GCEUtil.queryHealthCheck(project, description.accountName, description.autoHealingPolicy.healthCheck, compute, cacheView, task, BASE_PHASE, this)
def autoHealingHealthCheck = null
if (description.autoHealingPolicy?.healthCheck) {
autoHealingHealthCheck = GCEUtil.queryNestedHealthCheck(project, description.accountName, description.autoHealingPolicy.healthCheck, compute, cacheView, task, BASE_PHASE, this) ?:
GCEUtil.queryHealthCheck(project, description.accountName, description.autoHealingPolicy.healthCheck, compute, cacheView, task, BASE_PHASE, this)
}

List<InstanceGroupManagerAutoHealingPolicy> autoHealingPolicy =
autoHealingHealthCheck
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ class UpsertGoogleAutoscalingPolicyAtomicOperation extends GoogleAtomicOperation
private buildAutoHealingPolicyFromAutoHealingPolicyDescription(GoogleAutoHealingPolicy autoHealingPolicyDescription, String project, Compute compute) {
// Note: Cache queries for these health checks must occur in this order since queryHealthCheck() will make a live
// call that fails on a missing health check.
def autoHealingHealthCheck = GCEUtil.queryNestedHealthCheck(project, description.accountName, description.autoHealingPolicy.healthCheck, compute, cacheView, task, BASE_PHASE, this) ?:
GCEUtil.queryHealthCheck(project, description.accountName, description.autoHealingPolicy.healthCheck, compute, cacheView, task, BASE_PHASE, this)
def autoHealingHealthCheck = GCEUtil.queryNestedHealthCheck(project, description.accountName, autoHealingPolicyDescription.healthCheck, compute, cacheView, task, BASE_PHASE, this) ?:
GCEUtil.queryHealthCheck(project, description.accountName, autoHealingPolicyDescription.healthCheck, compute, cacheView, task, BASE_PHASE, this)

List<InstanceGroupManagerAutoHealingPolicy> autoHealingPolicy = autoHealingPolicyDescription?.healthCheck
? [new InstanceGroupManagerAutoHealingPolicy(
Expand Down

0 comments on commit 0414a9e

Please sign in to comment.