Race condition when running two ec2test instances very close together
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Launchpad itself |
High
|
Gavin Panella |
Bug Description
This seems to happen when I try o run two tests at the same time:
$ ~/src/lp-
No handlers could be found for logger "boto"
Using machine image version 11
Traceback (most recent call last):
File "/home/
runner.start()
File "/home/
self.
File "/home/
self.
File "/home/
key_pair = self.conn.
File "/var/lib/
return self.get_
File "/var/lib/
raise self.ResponseEr
EC2ResponseError: EC2ResponseError: 400 Bad Request
<?xml version="1.0"?>
<Response>
no instance created
Related branches
- Abel Deuring (community): Approve on 2009-10-02
-
Diff: 717 lines8 files modifiedlib/devscripts/ec2test/account.py (+58/-48)
lib/devscripts/ec2test/builtins.py (+40/-35)
lib/devscripts/ec2test/instance.py (+26/-18)
lib/devscripts/ec2test/session.py (+90/-0)
lib/devscripts/ec2test/tests/__init__.py (+2/-0)
lib/devscripts/ec2test/tests/test_session.py (+69/-0)
lib/devscripts/ec2test/tests/test_utils.py (+61/-0)
lib/devscripts/ec2test/utils.py (+55/-0)
- Michael Nelson (community): Approve (code) on 2009-10-08
-
Diff: 642 lines10 files modifiedlib/devscripts/ec2test/account.py (+58/-48)
lib/devscripts/ec2test/builtins.py (+12/-7)
lib/devscripts/ec2test/instance.py (+20/-15)
lib/devscripts/ec2test/session.py (+90/-0)
lib/devscripts/ec2test/tests/__init__.py (+2/-0)
lib/devscripts/ec2test/tests/test_session.py (+69/-0)
lib/devscripts/ec2test/tests/test_utils.py (+61/-0)
lib/devscripts/ec2test/utils.py (+55/-0)
setup.py (+1/-0)
versions.cfg (+2/-0)
- Eleanor Berger (community): Approve (binary) on 2009-10-08
Michael Hudson-Doyle (mwhudson) wrote : | #1 |
Changed in launchpad-foundations: | |
status: | New → Triaged |
importance: | Undecided → High |
Michael Hudson-Doyle (mwhudson) wrote : | #2 |
The problem is that when ec2 test is starting up, it looks for a key pair called 'ec2-test-runner'. If it finds it, it deletes it. Then it creates a key pair with this name and uses it to start an instance. The race occurs when one invocation deletes the key pair after another has created it but before it uses it.
I think a fix would be to instead of deleting an existing key pair, to mutate the key pair name until one can be created, and then deleting it again after the instance is safely booted.
Changed in launchpad-foundations: | |
assignee: | nobody → Gavin Panella (allenap) |
milestone: | none → 3.1.10 |
status: | Triaged → In Progress |
Fixed in devel r9631 <http://
Changed in launchpad-foundations: | |
status: | In Progress → Fix Committed |
Changed in launchpad-foundations: | |
status: | Fix Committed → In Progress |
Diogo Matsubara (matsubara) wrote : | #4 |
Fixed in devel r9672 <http://
Changed in launchpad-foundations: | |
status: | In Progress → Fix Committed |
Changed in launchpad-foundations: | |
status: | Fix Committed → Fix Released |
I've had this, or something very similar, happen to me too.