1. AMQPChannelException
PROBLEM:
在用stable/folsom的devstack安装stable/folsom的openstack时,遇到下面的问题:
(nova.api.
SOLUTION:
The Exchange is probably declared with a different set of parameters (auto-deletion, etc.) in the new version of OpenStack and RabbitMq is quite "nazi" about this sort of stuff. There's a nice way and a not-so-nice way to manually delete the Exchange.
THE NICE WAY:
If the Queues binded to the Exchange are empty, the Exchange can be deleted using the following commands:
> rabbitmqctl stop_app
> rabbitmqctl reset
> rabbitmqctl start_app
2) List the Exchanges to see if the it was removed from the list:
> rabbitmqctl list_exchanges
If it remains on the list, use "amqp-utils" Ruby Gem to do the job, since "rabbitmqctl" does not support Exchange deletion.
THE NOT-SO-NICE WAY:
> apt-get install ruby rubygems1.8
> gem install amqp-utils
> cd /var/lib/
> ./amqp-delexch <EXCHANGE_NAME>
Double-check by retrieving the Exchange list once again:
> rabbitmqctl list_exchanges
It should now be gone...
2. 让虚拟机可以访问外网(instance access internet)
在宿主机上,加上一条iptables规则:
# sudo iptables -t nat -A POSTROUTING -s 10.0.0.2 -j MASQUERADE
-s 指定虚拟机的ip
3. OSError: [Errno 2] No such file or directory: 'policy.json'
这是在运行./run_tests.sh的时候遇到的问题,找不到policy.json,整个测试过程,都是报这个错,后来使用sudo运行./run_tests.sh就不报这个错了,看来是在测试的过程中,有一些管理员操作。看来最好还是用root创建虚拟测试环境.venv,测试时使用sudo,这样比较少纠结!
4. Cinder报错:ISCSITargetCreateFailed: Failed to create iscsi target for volume volume-xxx
我是使用的devstack安装的cinder,问题原因:https://bugs.launchpad.net/cinder/+bug/1057904
解决办法:把/etc/tgt/目录下的文件和目录全部删除,重新运行./stack.sh,或者按上面bug中说的解决办法。
5. AssertionError: There is no script for 136 version
这个错误是在版本切换之后,遇到的错误。解决方法是将nova/db/sqlalchemy/migrate_repo/versions目录下的.pyc文件全部删除。
6. AttributeError: 'module' object has no attribute 'Mount'
这个错误是在由最新版本切换到F版遇到的错误,导致nova-api没有启动起来,解决办法是删除/opt/stack/nova/nova/virt/disk/目录下的mount和vfs文件夹。向这样的错误,一般是在版本切换,或者是在本次更新代码距离上次有很长时间而导致的,只要删除所有的pyc文件,重新编译,就可以解决问题了。
7. 使用virtualbox部署多节点环境,vm不能访问外网的问题
参考 http://wiki.stacklab.org/doku.php?id=stacklab:documentation:use-virtualbox-install-openstack 这篇文章在单机上部署多节点环境,如果按步骤操作完毕,但是建立的虚拟机仍然不能访问外网,再试一下如下步骤:
在/etc/sysctl.conf中添加一行: net.ipv4.ip_forward = 1 (也即将这一行的注释给去掉),然后运行sudo sysctl -p,就可以了。
8. TRACE nova libvirtError: Failed to connect socket to ‘/var/run/libvirt/libvirt-sock’: No such file or directory
这个问题是由于libvirt-bin没有正常启动造成的。需要看/var/log/libvirt/libvirtd.log排错
9. virNetTLSContextCheckCertFile:92 : Cannot read CA certificate '/etc/pki/CA/cacert.pem': No such file or directory
这个是由于libvirt使用了TLS机制,但是没有配置好相关的公钥和私钥,关于libvirt的TLS机制,见这里:http://wiki.libvirt.org/page/TLSDaemonConfiguration,一个简单的解决办法是将TLS机制关掉,更改/etc/libvirt/libvirtd.conf为:
listen_tls = 0
listen_tcp = 1
10. 提交commit时,如何获得Change-Id
要检查.git/hooks目录下是否有commit-msg文件,如果没有,那么就要从gerrit上下载:
scp -p -P 29418 yugsuo@review.openstack.org:hooks/commit-msg .git/hooks/
然后提交的时候,会自动添加Change-Id到git log中