Merge lp:~cbehrens/nova/lp787815 into lp:~hudson-openstack/nova/trunk

Proposed by Chris Behrens
Status: Merged
Approved by: Josh Kearney
Approved revision: 1107
Merged at revision: 1106
Proposed branch: lp:~cbehrens/nova/lp787815
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 19 lines (+2/-2)
1 file modified
nova/virt/xenapi/vmops.py (+2/-2)
To merge this branch: bzr merge lp:~cbehrens/nova/lp787815
Reviewer Review Type Date Requested Status
Devin Carlen (community) Approve
Josh Kearney (community) Approve
Trey Morris (community) Approve
Review via email: mp+62213@code.launchpad.net

Description of the change

Pretty simple. We call openssl to encrypt the admin password, but the recent changes around this code forgot to strip the newline off the read from stdout.

To post a comment you must log in.
Revision history for this message
Trey Morris (tr3buchet) wrote :

nice job comstud!
Way to go!
etc

review: Approve
Revision history for this message
Josh Kearney (jk0) wrote :

lgtm

review: Approve
Revision history for this message
Devin Carlen (devcamcar) wrote :

lgtm

review: Approve
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :
Download full text (52.0 KiB)

The attempt to merge lp:~cbehrens/nova/lp787815 into lp:nova failed. Below is the output from the failed tests.

AccountsTest
    test_account_create OK
    test_account_delete OK
    test_account_update OK
    test_get_account OK
AdminAPITest
    test_admin_disabled OK
    test_admin_enabled OK
APITest
    test_exceptions_are_converted_to_faults OK
Test
    test_authorize_token OK
    test_authorize_user OK
    test_bad_token OK
    test_bad_user_bad_key OK
    test_bad_user_good_key OK
    test_no_user OK
    test_token_expiry OK
TestFunctional
    test_token_doesnotexist OK
    test_token_expiry OK
TestLimiter
    test_authorize_token OK
LimiterTest
    test_limiter_custom_max_limit OK
    test_limiter_limit_and_offset OK
    test_limiter_limit_medium OK
    test_limiter_limit_over_max OK
    test_limiter_limit_zero OK
    test_limiter_negative_limit OK
    test_limiter_negative_offset OK
    test_limiter_nothing OK
    test_limiter_offset_bad OK
    test_limiter_offset_blank OK
    test_limiter_offset_medium OK
    test_limiter_offset_over_max OK
    test_limiter_offset_zero OK
ActionExtensionTest
    test_extended_action OK
    test_invalid_action OK
    test_invalid_action_body OK
ExtensionControllerTest
    test_get_by_alias OK
    test_index OK
ExtensionManagerTest
    test_get_resources OK
RequestExtensionTest
    test_get_resources_with_mgr OK
    test_get_resources_with_stub_mgr OK
ResourceExtensionTest
    test_get_resources OK
    test_get_resources_with_controller OK
    test_no_extension_present OK
TestFaults
    test_400_fault_json OK
    test_400_fault_xml OK
    test_...

Revision history for this message
Chris Behrens (cbehrens) wrote :

That's what I get for forgetting to run tests. It appears that SimpleDH().decrypt didn't append a '\n' when writing to openssl's stdin.. so once I fixed encrypt, the test failed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/virt/xenapi/vmops.py'
2--- nova/virt/xenapi/vmops.py 2011-05-17 15:49:31 +0000
3+++ nova/virt/xenapi/vmops.py 2011-05-24 22:16:32 +0000
4@@ -1171,13 +1171,13 @@
5 shared = self._shared
6 cmd = base_cmd % locals()
7 proc = _runproc(cmd)
8- proc.stdin.write(text)
9+ proc.stdin.write(text + '\n')
10 proc.stdin.close()
11 proc.wait()
12 err = proc.stderr.read()
13 if err:
14 raise RuntimeError(_('OpenSSL error: %s') % err)
15- return proc.stdout.read()
16+ return proc.stdout.read().strip('\n')
17
18 def encrypt(self, text):
19 return self._run_ssl(text, 'enc')