Permission denied: /usr/lib/python3/dist-packages/compute_id

Bug #2021583 reported by ZhangLong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

nova 27.0.0 in ubuntu22.04

systemctl start nova-compute

nova-compute.log:

023-05-30 15:28:48.756 488626 WARNING nova.virt.libvirt.driver [None req-30f2cb11-67c9-4cb7-8f64-c05a75305bad - - - - - -] Cannot update service status on host "node2" since it is not registered.: nova.exception_Remote.ComputeHostNotFound_Remote: Compute host node2 could not be found.
2023-05-30 15:28:48.794 488626 INFO nova.virt.node [None req-30f2cb11-67c9-4cb7-8f64-c05a75305bad - - - - - -] Generated node identity ada538d9-7bd0-4c11-a567-deae583595c6
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service [None req-30f2cb11-67c9-4cb7-8f64-c05a75305bad - - - - - -] Error starting thread.: nova.exception.InvalidNodeConfiguration: Invalid node identity configuration: Unable to write uuid to /usr/lib/python3/dist-packages/compute_id: [Errno 13] Permission denied: '/usr/lib/python3/dist-packages/compute_id'
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service Traceback (most recent call last):
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/nova/virt/node.py", line 38, in write_local_node_uuid
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service with open(fn, 'x') as f:
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service PermissionError: [Errno 13] Permission denied: '/usr/lib/python3/dist-packages/compute_id'
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service During handling of the above exception, another exception occurred:
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service Traceback (most recent call last):
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/oslo_service/service.py", line 806, in run_service
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service service.start()
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/nova/service.py", line 162, in start
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service self.manager.init_host(self.service_ref)
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/nova/compute/manager.py", line 1614, in init_host
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service nodes_by_uuid = self._get_nodes(context)
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/nova/compute/manager.py", line 1476, in _get_nodes
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service node_ids = self.driver.get_nodenames_by_uuid()
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/nova/virt/libvirt/driver.py", line 11363, in get_nodenames_by_uuid
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service return {self._host.get_node_uuid(): self._host.get_hostname()}
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/nova/virt/libvirt/host.py", line 1075, in get_node_uuid
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service self._node_uuid = nova.virt.node.get_local_node_uuid()
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/nova/virt/node.py", line 105, in get_local_node_uuid
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service write_local_node_uuid(node_uuid)
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/nova/virt/node.py", line 47, in write_local_node_uuid
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service raise exception.InvalidNodeConfiguration(
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service nova.exception.InvalidNodeConfiguration: Invalid node identity configuration: Unable to write uuid to /usr/lib/python3/dist-packages/compute_id: [Errno 13] Permission denied: '/usr/lib/python3/dist-packages/compute_id'
2023-05-30 15:28:48.795 488626 ERROR oslo_service.service

Tags: nova-compute
Revision history for this message
ZhangLong (ankele) wrote :

I have confirmed that there is no this file compute_id

tags: added: nova-compute
Revision history for this message
ZhangLong (ankele) wrote :

After I touched a file named compute_id manually, the issue went away.

Revision history for this message
ZhangLong (ankele) wrote :

I find the missing config entry in nova.conf:
[DEFAULT]
log_dir = /var/log/nova
lock_path = /var/lock/nova
state_path = /var/lib/nova

after I added the configuration, everything was fine.

Changed in nova:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.