Merge lp:~ttx/nova/lp741342 into lp:~hudson-openstack/nova/trunk

Proposed by Thierry Carrez
Status: Merged
Approved by: Monty Taylor
Approved revision: 917
Merged at revision: 921
Proposed branch: lp:~ttx/nova/lp741342
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 15 lines (+4/-1)
1 file modified
nova/virt/libvirt_conn.py (+4/-1)
To merge this branch: bzr merge lp:~ttx/nova/lp741342
Reviewer Review Type Date Requested Status
Monty Taylor (community) Approve
Jay Pipes (community) Approve
Review via email: mp+55538@code.launchpad.net

Description of the change

Key was converted through str() even if None, resulting in "None" being
added to authorized_keys when no key was specified.

To post a comment you must log in.
Revision history for this message
Jay Pipes (jaypipes) wrote :

lgtm, but is there a way to write a test for this?

review: Needs Information
Revision history for this message
Thierry Carrez (ttx) wrote :

Hmmm... net/key injection goes through nbd mounting over the disk image... so in order to actually test injection results we can't rely on existing fakes, we need to go quite deep (afaict so far there are no tests around injection, so I can't reuse anything).

Revision history for this message
Jay Pipes (jaypipes) wrote :

Hmm, ok. Thanks for the update on that. Can't wait to see functional tests for Nova on our target platforms.

review: Approve
Revision history for this message
Monty Taylor (mordred) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/virt/libvirt_conn.py'
2--- nova/virt/libvirt_conn.py 2011-03-30 05:59:13 +0000
3+++ nova/virt/libvirt_conn.py 2011-03-30 13:34:54 +0000
4@@ -828,7 +828,10 @@
5 if FLAGS.libvirt_type == 'lxc':
6 target_partition = None
7
8- key = str(inst['key_data'])
9+ if inst['key_data']:
10+ key = str(inst['key_data'])
11+ else:
12+ key = None
13 net = None
14
15 nets = []