'ERROR: Unable to write privatekey' on current DevStack version

Asked by Victoria Martinez de la Cruz

Hi everybody,

I just cloned and deployed the last version of DevStack and when running stack.sh the following output appears when creating certificates and sourcable rc files per tenant/user - that's it, when create_userrc.sh gets called.

####

2013-02-14 14:34:27 + /home/vkmc/devstack/tools/create_userrc.sh -PA --target-dir /home/vkmc/devstack/accrc
2013-02-14 14:34:31 Wrote x509 root cert to /home/vkmc/devstack/accrc/cacert.pem
2013-02-14 14:34:33 +-----------+----------------------------------+
2013-02-14 14:34:33 | Property | Value |
2013-02-14 14:34:33 +-----------+----------------------------------+
2013-02-14 14:34:33 | access | eb04a19837cf4b3fbd4d1d3187d8fe9d |
2013-02-14 14:34:33 | secret | 4c45bd5db55f42fd8db23414bb9e64b2 |
2013-02-14 14:34:33 | tenant_id | 568d27a9dced489aacdd49f088292788 |
2013-02-14 14:34:33 | user_id | 296ac22edb154250a8c25ff953863e10 |
2013-02-14 14:34:33 +-----------+----------------------------------+
2013-02-14 14:34:58 ERROR: Unable to write privatekey - /home/vkmc/devstack/accrc/admin/admin-pk.pem exists.
2013-02-14 14:35:08 +-----------+----------------------------------+
2013-02-14 14:35:08 | Property | Value |
2013-02-14 14:35:08 +-----------+----------------------------------+
2013-02-14 14:35:08 | access | 7f4d46499fe544acb857f4dc430eb906 |
2013-02-14 14:35:08 | secret | 5c0229c133634ed7adb97429e0fe03c9 |
2013-02-14 14:35:08 | tenant_id | abdb53053b3d4ee79bd22a2493d049c1 |
2013-02-14 14:35:08 | user_id | a153019de129451ba4c47e62e8c1bd58 |
2013-02-14 14:35:08 +-----------+----------------------------------+
2013-02-14 14:35:31 ERROR: Unable to write privatekey - /home/vkmc/devstack/accrc/alt_demo/alt_demo-pk.pem exists.
2013-02-14 14:35:43 +-----------+----------------------------------+
2013-02-14 14:35:43 | Property | Value |
2013-02-14 14:35:43 +-----------+----------------------------------+
2013-02-14 14:35:43 | access | 6b74622a39e7482c99d5708dc85e6603 |
2013-02-14 14:35:43 | secret | 95de97b4e37e4bbf884b65b3eb8d3bc2 |
2013-02-14 14:35:43 | tenant_id | 8466f9dc072844199860d3dfe69d3b01 |
2013-02-14 14:35:43 | user_id | 296ac22edb154250a8c25ff953863e10 |
2013-02-14 14:35:43 +-----------+----------------------------------+
2013-02-14 14:35:45 ERROR: Unable to write privatekey - /home/vkmc/devstack/accrc/demo/admin-pk.pem exists.
2013-02-14 14:36:07 +-----------+----------------------------------+
2013-02-14 14:36:07 | Property | Value |
2013-02-14 14:36:07 +-----------+----------------------------------+
2013-02-14 14:36:07 | access | 4be4804a0b584adaa63b66c6dfdb6e14 |
2013-02-14 14:36:07 | secret | cd96ac31b4ff4946937db43a83475ef6 |
2013-02-14 14:36:07 | tenant_id | 8466f9dc072844199860d3dfe69d3b01 |
2013-02-14 14:36:07 | user_id | 0c4308cbeb1c4c859fb0511f33dc28ef |
2013-02-14 14:36:07 +-----------+----------------------------------+
2013-02-14 14:36:10 ERROR: Unable to write privatekey - /home/vkmc/devstack/accrc/demo/demo-pk.pem exists.
2013-02-14 14:36:15 +-----------+----------------------------------+
2013-02-14 14:36:15 | Property | Value |
2013-02-14 14:36:15 +-----------+----------------------------------+
2013-02-14 14:36:15 | access | 1a5a5b53f0304da79828e9823aed9fc1 |
2013-02-14 14:36:15 | secret | c1767fbe28b44b52b238573f2ecbfddc |
2013-02-14 14:36:15 | tenant_id | bd9728034b7b4d688cb51d918e9a501a |
2013-02-14 14:36:15 | user_id | 0c4308cbeb1c4c859fb0511f33dc28ef |
2013-02-14 14:36:15 +-----------+----------------------------------+
2013-02-14 14:36:19 ERROR: Unable to write privatekey - /home/vkmc/devstack/accrc/invisible_to_admin/demo-pk.pem exists.
2013-02-14 14:36:22 + is_service_enabled g-reg
2013-02-14 14:36:22 + services=g-reg
2013-02-14 14:36:22 + for service in '${services}'
2013-02-14 14:36:22 + [[ ,g-api,g-reg,key,n-api,n-crt,n-obj,n-cpu,n-cond,cinder,c-sch,c-api,c-vol,n-sch,n-novnc,n-xvnc,n-cauth,horizon,rabbit,tempest,mysql,q-svc,q-agt,q-dhcp,q-l3,q-meta,swift, =~ ,g-reg, ]]

####

This situation is noticeable because the scripts pauses waiting for an input (or at least I didn't give it enough time), and when pressing enter it proceeds to next .pem.

A non-elegant solution is removing certificates directory, devstack/accrc, before running stack.sh.

I checked the script but nothing caught my attention.

Does someone have an idea of why is this happening?

Thanks a lot in advance

Question information

Language:
English Edit question
Status:
Solved
For:
devstack Edit question
Assignee:
No assignee Edit question
Solved by:
Victoria Martinez de la Cruz
Solved:
Last query:
Last reply:
Revision history for this message
Jason (zzs) said :
#1

No sure what happened, but what will it happen if you clone the devstack in new directory.

Revision history for this message
Victoria Martinez de la Cruz (vkmc) said :
#2

Hi Jason! Same behaviour :/ After initial run it produces the same output

Revision history for this message
Jason (zzs) said :
#3

OMG, I got this error just now, it happened on my machine too. :-(

I will create the bug report.

Revision history for this message
Jason (zzs) said :
#4

Please create a bug report for this, as I mentioned it happened just now.
my log is here: http://paste.openstack.org/show/32302/

Revision history for this message
Masayuki Igawa (igawa) said :
#5

Was this bug already fixed?
=========================
commit 0f2d954b82e44d7bbd646e200510beb1ca3e469e
Author: Dean Troyer <email address hidden>
Date: Wed Feb 20 17:51:19 2013 -0600

    Fix create_userrc.sh private key hang

    tools/create_userrc.sh hangs in a couple of mv commands now that
    private keys are created with mode 400. mv is prompting to
    override the permissions, so let's just -f it all.

    Change-Id: I8fbb24da6582edcff741653ffdf8bf683b79851a
=========================

Revision history for this message
Victoria Martinez de la Cruz (vkmc) said :
#6

Already fixed indeed! Thanks :)