使用OpenStack遇到的问题(2)

7.在用户生成证书时报如下错误:

SUSEsp2:~/key # nova-manage project zipfile –project=mycloud –user=kevin –file=nova.zip

Stderr: “Using configuration from ./openssl.cnf\nerror loading the config file ‘./openssl.cnf’\n15649:error:02001002:system library:fopen:No such file or directory:bss_file.c:126:fopen(‘./openssl.cnf’,'rb’)\n15649:error:2006D080:BIO routines:BIO_new_file:no such file:bss_file.c:129:\n15649: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.

解决方法:

susesp2:~/key # zypper install openstack-nova-cert

susesp2:~/key # /etc/init.d/openstack-nova-cert start

susesp2:~/key # chkconfig openstack-nova-cert on

8.在使用nova查看虚拟实例时出现400错误:

susesp2:~/key # nova image-list

ERROR: n/a (HTTP 400)

解决方法:

susesp2:~ # zypper search nova-api

Loading repository data…

Reading installed packages…

S | Name               | Summary                        | Type

–+——————–+——————————–+——–

| openstack-nova-api | OpenStack Compute API services | package

susesp2:~ # zypper install openstack-nova-api

其它问题引起的http 400错误,novarc环境变量写错,这点很重要:

suse11sp2:~/user # cat novarc

NOVARC=$(readlink -f “${BASH_SOURCE:-${0}}” 2>/dev/null) ||

NOVARC=$(Python -c ‘import os,sys; print os.path.abspath(os.path.realpath(sys.argv[1]))’ “${BASH_SOURCE:-${0}}”)

NOVA_KEY_DIR=${NOVARC%/*}

export EC2_ACCESS_KEY=”kevin:mycloud”

export EC2_SECRET_KEY=”f20bb381-9cbf-40a7-a84f-499b815efa19″

export EC2_URL=”:8773/services/Cloud”

export S3_URL=”:3333″

export EC2_USER_ID=42 # nova does not use user id, but bundling requires it

export EC2_PRIVATE_KEY=${NOVA_KEY_DIR}/pk.pem

export EC2_CERT=${NOVA_KEY_DIR}/cert.pem

export NOVA_CERT=${NOVA_KEY_DIR}/cacert.pem

export EUCALYPTUS_CERT=${NOVA_CERT} # euca-bundle-image seems to require this set

alias ec2-bundle-image=”ec2-bundle-image –cert ${EC2_CERT} –privatekey ${EC2_PRIVATE_KEY} –user 42 –ec2cert ${NOVA_CERT}”

alias ec2-upload-bundle=”ec2-upload-bundle -a ${EC2_ACCESS_KEY} -s ${EC2_SECRET_KEY} –url ${S3_URL} –ec2cert ${NOVA_CERT}”

export NOVA_API_KEY=”kevin”

export NOVA_USERNAME=”kevin”

export NOVA_PROJECT_ID=”mycloud”

export NOVA_URL=”:8774/v1.1/”

export NOVA_VERSION=”1.1″

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/cbdff21b353b3205e2991f4e81b86ec7.html