From c2cb357e7dd647bf03776314cf9df0c210360f77 Mon Sep 17 00:00:00 2001 From: Phil Kates Date: Mon, 6 Feb 2017 11:38:34 -0800 Subject: [PATCH] Return correct ProviderID format from GetAsgNodes This matches the way that the [gce does it][1] and fixes issues with the [cluster state][2]. 1: https://github.com/kubernetes/contrib/blob/master/cluster-autoscaler/cloudprovider/gce/gce_manager.go#L247 2: https://github.com/kubernetes/contrib/issues/2228#issuecomment-274896211 --- cluster-autoscaler/cloudprovider/aws/aws_manager.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cluster-autoscaler/cloudprovider/aws/aws_manager.go b/cluster-autoscaler/cloudprovider/aws/aws_manager.go index 0e33113f16..29f292e267 100644 --- a/cluster-autoscaler/cloudprovider/aws/aws_manager.go +++ b/cluster-autoscaler/cloudprovider/aws/aws_manager.go @@ -224,7 +224,8 @@ func (m *AwsManager) GetAsgNodes(asg *Asg) ([]string, error) { return []string{}, err } for _, instance := range group.Instances { - result = append(result, *instance.InstanceId) + result = append(result, + fmt.Sprintf("aws:///%s/%s", *instance.AvailabilityZone, *instance.InstanceId)) } return result, nil }