Skip to content

Instance profiles don't get attached when instance pools are imported  #298

@veenaramesh

Description

@veenaramesh

During clusters import, if the cluster has an instance pool attached, the import will go to the function cleanup_cluster_pool_configs (to update the cluster config properly). In the function cleanup_cluster_pool_configs (dbclient/ClustersClient.py line 44), however, the last bit I think has a logical error:

        # remove all aws_attr except for IAM role if it exists
        if 'aws_attributes' in cluster_json:
            aws_conf = cluster_json.pop('aws_attributes')
            iam_role = aws_conf.get('instance_profile_arn', None)
            if not iam_role: 
                cluster_json['aws_attributes'] = {'instance_profile_arn': iam_role}

        return cluster_json

if not iam_role: should actually be if iam_role:. Currently, the instance profile is only added if there is no instance profile.
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions