Merge lp:~soren/nova/ca-separate-code-and-state into lp:~hudson-openstack/nova/trunk

Proposed by Soren Hansen
Status: Merged
Approved by: Vish Ishaya
Approved revision: 948
Merged at revision: 948
Proposed branch: lp:~soren/nova/ca-separate-code-and-state
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 12 lines (+2/-0)
1 file modified
nova/crypto.py (+2/-0)
To merge this branch: bzr merge lp:~soren/nova/ca-separate-code-and-state
Reviewer Review Type Date Requested Status
Vish Ishaya (community) Approve
Josh Kearney (community) Approve
Review via email: mp+56636@code.launchpad.net

Commit message

Make sure ca_folder is created before chdir()ing into it.

Description of the change

"nova-manage project zipfile" gets very upset if the CA dir does not exist. We used to never really see this, but now that the CA state dir doesn't exist ahead of time, we do.

This patch makes sure it's created before we try to chdir into it.

To post a comment you must log in.
Revision history for this message
Josh Kearney (jk0) wrote :

lgtm

review: Approve
Revision history for this message
Vish Ishaya (vishvananda) 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/crypto.py'
2--- nova/crypto.py 2011-04-05 09:42:14 +0000
3+++ nova/crypto.py 2011-04-06 18:52:29 +0000
4@@ -269,6 +269,8 @@
5 LOG.debug(_("Flags path: %s"), ca_folder)
6 start = os.getcwd()
7 # Change working dir to CA
8+ if not os.path.exists(ca_folder):
9+ os.makedirs(ca_folder)
10 os.chdir(ca_folder)
11 utils.execute('openssl', 'ca', '-batch', '-out', outbound, '-config',
12 './openssl.cnf', '-infiles', inbound)