A new Nova service: nova-conductor

OpenStack Grizzly 版本引入 nova-conductor 服务,旨在实现 no-db-compute 目标,即移除 nova-compute 的直接数据库访问权限。这有助于提高安全性并简化升级过程。nova-conductor 作为 nova-compute 和数据库间的中介,负责处理复杂的跨节点操作。


Come from:   http://russellbryantnet.wordpress.com/2012/11/19/a-new-nova-service-nova-conductor/

The Grizzly release of OpenStack Nova will have a new service, nova-conductor. The service was discussed on theopenstack-dev list and it was merged today. There is currently a configuration option that can be turned on to make it optional, but it is possible that by the time Grizzly is released, this service will be required.

One of the efforts that started during Folsom development and is scheduled to be completed in Grizzly isno-db-compute. In short, this effort is to remove direct database access from the nova-compute service. There are two main reasons we are doing this. Compute nodes are the least trusted part of a nova deployment, so removing direct database access is a step toward reducing the potential impact of a compromised compute node. The other benefit of no-db-compute is for upgrades. Direct database access complicates the ability to do live rolling upgrades. We’re working toward eventually making that possible, and this is a part of that.

All of the nova services use a messaging system (usually AMQP based) to communicate with each other. Many of the database accesses in nova-compute can be (and have been) removed by just sending more data in the initial message sent to nova-compute. However, that doesn’t apply to everything. That’s where the new service, nova-conductor, comes in.

The nova-conductor service is key to completing no-db-compute. Conceptually, it implements a new layer on top of nova-compute. It should *not* be deployed on compute nodes, or else the security benefits of removing database access from nova-compute will be negated. Just like other nova services such as nova-api or nova-scheduler, it can be scaled horizontally. You can run multiple instances of nova-conductor on different machines as needed for scaling purposes.

The methods exposed by nova-conductor will initially be relatively simple methods used by nova-compute to offload its database operations. Places where nova-compute previously did database access will now be talking to nova-conductor. However, we have plans in the medium to long term to move more and more of what is currently in nova-compute up to the nova-conductor layer. The compute service will start to look like a less intelligent slave service to nova-conductor. The conductor service will implement long running complex operations, ensuring forward progress and graceful error handling. This will be especially beneficial for operations that cross multiple compute nodes, such as migrations or resizes.

If you have any comments, questions, or suggestions for nova-conductor or the no-db-compute effort in general, please feel free to bring it up on theopenstack-dev list.


/var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova Traceback (most recent call last): /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova File "/usr/bin/nova-conductor", line 10, in <module> /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova sys.exit(main()) /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova File "/usr/lib/python2.7/site-packages/nova/cmd/conductor.py", line 44, in main /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova topic=rpcapi.RPC_TOPIC) /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova File "/usr/lib/python2.7/site-packages/nova/service.py", line 271, in create /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova periodic_interval_max=periodic_interval_max) /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova File "/usr/lib/python2.7/site-packages/nova/service.py", line 129, in __init__ /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova self.manager = manager_class(host=self.host, *args, **kwargs) /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 117, in __init__ /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova self.compute_task_mgr = ComputeTaskManager() /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 243, in __init__ /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova self.report_client = report.SchedulerReportClient() /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova File "/usr/lib/python2.7/site-packages/nova/scheduler/client/report.py", line 186, in __init__ /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova self._client = self._create_client() /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova File "/usr/lib/python2.7/site-packages/nova/scheduler/client/report.py", line 229, in _create_client /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova client = self._adapter or utils.get_sdk_adapter('placement') /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova File "/usr/lib/python2.7/site-packages/nova/utils.py", line 1039, in get_sdk_adapter /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova return getattr(conn, service_type) /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova File "/usr/lib/python2.7/site-packages/openstack/service_description.py", line 92, in __get__ /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova endpoint = proxy_mod.Proxy.get_endpoint(proxy) /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 282, in get_endpoint /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova return self.session.get_endpoint(auth or self.auth, **kwargs) /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 1218, in get_endpoint /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova return auth.get_endpoint(self, **kwargs) /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 380, in get_endpoint /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova allow_version_hack=allow_version_hack, **kwargs) /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 271, in get_endpoint_data /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova service_catalog = self.get_access(session).service_catalog /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 134, in get_access /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova self.auth_ref = self.get_auth_ref(session) /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/generic/base.py", line 208, in get_auth_ref /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova return self._plugin.get_auth_ref(session, **kwargs) /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/v3/base.py", line 188, in get_auth_ref /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova authenticated=False, log=False, **rkwargs) /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 1124, in post /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova return self.request(url, 'POST', **kwargs) /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 906, in request /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova resp = send(**kwargs) /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 1013, in _send_request /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova raise exceptions.ConnectFailure(msg) /var/log/nova/nova-conductor.log:2025-06-09 08:16:20.832 9487 ERROR nova ConnectFailure: Unable to establish connection to http://lsycontroller:5000/v3/auth/tokens: HTTPConnectionPool(host='lsycontroller', port=5000): Max retries exceeded with url: /v3/auth/tokens (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fedb6d77190>: Failed to establish a new connection: [Errno 111] ECONNREFUSED',))
06-12
systemctl start openstack-nova-conductor openstack-nova-scheduler Job for openstack-nova-conductor.service failed because the control process exited with error code. See "systemctl status openstack-nova-conductor.service" and "journalctl -xe" for details. Job for openstack-nova-scheduler.service failed because the control process exited with error code. See "systemctl status openstack-nova-scheduler.service" and "journalctl -xe" for details. [root@controller ~]# [root@controller ~]# journalctl -xe Nov 19 02:06:44 controller systemd[1]: openstack-nova-conductor.service: main process exited, code=exited, status=1/FAILURE Nov 19 02:06:44 controller systemd[1]: Failed to start OpenStack Nova Conductor Server. -- Subject: Unit openstack-nova-conductor.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit openstack-nova-conductor.service has failed. -- -- The result is failed. Nov 19 02:06:44 controller systemd[1]: Unit openstack-nova-conductor.service entered failed state. Nov 19 02:06:44 controller systemd[1]: openstack-nova-conductor.service failed. Nov 19 02:06:44 controller systemd[1]: openstack-nova-conductor.service holdoff time over, scheduling restart. Nov 19 02:06:44 controller systemd[1]: Stopped OpenStack Nova Conductor Server. -- Subject: Unit openstack-nova-conductor.service has finished shutting down -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit openstack-nova-conductor.service has finished shutting down. Nov 19 02:06:44 controller systemd[1]: Starting OpenStack Nova Conductor Server... -- Subject: Unit openstack-nova-conductor.service has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit openstack-nova-conductor.service has begun starting up. Nov 19 02:06:47 controller systemd[1]: openstack-nova-scheduler.service holdoff time over, scheduling restart. Nov 19 02:06:47 controller systemd[1]: Stopped OpenStack Nova Scheduler Server. -- Subject: Unit openstack-nova-scheduler.service has finished shutting down -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit openstack-nova-scheduler.service has finished shutting down. Nov 19 02:06:47 controller systemd[1]: Starting OpenStack Nova Scheduler Server... -- Subject: Unit openstack-nova-scheduler.service has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit openstack-nova-scheduler.service has begun starting up. lines 3387-3423/3423 (END)这是什么错误,怎么解决
最新发布
11-20
当使用 `systemctl` 启动 `openstack-nova-conductor` 和 `openstack-nova-scheduler` 服务时,因控制进程退出返回错误代码导致服务启动失败,可以按以下方法解决: ### 查看详细错误信息 使用 `systemctl status` 和 `journalctl -xe` 命令查看详细的错误信息,以定位具体问题。 ```bash systemctl status openstack-nova-conductor.service journalctl -xe systemctl status openstack-nova-scheduler.service ``` ### 检查依赖服务 确保 `Httpd` 服务已经启动,因为 OpenStack 通过 `endpoint`(`http`)访问服务。 ```bash systemctl start httpd systemctl enable httpd ``` ### 解决 MySQL 相关问题 可能存在 MySQL 事务超时和连接关闭错误,需要检查和调整 MySQL 配置、调整 `SQLAlchemy` 连接池配置、在代码中增加异常处理和重试逻辑、优化 SQL 查询等。 ```bash # 检查和调整 MySQL 配置 vi /etc/my.cnf # 调整 SQLAlchemy 连接池配置 # 在相关配置文件中修改连接池参数 ``` ### 优化 Nova 和 MySQL 之间安全通道 关闭集群新建入口、确认 VIP(虚拟 IP)所在节点、停止备节点的 `Nova-Conductor` 服务、清理 `RabbitMQ` 消息队列、启动 VIP 节点上的 `Nova-Conductor` 服务、观察 `Nova-Conductor` 日志、重启 `Nova-API` 服务、等待 2 - 3 分钟、灰度恢复备节点的 `Nova-Conductor` 服务。 ```bash # 停止备节点的 Nova-Conductor 服务 systemctl stop openstack-nova-conductor.service # 清理 RabbitMQ 消息队列 rabbitmqctl purge_queue <queue_name> # 启动 VIP 节点上的 Nova-Conductor 服务 systemctl start openstack-nova-conductor.service ``` ### 重启相关服务 可尝试重启相关的 OpenStack 服务,如 `openstack-nova-api`、`openstack-nova-novncproxy` 等。 ```bash systemctl restart openstack-nova-api openstack-nova-conductor openstack-nova-scheduler openstack-nova-novncproxy ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值