aws-samples/aws-codedeploy-samples

continue if the instance is not part of the ELB (deregister_from_elb.sh)

maxtorzito opened this issue · 2 comments

Hi using the deregister_from_elb.sh script i notice when i run on an instance that is not part (this could happen for many reasons) of the ELB (already defined on common_functions.sh) the script checks 10 times every 30 seconds if the instance is not part of the ELB.

Why not if the instance is not part of the ELB just continue (exit the script)?

What do you think?

Can you explain your use case? The scripts assume all the instances are either part of an Autoscaling group or directly behind an ELB.

eddca commented

I am having the same issue @maxtorzito
ELB scripts had _ANY_ option to allow us to deal with this situation but ELB v2 does not have this option. Seems like new developer removed that option away :(

I really need it :(


@suryanarayanan: use case is simple. Machine is not part of an ASG at that moment for various reasons but we still wanna have the flexibility to deploy the code without failing.

Please take a look at this: https://github.com/awslabs/aws-codedeploy-samples/blob/master/load-balancing/elb/common_functions.sh#L19-L20

Feature was exist in ELB but got removed in ELB v2