Merge lp:~mars/launchpad/trivial-add-ec2-xxx into lp:launchpad

Proposed by Māris Fogels on 2010-05-07
Status: Merged
Approved by: Gary Poster on 2010-05-07
Approved revision: no longer in the source branch.
Merged at revision: 10842
Proposed branch: lp:~mars/launchpad/trivial-add-ec2-xxx
Merge into: lp:launchpad
Diff against target: 30 lines (+8/-4)
1 file modified
lib/devscripts/ec2test/instance.py (+8/-4)
To merge this branch: bzr merge lp:~mars/launchpad/trivial-add-ec2-xxx
Reviewer Review Type Date Requested Status
Gary Poster (community) 2010-05-07 Approve on 2010-05-07
Review via email: mp+24927@code.launchpad.net

Commit Message

Added an XXX comment to ec2test for bug 577118.

Description of the Change

Hi,

This branch adds an XXX comment to ec2test for bug 577118. (I hit this bug today, and it is annoying!)

Maris

To post a comment you must log in.
Gary Poster (gary) wrote :

Add a date while you are at it :-)

https://dev.launchpad.net/PolicyandProcess/XXXPolicy

# XXX mars 2010-05-07 bug=577118

review: Approve
Māris Fogels (mars) wrote :

Smoke-tested the branch with utilties/ec2, and it works.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/devscripts/ec2test/instance.py'
2--- lib/devscripts/ec2test/instance.py 2010-03-31 20:52:55 +0000
3+++ lib/devscripts/ec2test/instance.py 2010-05-07 21:13:30 +0000
4@@ -40,7 +40,7 @@
5
6
7 def get_user_key():
8- """Get a SSH key from the agent. Raise an error if not found.
9+ """Get a SSH key from the agent. Raise an error if no keys were found.
10
11 This key will be used to let the user log in (as $USER) to the instance.
12 """
13@@ -49,10 +49,14 @@
14 if len(keys) == 0:
15 raise BzrCommandError(
16 'You must have an ssh agent running with keys installed that '
17- 'will allow the script to rsync to devpad and get your '
18+ 'will allow the script to access Launchpad and get your '
19 'branch.\n')
20- user_key = agent.get_keys()[0]
21- return user_key
22+
23+ # XXX mars 2010-05-07 bug=577118
24+ # Popping the first key off of the stack can create problems if the person
25+ # has more than one key in their ssh-agent, but alas, we have no good way
26+ # to detect the right key to use. See bug 577118 for a workaround.
27+ return keys[0]
28
29
30 # Commands to run to turn a blank image into one usable for the rest of the