couchbaselabs / mobile-testkit

Mobile QE Test Framework
15 stars 12 forks source link

pool.json incorrectly generated from AWS #1299

Open sethrosetter opened 7 years ago

sethrosetter commented 7 years ago

https://github.com/couchbaselabs/mobile-testkit/blob/feature/fix-aws-pool-generation/libraries/provision/generate_pools_json_from_aws.py

I'm pretty sure this PR broke the script - https://github.com/couchbaselabs/mobile-testkit/pull/993

I was generating against a cloudformation with the following resources 1 Sync Gateway 1 Couchbase Server 1 Load Generate

Below, the Sync Gateway node assigned the wrong tag

+ cat resources/pools.json
{
    "ip_to_node_type": {
        "ec2-XXX": "couchbase_servers",
        "ec2-XXX": "load_generators",
        "ec2-XXX": "sg_accels"
    },
    "ips": [
        "ec2-XXX",
        "ec2-XXX",
        "ec2-XXX"
    ],
    "private_dns_names": [
        "ip-XXX",
        "ip-XXXl",
        "ip-XXXl"
    ]
}+
sethrosetter commented 7 years ago

@raghusarangapani @tleyden Is this maybe an off by one issue? Why have we not seen this with the latest perf runs?

raghusarangapani commented 7 years ago

May be something changed on the EC2 side? We are looking for "CacheType" string in instance.tags:

https://github.com/couchbaselabs/mobile-testkit/pull/993/files#diff-987c8c19aa670fbd3750be78970113faR148

raghusarangapani commented 7 years ago

I ran the script against ThreeDayLongevityTest and here is what I see:

"ip_to_node_type": { "ec2-XXX": "load_generators", "ec2-XXX": "couchbase_servers", "ec2-XXX": "couchbase_servers", "ec2-XXX": "sync_gateways", "ec2-XXX": "couchbase_servers", "ec2-XXX": "sg_accels", "ec2-XXX": "load_generators", "ec2-XXX": "couchbase_servers", "ec2-XXX": "couchbase_servers", "ec2-XXX": "sync_gateways", "ec2-XXX": "couchbase_servers", "ec2-XXX": "sync_gateways" }

The generate_pools_json_from_aws.py has the below logic:

if instance_type == "syncgateway":
        # Deal with special case for sg accels
        if 'CacheType' in instance.tags:
            return "sg_accels"

Traun, since you added this code, can you take a stab at this?