Ask Your Question
0

error in nova-compute service while nova service all up

asked 2018-09-19 09:54:52 -0600

aaron.yi gravatar image

Errors in /etc/log/nova/nova-compute.log shown below. it hint that 'Compute host dcg-bj-01 could not be found. And result of 'nova hypervisor list' is empty.

# nova hypervisor-list

+----+---------------------+-------+--------+

| ID | Hypervisor hostname | State | Status |

+----+---------------------+-------+--------+

+----+---------------------+-------+--------+

ComputeHostNotFound: Compute host dcg-bj-01 could not be found. 2018-09-19 06:59:00.099 131963 ERROR nova.compute.manager [req-3087a441-08d9-4213-8664-cb09a7db987e - - - - -] Error updating resources for node dcg-bj-01.: OSError: [Errno 2] No such file or directory: '/usr/lib/python2.7/dist-packages/instances' 2018-09-19 06:59:00.099 131963 ERROR nova.compute.manager Traceback (most recent call last): 2018-09-19 06:59:00.099 131963 ERROR nova.compute.manager File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 6756, in update_available_resource_for_node 2018-09-19 06:59:00.099 131963 ERROR nova.compute.manager rt.update_available_resource(context, nodename) 2018-09-19 06:59:00.099 131963 ERROR nova.compute.manager File "/usr/lib/python2.7/dist-packages/nova/compute/resource_tracker.py", line 688, in update_available_resource 2018-09-19 06:59:00.099 131963 ERROR nova.compute.manager resources = self.driver.get_available_resource(nodename) 2018-09-19 06:59:00.099 131963 ERROR nova.compute.manager File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 5979, in get_available_resource 2018-09-19 06:59:00.099 131963 ERROR nova.compute.manager disk_info_dict = self._get_local_gb_info() 2018-09-19 06:59:00.099 131963 ERROR nova.compute.manager File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 5548, in _get_local_gb_info 2018-09-19 06:59:00.099 131963 ERROR nova.compute.manager info = libvirt_utils.get_fs_info(CONF.instances_path) 2018-09-19 06:59:00.099 131963 ERROR nova.compute.manager File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/utils.py", line 435, in get_fs_info 2018-09-19 06:59:00.099 131963 ERROR nova.compute.manager hddinfo = os.statvfs(path) 2018-09-19 06:59:00.099 131963 ERROR nova.compute.manager OSError: [Errno 2] No such file or directory: '/usr/lib/python2.7/dist-packages/instances' 2018-09-19 06:59:00.099 131963 ERROR nova.compute.manager 2018-09-19 07:00:01.990 131963 ERROR nova.compute.manager [req-3087a441-08d9-4213-8664-cb09a7db987e - - - - -] No compute node record for host dcg-bj-01: ComputeHostNotFound_Remote: Compute host dcg-bj-01 could not be found. Traceback (most recent call last):

File "/usr/lib/python2.7/dist-packages/nova/conductor/manager.py", line 124, in _object_dispatch return getattr(target, method)(args, *kwargs)

File "/usr/lib/python2.7/dist-packages/oslo_versionedobjects/base.py", line 184, in wrapper result = fn(cls, context, args, *kwargs)

File "/usr/lib/python2.7/dist-packages/nova/objects/compute_node.py", line 437, in get_all_by_host use_slave=use_slave)

File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 235, in wrapper return f(args, *kwargs)

File "/usr/lib/python2.7/dist-packages/nova/objects/compute_node.py", line 432, in _db_compute_node_get_all_by_host return db.compute_node_get_all_by_host(context, host)

File "/usr/lib/python2.7/dist-packages/nova/db/api.py", line 297, in compute_node_get_all_by_host return IMPL.compute_node_get_all_by_host(context, host)

File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 280, in wrapped return f(context, args, *kwargs)

File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 713, in compute_node_get_all_by_host raise exception.ComputeHostNotFound(host=host)

However ... (more)

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2019-05-02 23:58:25 -0600

This is because you might have missed to create the databases for nova_cell0.

mysql -u root -p

MariaDB [(none)]> CREATE DATABASE nova_cell0;

MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'localhost' \ IDENTIFIED BY 'NOVA_DBPASS';

MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' \ IDENTIFIED BY 'NOVA_DBPASS';

su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova

su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" nova

su -s /bin/sh -c "nova-manage db sync" nova

nova-manage cell_v2 list_cells

Then restart compute services. then try the command:

openstack compute service list

this solution also holds good when OpenStack compute service list is empty or nova hypervisor list is empty.

edit flag offensive delete link more
0

answered 2018-09-26 03:12:55 -0600

aaron.yi gravatar image

anyone know what the status "This post is awaiting moderation" mean? anything I need to do to make my question post?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2018-09-19 09:54:52 -0600

Seen: 235 times

Last updated: Sep 19 '18