Ironic hypervisor showed no resource
I used devstack to set up my openstack ironic. After I added resources to a baremetal node, it reflected on the node however, no resourced showed up in hypervisor stats.
I tried following steps to synchronize the database:
• nova-manage cell_v2 discover_hosts --by-service --verbose
• nova-manage db sync
• nova-manage api_db sync
• restart placement services
• restart nova services
But nothing helped.
Here are some of my troubleshoot command output. Any help is appreciated!
stack@jason-1:~/devstack$ openstack resource provider list
+--------------------------------------+--------------------------------------+------------+
| uuid | name | generation |
+--------------------------------------+--------------------------------------+------------+
| 40a882d5-c34d-4903-93bc-d6c9d38b2302 | 40a882d5-c34d-4903-93bc-d6c9d38b2302 | 3 |
+--------------------------------------+--------------------------------------+------------+
stack@jason-1:~/devstack$ openstack hypervisor list
+----+--------------------------------------+-----------------+--------------+-------+
| ID | Hypervisor Hostname | Hypervisor Type | Host IP | State |
+----+--------------------------------------+-----------------+--------------+-------+
| 1 | 40a882d5-c34d-4903-93bc-d6c9d38b2302 | ironic | 10.250.65.11 | up |
+----+--------------------------------------+-----------------+--------------+-------+
stack@jason-1:~/devstack$ openstack hypervisor show 1
+----------------------+--------------------------------------+
| Field | Value |
+----------------------+--------------------------------------+
| aggregates | [] |
| cpu_info | |
| current_workload | 0 |
| disk_available_least | 0 |
| free_disk_gb | 0 |
| free_ram_mb | -512 |
| host_ip | 10.250.65.11 |
| hypervisor_hostname | 40a882d5-c34d-4903-93bc-d6c9d38b2302 |
| hypervisor_type | ironic |
| hypervisor_version | 1 |
| id | 1 |
| local_gb | 0 |
| local_gb_used | 0 |
| memory_mb | 0 |
| memory_mb_used | 512 |
| running_vms | 0 |
| service_host | jason-1 |
| service_id | 4 |
| state | up |
| status | enabled |
| vcpus | 0 |
| vcpus_used | 0 |
+----------------------+--------------------------------------+
stack@jason-1:~/devstack$ openstack hypervisor stats show
+----------------------+-------+
| Field | Value |
+----------------------+-------+
| count | 1 |
| current_workload | 0 |
| disk_available_least | 0 |
| free_disk_gb | 0 |
| free_ram_mb | -512 |
| local_gb | 0 |
| local_gb_used | 0 |
| memory_mb | 0 |
| memory_mb_used | 512 |
| running_vms | 0 |
| vcpus | 0 |
| vcpus_used | 0 |
+----------------------+-------+
stack@jason-1:~/devstack$ ironic node-show node-0
The "ironic" CLI is deprecated and will be removed in the S* release. Please use the "openstack baremetal" CLI instead.
+------------------------+--------------------------------------------------------------------------+
| Property | Value |
+------------------------+--------------------------------------------------------------------------+
| bios_interface | no-bios |
| boot_interface | pxe |
| chassis_uuid | eb7a6987-488f-4bfd-a85c-fdb812d5648e |
| clean_step | {} |
| conductor_group | |
| console_enabled | False |
| console_interface | no-console |
| created_at | 2018-11-09T03:04:00+00:00 |
| deploy_interface | iscsi |
| deploy_step | {} |
| driver | ipmi |
| driver_info | {u'ipmi_address': u'10.250.58.13', u'ipmi_username': u'root', |
| | u'deploy_kernel': u'13ab65de-0c66-43c5-9771-d0c751074f56', |
| | u'rescue_kernel': u'd05e88ab-7fda-4794-9be5-9700178f3a45', |
| | u'deploy_ramdisk': u'6fc8c575-7ab9-43cd-8cf7-62779f6d7ab3', |
| | u'ipmi_password': u'******', u'provisioning_network': |
| | u'9b54ecba-5293-4796-b4d9-0721aeef74ce', u'cleaning_network': |
| | u'9b54ecba-5293-4796-b4d9-0721aeef74ce', u'rescue_ramdisk': |
| | u'502d2b31-08b7-4df9-9e35-bd4d09f6ca5b'} |
| driver_internal_info | {} |
| extra | {} |
| fault | None |
| inspect_interface | inspector |
| inspection_finished_at | None |
| inspection_started_at | None |
| instance_info | {} |
| instance_uuid | None |
| last_error | None |
| maintenance | False |
| maintenance_reason | None |
| management_interface | ipmitool |
| name | node-0 |
| network_interface | flat |
| power_interface | ipmitool |
| power_state | power on |
| properties | {u'memory_mb': 32000, u'cpu_arch': u'x86_64', u'local_gb': 128, u'cpus': |
| | 32, u'capabilities': u'boot_mode:uefi'} |
| provision_state | available |
| provision_updated_at | 2018-11-09T03:15:58+00:00 |
| raid_config | {} |
| raid_interface | no-raid |
| rescue_interface | no-rescue |
| reservation | None |
| resource_class | baremetal |
| storage_interface | noop |
| target_power_state | None |
| target_provision_state | None |
| target_raid_config | {} |
| traits | [u'CUSTOM_GOLD'] |
| updated_at | 2018-11-09T03:16:10+00:00 |
| uuid | 40a882d5-c34d-4903-93bc-d6c9d38b2302 |
| vendor_interface | ipmitool |
+------------------------+--------------------------------------------------------------------------+
stack@jason-1:~/devstack$ nova-manage cell_v2 list_cells
/usr/local/lib/python2.7/dist-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
""")
+-------+--------------------------------------+--------------------------------------------------------+-------------------------------------------------------------+----------+
| Name | UUID | Transport URL | Database Connection | Disabled |
+-------+--------------------------------------+--------------------------------------------------------+-------------------------------------------------------------+----------+
| cell0 | 00000000-0000-0000-0000-000000000000 | none:/ | mysql+pymysql://root:****@127.0.0.1/nova_cell0?charset=utf8 | False |
| cell1 | fff0d490-1ce9-4866-875b-197e9c2e2f1a | rabbit://stackrabbit:****@10.250.65.11:5672/nova_cell1 | mysql+pymysql://root:****@127.0.0.1/nova_cell1?charset=utf8 | False |
+-------+--------------------------------------+--------------------------------------------------------+-------------------------------------------------------------+----------+
s
Can you edit your question and format it so that command output becomes readable? Use the button labeled “101010”.
Thanks for instruction. I have fixed it. Please let me know it looks okay.
Beautiful. Now I guess you also want an answer :) Not sure if I have one right away.
My first observation is that it takes a while until Nova knows about Ironic's baremetal nodes. Though less than three days :)
Next, if you have debug logging enabled, I think the n-cpu log should show how nova-compute communicates with Ironic. Unfortunately I don't remember what to look for.