通过yum 更新使用RDO 安装OpenStack Havana 版本环境,发现实例无法获取metadata 信息,查看/var/log/neutron/metadata-agent.log 日志,发现如下报错信息:
2014-02-25 17:48:52.486 4578 TRACE neutron.agent.metadata.agent Traceback (most recent call last):
2014-02-25 17:48:52.486 4578 TRACE neutron.agent.metadata.agent File “/usr/lib/python2.6/site-packages/neutron/agent/metadata/agent.py”, line 94, in __call__
2014-02-25 17:48:52.486 4578 TRACE neutron.agent.metadata.agent instance_id, tenant_id = self._get_instance_and_tenant_id(req)
2014-02-25 17:48:52.486 4578 TRACE neutron.agent.metadata.agent File “/usr/lib/python2.6/site-packages/neutron/agent/metadata/agent.py”, line 126, in _get_instance_and_tenant_id
2014-02-25 17:48:52.486 4578 TRACE neutron.agent.metadata.agent self.auth_info = qclient.get_auth_info()
2014-02-25 17:48:52.486 4578 TRACE neutron.agent.metadata.agent File “/usr/lib/python2.6/site-packages/neutronclient/v2_0/client.py”, line 1114, in get_auth_info
2014-02-25 17:48:52.486 4578 TRACE neutron.agent.metadata.agent return self.httpclient.get_auth_info()
2014-02-25 17:48:52.486 4578 TRACE neutron.agent.metadata.agent File “/usr/lib/python2.6/site-packages/neutronclient/client.py”, line 270, in get_auth_info
2014-02-25 17:48:52.486 4578 TRACE neutron.agent.metadata.agent ‘auth_tenant_id’: self.auth_tenant_id,
2014-02-25 17:48:52.486 4578 TRACE neutron.agent.metadata.agent AttributeError: ‘HTTPClient’ object has no attribute ‘auth_tenant_id’
2014-02-25 17:48:52.486 4578 TRACE neutron.agent.metadata.agent
查询Google 得知,是个Bug问题:
https://bugs.launchpad.net/python-neutronclient/+bug/1280941
1.临时的解决办法
目前没有可用的更新包,只能通过降级处理,参考:
https://ask.openstack.org/en/question/12439/metadata-agent-throwing-attributeerror-httpclient-object-has-no-attribute-auth_tenant_id-with-latest-release/
1)当前升级后的运行版本
python-neutronclient-2.3.1-2.el6.noarch
openstack-neutron-openvswitch-2013.2.2-2.el6.noarch
python-neutron-2013.2.2-2.el6.noarch
openstack-neutron-2013.2.2-2.el6.noarch
2)降级
Removed:
openstack-neutron.noarch 0:2013.2.2-2.el6 openstack-neutron-openvswitch.noarch 0:2013.2.2-2.el6 python-neutron.noarch 0:2013.2.2-2.el6
python-neutronclient.noarch 0:2.3.1-2.el6
Installed:
openstack-neutron.noarch 0:2013.2.1-1.el6 openstack-neutron-openvswitch.noarch 0:2013.2.1-1.el6 python-neutron.noarch 0:2013.2.1-1.el6
python-neutronclient.noarch 0:2.3.1-1.el6
Complete!
重启metadata-agent 服务:
停止 neutron-metadata-agent: [确定]
正在启动 neutron-metadata-agent: [确定]
测试,问题解决!
2.更新python-neutronclient 到2.3.4版本
从地址可以获取到python-neutronclient 2.3.4 版本的源码。
通过对比python-neutronclient-2.3.1-2.el6.src.rpm,根据其中的0001-Remove-runtime-dependency-on-python-pbr.patch 补丁,修改生成2.3.4版本的rpm:
Wrote: /root/rpmbuild/RPMS/noarch/python-neutronclient-2.3.4-2.el6.noarch.rpm
经测试,可以解决openstack-neutron-2013.2.2-2.el6.noarch 版本的metadata-agent 错误问题。
下载 python-neutronclient-2.3.4-2.el6.tgz:
源码:
※ 20140304 更新
在RDO已经提供了python-neutronclient-2.3.1-3 的更新包以解决该问题。
– Fixed get_auth_info() for pre-authenticated clients
解决 OpenvSwitch terminating with signal 14 (Alarm clock) 错误
使用RDO juno dev1462 部署mongodb 失败的问题
创建实例报 Virtual Interface creation failed 的错误
Neutron 网络架构讲解_VLAN 网络
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/98257.html