newsapps / beeswithmachineguns

A utility for arming (creating) many bees (micro EC2 instances) to attack (load test) targets (web applications).
http://apps.chicagotribune.com/
MIT License
6.43k stars 631 forks source link

Unable to `bees up` if putting the spot instance bid flag in #209

Closed siutsin closed 2 years ago

siutsin commented 6 years ago

With --bid:

$ bees up --servers=4 --group=bees --key=bees-key --login=ubuntu -i ami-xxxxxxxx -z ap-southeast-1a --bid=0.02
Connecting to the hive.
GroupId found: bees
Placement: ap-southeast-1a
Attempting to call up 4 spot bees, this can take a while...
Traceback (most recent call last):
  File "/usr/local/bin/bees", line 6, in <module>
    main.main()
  File "/usr/local/lib/python3.6/site-packages/beeswithmachineguns/main.py", line 277, in main
    parse_options()
  File "/usr/local/lib/python3.6/site-packages/beeswithmachineguns/main.py", line 216, in parse_options
    bees.up(options.servers, options.group, options.zone, options.instance, options.type, options.login, options.key, options.subnet, options.tags, options.bid)
  File "/usr/local/lib/python3.6/site-packages/beeswithmachineguns/bees.py", line 200, in up
    subnet_id=subnet)
  File "/usr/local/lib/python3.6/site-packages/boto/ec2/connection.py", line 1647, in request_spot_instances
    verb='POST')
  File "/usr/local/lib/python3.6/site-packages/boto/connection.py", line 1186, in get_list
    raise self.ResponseError(response.status, response.reason, body)
boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>InvalidGroup.NotFound</Code><Message>The security group 'bees' does not exist in VPC 'vpc-xxxxxxxx'</Message></Error></Errors><RequestID>a22b32a3-2fe8-4e9d-93b1-bb737ffa7a06</RequestID></Response>

Without --bid:

$ bees up --servers=4 --group=bees --key=bees-key --login=ubuntu -i ami-xxxxxxxx -z ap-southeast-1a
Connecting to the hive.
GroupId found: bees
Placement: ap-southeast-1a
Attempting to call up 4 bees.
Waiting for bees to load their machine guns...
.
.
.
.
Bee i-0bf89f6bf7159e4c8 is ready for the attack.
Bee i-0ca16bf160db477d2 is ready for the attack.
Bee i-0e0f2b5350bb13790 is ready for the attack.
Bee i-0ff8cf10ad9f9f8af is ready for the attack.
The swarm has assembled 4 bees.
Arthur-WH commented 6 years ago

I don't know how to use the App,so I can't help you

ethicalmohit commented 5 years ago

+1