02月01, 2017

Nova 从Kilo 升级到 Mitaka 遇到的坑

大家都知道 OpenStack 最大的痛点莫过于组件过多而导致的安装部署繁琐的问题,因此很多公司/企业都不得不望而生畏,不过还好我们Hold住了,而且还很流程化、自动化;但是最近我们又尝试去触碰以下 OpenStack 的另一个硬骨头---升级。OpenStack升级是另一件让 OpenStacker 比较头疼的事情,因为要在保证现有现有业务不能受影响的同时又要快速完成升级任务,回想其安装的过程,可想而知其升级是多么的让人没有底,而且不是相邻版本之间的升级,我们是跨大版本之间的升级(Kilo到Mitaka);但是,我们勇于尝试,接下来就来看看我们是怎么搞定的吧。

升级前的调研

升级之前我们肯定是要调研版本之间都做了哪些变更(功能增删、配置增删等)做到心中有数。那,如何来快速的了解个版本之间的这些变更呢?别急,OpenStack 在任何大版本的发布时都会提供相应的RleaseNotes,里面给出了当前发布版与上一版之间都新增/删减了哪些功能,新增/删减了哪些配置项等,这一点还是很贴心的,感谢社区。因为我们是从Kilo版直升到Mitaka版,中间跨越了大版本Liberty版,所以我们既要看Kilo版到Liberty版的ReleaseNotes,又要看Liverty到Mitaka的ReleaseNotes。

升级流程

升级YUM源

# cd /etc/yum.repos.d/

# mv openstack-kilo.repo openstack-kilo.repo.backup
# wget -q "http://*.qihoo.net:8360/download/openstack-mitaka.repo" -O /etc/yum.repos.d/openstack-mitaka.repo

备份数据库

mysqldump --skip-lock-tables -u nova -ppassword -Pport -hhost nova > /root/openstack-kilo-db-backup/nova.sql

停服务

停止所有计算节点 nova-compute 服务

systemctl stop openstack-nova-compute.service

停止控制节点服务

systemctl stop openstack-nova-api.service
systemctl stop openstack-nova-conductor.service
systemctl stop openstack-nova-scheduler.service
systemctl stop openstack-nova-novncproxy.service
systemctl stop openstack-nova-consoleauth.service

使用ansible升级Nova组件及修改配置

根据自己实际环境书写playbook

同步最新数据库结构

openstack-db --service nova --update
nova-manage api_db sync

在 Mitaka 版本中新增nova_api数据库,所以要同步api_db

启动并检查服务状态

启动控制节点

systemctl start openstack-nova-conductor.service
systemctl start openstack-nova-scheduler.service
systemctl start openstack-nova-api.service
systemctl start openstack-nova-novncproxy.service
systemctl start openstack-nova-consoleauth.service

启动计算节点

systemctl start openstack-nova-compute.service

升级遇到的坑

QA01. RPC 版本Controller节点与Compute节点不匹配

现场日志

2016-11-16 15:06:04.691 4745 ERROR oslo_messaging.rpc.dispatcher [-] Exception during message handling: Endpoint does not support RPC version 2.0. Attempted method: object_class_action
2016-11-16 15:06:04.691 4745 ERROR oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2016-11-16 15:06:04.691 4745 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 138, in _dispatch_and_reply
2016-11-16 15:06:04.691 4745 ERROR oslo_messaging.rpc.dispatcher incoming.message))
2016-11-16 15:06:04.691 4745 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 194, in _dispatch
2016-11-16 15:06:04.691 4745 ERROR oslo_messaging.rpc.dispatcher raise UnsupportedVersion(version, method=method)
2016-11-16 15:06:04.691 4745 ERROR oslo_messaging.rpc.dispatcher UnsupportedVersion: Endpoint does not support RPC version 2.0. Attempted method: object_class_action
2016-11-16 15:06:04.691 4745 ERROR oslo_messaging.rpc.dispatcher
2016-11-16 15:06:04.692 4745 ERROR oslo_messaging._drivers.common [-] Returning exception Endpoint does not support RPC version 2.0. Attempted method: object_class_action to caller
2016-11-16 15:06:04.693 4745 ERROR oslo_messaging._drivers.common [-] ["Traceback (most recent call last):\n", " File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 138, in _dispatch_and_reply\n incoming.message))\n", " File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 194, in _dispatch\n raise UnsupportedVersion(version, method=method)\n", "UnsupportedVersion: Endpoint does not support RPC version 2.0. Attempted method: object_class_action\n"]

针对这个问题官方已经给出了解决方案nova的upgrade机制了解。 简单理解的话就是为了升级时高版本组件和低版本组件RPC正常通信,通过在controller和compute配置文件中指定版本号的方式来统一他们之间的通信。但是由于我们是跨大版本升级,所以在这个地方掉坑里去了。

那,跨版本为啥有问题呢? 正常的流程是我们在controller和compute中的配置文件[upgrade_level]组中配置使用的RPC版本号即可,但是实际在使用时还是一直报错。最终根据日志排查发现Kilo版本的RPC和Mitaka版本的RPC版本不匹配。

Kilo 版本

VERSION_ALIASES = {
"grizzly": "1.48",
"havana": "1.58",
"icehouse": "2.0",
"juno": "2.0",
"kilo": "2.1",
}

Liberty 版本

VERSION_ALIASES = {
"grizzly": "1.48",
"havana": "1.58",
"icehouse": "2.0",
"juno": "2.0",
"kilo": "2.1",
}

Mitaka 版本

VERSION_ALIASES = {
"icehouse": "3.23",
"juno": "3.35",
"kilo": "4.0",
"liberty": "4.5",
}

所以,不管我们怎么配置都达不到Kilo版和Mitaka版的兼容。 翻了翻调研升级时官方给的建议,这才明白为啥必须从这个commit id后的版本升级才能够比较平滑的升级

Only if you do continuous deployment 1337890ace918fa2555046c01c8624be014ce2d8 drops support for an instance major version, which means that you must have deployed at least commit 713d8cb0777afb9fe4f665b9a40cac894b04aacb before deploying this one(Mitaka).

问题解决: 放弃Mitaka版Controller与Kilo版Compute兼容的方案。同步升级nova-compute组件,让Controller和Compute使用同一版本。 本以为这样就解决问题了,但是在将nova-compute升级到Mitaka启动服务时,又报如下异常:

2016-11-16 17:08:00.587 10855 WARNING oslo_config.cfg [-] Option "security_group_api" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.
2016-11-16 17:08:00.726 10855 ERROR oslo.messaging._drivers.impl_rabbit [req-e4f9e8a2-c9c5-43f8-b259-68aa979e6322 - - - - -] Failed to publish message to topic "nova": object of type "int" has no len()
2016-11-16 17:08:00.727 10855 CRITICAL nova [req-e4f9e8a2-c9c5-43f8-b259-68aa979e6322 - - - - -] TypeError: object of type "int" has no len()
2016-11-16 17:08:00.727 10855 ERROR nova Traceback (most recent call last):
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/bin/nova-compute", line 10, in <module>
2016-11-16 17:08:00.727 10855 ERROR nova     sys.exit(main())
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/nova/cmd/compute.py", line 74, in main
2016-11-16 17:08:00.727 10855 ERROR nova     db_allowed=CONF.conductor.use_local)
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/nova/service.py", line 290, in create
2016-11-16 17:08:00.727 10855 ERROR nova     self.conductor_api.wait_until_ready(context.get_admin_context())
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/nova/conductor/api.py", line 157, in wait_until_ready
2016-11-16 17:08:00.727 10855 ERROR nova     timeout=timeout)
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/nova/baserpc.py", line 62, in ping
2016-11-16 17:08:00.727 10855 ERROR nova     return cctxt.call(context, "ping", arg=arg_p)
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/client.py", line 158, in call
2016-11-16 17:08:00.727 10855 ERROR nova     retry=self.retry)
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/oslo_messaging/transport.py", line 90, in _send
2016-11-16 17:08:00.727 10855 ERROR nova     timeout=timeout, retry=retry)
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 470, in send
2016-11-16 17:08:00.727 10855 ERROR nova     retry=retry)
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 456, in _send
2016-11-16 17:08:00.727 10855 ERROR nova     msg=msg, timeout=timeout, retry=retry)
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/impl_rabbit.py", line 1211, in topic_send
2016-11-16 17:08:00.727 10855 ERROR nova     retry=retry)
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/impl_rabbit.py", line 1089, in _ensure_publishing
2016-11-16 17:08:00.727 10855 ERROR nova     self.ensure(method, retry=retry, error_callback=_error_callback)
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/impl_rabbit.py", line 758, in ensure
2016-11-16 17:08:00.727 10855 ERROR nova     ret, channel = autoretry_method()
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/kombu/connection.py", line 436, in _ensured
2016-11-16 17:08:00.727 10855 ERROR nova     return fun(*args, **kwargs)
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/kombu/connection.py", line 508, in __call__
2016-11-16 17:08:00.727 10855 ERROR nova     return fun(*args, channel=channels[0], **kwargs), channels[0]
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/impl_rabbit.py", line 734, in execute_method
2016-11-16 17:08:00.727 10855 ERROR nova     method()
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/impl_rabbit.py", line 1120, in _publish
2016-11-16 17:08:00.727 10855 ERROR nova     compression=self.kombu_compression)
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/kombu/messaging.py", line 168, in publish
2016-11-16 17:08:00.727 10855 ERROR nova     routing_key, mandatory, immediate, exchange, declare)
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/kombu/messaging.py", line 184, in _publish
2016-11-16 17:08:00.727 10855 ERROR nova     mandatory=mandatory, immediate=immediate,
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/amqp/channel.py", line 2129, in basic_publish_confirm
2016-11-16 17:08:00.727 10855 ERROR nova     ret = self._basic_publish(*args, **kwargs)
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/amqp/channel.py", line 2122, in _basic_publish
2016-11-16 17:08:00.727 10855 ERROR nova     self._send_method((60, 40), args, msg)
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/amqp/abstract_channel.py", line 56, in _send_method
2016-11-16 17:08:00.727 10855 ERROR nova     self.channel_id, method_sig, args, content,
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/amqp/method_framing.py", line 219, in write_method
2016-11-16 17:08:00.727 10855 ERROR nova     properties = content._serialize_properties()
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/amqp/serialization.py", line 500, in _serialize_properties
2016-11-16 17:08:00.727 10855 ERROR nova     getattr(raw_bytes, "write_" + proptype)(val)
2016-11-16 17:08:00.727 10855 ERROR nova   File "/usr/lib/python2.7/site-packages/amqp/serialization.py", line 324, in write_shortstr
2016-11-16 17:08:00.727 10855 ERROR nova     if len(s) > 255:
2016-11-16 17:08:00.727 10855 ERROR nova TypeError: object of type "int" has no len()

根据输出的异常日志,进行排查,最终发现是由于python-kombu库兼容性导致,相关代码如下:

def _publish(self, exchange, msg, routing_key=None, timeout=None):
        """Publish a message."""
        producer = kombu.messaging.Producer(exchange=exchange,
                                            channel=self.channel,
                                            auto_declare=not exchange.passive,
                                            routing_key=routing_key)
        log_info = {"msg": msg,
                    "who": exchange or "default",
                    "key": routing_key}
        LOG.trace("Connection._publish: sending message %(msg)s to"
                  " %(who)s with routing key %(key)s", log_info)
        # NOTE(sileht): no need to wait more, caller expects
        # a answer before timeout is reached
        with self._transport_socket_timeout(timeout):
            producer.publish(msg, expiration=self._get_expiration(timeout),
                             compression=self.kombu_compression)

---------------------------------------------------------------------------------------
    def _get_expiration(self, timeout):
        # NOTE(gcb) kombu accept TTL as seconds instead of millisecond since
        # version 3.0.25, so do conversion according to kombu version.
        # TODO(gcb) remove this workaround when all supported branches
        # with requirement kombu >=3.0.25
        if timeout is not None:
            kombu_version = pkg_resources.get_distribution("kombu").version
            if not versionutils.is_compatible("3.0.25", kombu_version):
                timeout = int(timeout * 1000)
        return timeout

问题解决: yum upgrade python-kombu 升级python-kombu库。

QA02: neutron配置错误导致创建虚拟机失败

现场日志

2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 4715, in _get_guest_xml
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     network_info_str = str(network_info)
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/nova/network/model.py", line 521, in __str__
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     return self._sync_wrapper(fn, *args, **kwargs)
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/nova/network/model.py", line 504, in _sync_wrapper
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     self.wait()
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/nova/network/model.py", line 536, in wait
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     self[:] = self._gt.wait()
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 175, in wait
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     return self._exit_event.wait()
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/eventlet/event.py", line 125, in wait
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     current.throw(*self._exc)
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 214, in main
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     result = function(*args, **kwargs)
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/nova/utils.py", line 1159, in context_wrapper
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     return func(*args, **kwargs)
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1587, in _allocate_network_async
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     six.reraise(*exc_info)
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1570, in _allocate_network_async
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     bind_host_id=bind_host_id)
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 685, in allocate_for_instance
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     self._delete_ports(neutron, instance, created_port_ids)
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     self.force_reraise()
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     six.reraise(self.type_, self.value, self.tb)
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 674, in allocate_for_instance
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     security_group_ids, available_macs, dhcp_opts)
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 297, in _create_port
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     network_id, instance=instance)
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     self.force_reraise()
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     six.reraise(self.type_, self.value, self.tb)
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 256, in _create_port
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     port = port_client.create_port(port_req_body)
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 97, in with_params
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     ret = self.function(instance, *args, **kwargs)
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 654, in create_port
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     return self.post(self.ports_path, body=body)
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 363, in post
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     headers=headers, params=params)
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 298, in do_request
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     self._handle_fault_response(status_code, replybody, resp)
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 273, in _handle_fault_response
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     exception_handler_v20(status_code, error_body)
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]   File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 84, in exception_handler_v20
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119]     request_ids=request_ids)
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119] BadRequest: Specifying "tenant_id" other than authenticated tenant in request requires admin privileges
2016-11-17 17:54:23.742 31881 ERROR nova.compute.manager [instance: dd8774a1-3fc5-42d0-9d24-a629ed5c7119] Neutron server returns request_ids: ["req-209c7934-4bda-4dc6-87f0-f829b74df369"]

经过分析发现是Mitaka版本中对于neutron配置部分配置改变导致。

问题解决: 在 [neutron] 中添加如下几项: user_domain_name=Default project_domain_name=Default project_name = service

相比Kilo版本Mitaka版本对很多配置项都做了调整,所以在升级时需要根据官方配置样例和当前环境使用的配置项进行调整。

以上就是 Nova 从 Kilo 跨版本升级到 Mitaka 的过程及遇到的问题,希望对你有帮助。

本文链接:https://www.opsdev.cn/post/nova_upgrade_kilo_to_mitaka.html

-- EOF --

Comments

评论加载中...

注:如果长时间无法加载,请针对 disq.us | disquscdn.com | disqus.com 启用代理。