Skip to content

Duplicate API calls (describe-subnets) in cluster build #73

@KashifSaadat

Description

@KashifSaadat

The addition of logging has highlighted duplication of certain API calls. On creating a full cluster (master & compute nodes), the describe-subnets ec2 API is called a minimum of 4 times (can increase depending on the amount of compute pools defined). Additionally, on building computepool0 the call to the API passes 5 subnets when only 3 were initially defined (2 ids were duplicated).

Example Logs:

[debug] 2017/06/28 09:50:55 aws.go:699: describing a list of subnets [subnet-XXXXXX01 subnet-XXXXXX02 subnet-XXXXXX03]
[debug] 2017/06/28 09:50:55 aws.go:707: received subnets description: [3 subnet objects]
..
[debug] 2017/06/28 09:52:01 aws.go:699: describing a list of subnets [subnet-XXXXXX01 subnet-XXXXXX01 subnet-XXXXXX02 subnet-XXXXXX02 subnet-XXXXXX03]
[debug] 2017/06/28 09:52:01 aws.go:707: received subnets description: [3 subnet objects]

The providers could potentially have a method of maintaining a local cache for certain API calls, so if the same subnet IDs are passed the details can be returned immediately.

Is there any case where the data may change mid build, requiring a re-fetch?

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