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

fix(clouddriver): Only Disable Instances in Discovery When Discovery … #3971

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

evansb
Copy link
Contributor

@evansb evansb commented Oct 19, 2020

Copy link
Member

@robzienert robzienert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me, but would like more familiar eyes on it.

@@ -47,6 +47,7 @@ class DisableInstancesTask implements CloudProviderAware, Task {
String account = getCredentials(stage)

def serverGroupName = stage.context.serverGroupName ?: stage.context.asgName
def interestingHealthProviderNames = HealthHelper.getInterestingHealthProviderNames(stage, ["LoadBalancer"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most stages aren't going to have interestingHealthProviderNames explicitly defined right?

With this change I feel we're going to miss out on Discovery in almost all cases right?

We do have the DetermineHealthProvidersTask but it's provider-specific and doesn't look at underlying account attributes.

Copy link
Contributor

@ajordens ajordens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe this will work in places that we actually expect Discovery?

@evansb evansb force-pushed the discovery-rollingpush branch from 1c9a9e2 to 7cb8c95 Compare October 28, 2020 22:29
@evansb
Copy link
Contributor Author

evansb commented Oct 28, 2020

Thanks for the feedback @ajordens , I reverted back to ["Discovery", "LoadBalancer"] if interestingHealthProviderNames is not defined. I am still not sure if this is the right approach, but I cannot find a better way to detect if Discovery is enabled for a specific account.

Another way to fix this that I found is to make this no-op instead of fatal but I feel this is intended to detect misconfiguration https://github.com/spinnaker/clouddriver/blob/752bebc664da84b04918fbb15643e07c9cb0ff1a/clouddriver-aws/src/main/groovy/com/netflix/spinnaker/clouddriver/aws/deploy/ops/discovery/AbstractEnableDisableInstanceDiscoveryAtomicOperation.groovy#L52

@ajordens
Copy link
Contributor

ajordens commented Nov 5, 2020

Still thinking about this but don't have a great answer.

In the past, we have bounced around ideas of allowing an application to declare it's health signals more than just "only platform" or not.

We do have an DetermineHealthProvidersTask class that can adjust interestingHealthProviderNames based on the provider.

It might be possible to support something that looks at what is supported by the account (rather than just the provider).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rolling Push Strategy Seems to Require Eureka by Default
3 participants