Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

error in nova-compute service while nova service all up

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, compute service works fine:

# openstack compute service list

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

| ID | Binary | Host | Zone | Status | State | Updated At |

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

| 40 | nova-consoleauth | dcg-bj-01 | internal | enabled | up | 2018-09-17T02:16:20.000000 |

| 41 | nova-scheduler | dcg-bj-01 | internal | enabled | up | 2018-09-17T02:16:21.000000 |

| 42 | nova-conductor | dcg-bj-01 | internal | enabled | up | 2018-09-17T02:16:22.000000 |

| 43 | nova-compute | dcg-bj-01 | nova | enabled | up | 2018-09-17T02:16:22.000000 |

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

hostname, fqdn and /etc/hosts:

# hostname

dcg-bj-01

# hostname -f

dcg-bj-01.bj.abc.com

# cat /etc/hosts

127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters 172.16.182.50 dcg-bj-01

# cat /etc/resolv.conf

nameserver 10.248.2.5 nameserver 10.239.27.228 nameserver 172.17.6.9 search bj.abc.com

What need to mention is all network connection are go out through a proxy except local IP address

# cat /etc/profile

... export http_proxy="http://child-prc.abc.com:913"

export https_proxy="https://child-prc.abc.com:913"

export no_proxy="127.0.0.1,localhost,172.16.182.50,sub.domain.local,domain.local"

partial of my /etc/nova/nova.conf

...

[DEFAULT]

transport_url = rabbit://openstack:DCG@dcg-bj-01

use_neutron = True

firewall_driver = nova.virt.firewall.NoopFirewallDriver

enabled_apis = osapi_compute,metadata

my_ip = 172.16.182.50

osapi_compute_workers = 10

metadata_workers = 5

compute_driver = libvirt.LibvirtDriver

[libvirt]

virt_type = qemu

I tried various ways including comment all proxy configuration, restart all nova-*.service/libvirtd, change nova.conf and nova-compute.conf to make virt_type=qemu, even clear nova database and start nova from scratch, still got same error. please kindly share your comments or clues, it's quite excruciating for these days.