Essex creation of zipfile

Bug #1092016 reported by santoshsas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Chuck Short

Bug Description

Trying to create a zip file not able create it . However followed few bug reports did not even work help me stack mates

https://answers.launchpad.net/nova/+question/146517

dev@dev-VirtualBox:~$ sudo nova-manage project zipfile cookbook openstack
[sudo] password for dev:
2012-12-19 15:14:01 DEBUG nova.utils [req-2b0fc78c-269b-4910-ab74-46f892cf7aef None None] backend <module 'nova.db.sqlalchemy.api' from '/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.pyc'> from (pid=4545) __get_backend /usr/lib/python2.7/dist-packages/nova/utils.py:658
2012-12-19 15:14:02 DEBUG nova.utils [-] Running cmd (subprocess): openssl genrsa -out /tmp/tmp4XHbw2/temp.key 1024 from (pid=4545) execute /usr/lib/python2.7/dist-packages/nova/utils.py:219
2012-12-19 15:14:03 DEBUG nova.utils [-] Running cmd (subprocess): openssl req -new -key /tmp/tmp4XHbw2/temp.key -out /tmp/tmp4XHbw2/temp.csr -batch -subj /C=US/ST=California/O=OpenStack/OU=NovaDev/CN=cookbook-openstack-2012-12-19T09:44:02Z from (pid=4545) execute /usr/lib/python2.7/dist-packages/nova/utils.py:219
2012-12-19 15:14:03 DEBUG nova.crypto [-] Flags path: /var/lib/nova/CA from (pid=4545) _sign_csr /usr/lib/python2.7/dist-packages/nova/crypto.py:290
2012-12-19 15:14:03 DEBUG nova.utils [-] Running cmd (subprocess): openssl ca -batch -out /tmp/tmplTduef/outbound.csr -config ./openssl.cnf -infiles /tmp/tmplTduef/inbound.csr from (pid=4545) execute /usr/lib/python2.7/dist-packages/nova/utils.py:219
2012-12-19 15:14:03 DEBUG nova.utils [-] Result was 1 from (pid=4545) execute /usr/lib/python2.7/dist-packages/nova/utils.py:235
Unexpected error while running command.
Command: openssl ca -batch -out /tmp/tmplTduef/outbound.csr -config ./openssl.cnf -infiles /tmp/tmplTduef/inbound.csr
Exit code: 1
Stdout: ''
Stderr: "Using configuration from ./openssl.cnf\nerror loading the config file './openssl.cnf'\n139661452633760:error:02001002:system library:fopen:No such file or directory:bss_file.c:169:fopen('./openssl.cnf','rb')\n139661452633760:error:2006D080:BIO routines:BIO_new_file:no such file:bss_file.c:172:\n139661452633760:error:0E078072:configuration file routines:DEF_LOAD:no such file:conf_def.c:197:\n"
The above error may show that the certificate db has not been created.
Please create a database by running a nova-cert server on this host.

Tags: essex nova
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/18408

Changed in nova:
assignee: nobody → Chuck Short (zulcss)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/18408
Committed: http://github.com/openstack/nova/commit/4bfce3609692f1426af1b797b18dc7b292b6bdd1
Submitter: Jenkins
Branch: master

commit 4bfce3609692f1426af1b797b18dc7b292b6bdd1
Author: Chuck Short <email address hidden>
Date: Wed Dec 19 12:51:20 2012 -0600

    Trap exception when trying to write csr

    Trap the exception when trying to write the csr fails.
    Fixes LP: #1092016

    Change-Id: I05675c8c7b1d205a06d13dd3e62e06088d1b896d
    Signed-off-by: Chuck Short <email address hidden>

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
santoshsas (santoshsas02) wrote :

hey chuck thank you for looking out my error.

edit the code which was given in the git link

file : /usr/lib/python2.7/dist-packages/nova/crytpo.py

Section : What i edited

                            def _sign_csr(csr_text, ca_folder):
    with utils.tempdir() as tmpdir:
        inbound = os.path.join(tmpdir, 'inbound.csr')
        outbound = os.path.join(tmpdir, 'outbound.csr')
        try:
           with open(inbound, 'w') as csrfile:
            csrfile.write(csr_text)
        except IOError:
            LOG.exception(_('Failed to write inbound .csr'))
            raise

        LOG.debug(_('Flags path: %s'), ca_folder)
        start = os.getcwd()

then restarted the nova services and system too

try to obtain the zip file didnot wort getting the same error

Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-2 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.