baremetal server creation fails: No valid host was found.

Bug #1950993 reported by Bas de Bruijne
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Ironic API Charm
New
Undecided
Felipe Reyes
OpenStack Nova Cloud Controller Charm
New
Undecided
Unassigned
OpenStack Placement Charm
New
Undecided
Unassigned

Bug Description

When creating a server for a baremetal node:

-------------------------------------------
openstack server create \
 --flavor baremetal-large \
 --volume $volume \
 --key-name mykey \
 --network $NETWORK_ID \
 test
-------------------------------------------

The server gives an error:

-------------------------------------------
| fault | {'code': 500, 'created': '2021-11-15T15:22:10Z', 'message': 'No valid host was found. ', 'details': 'Traceback (most recent call last):\n File "/usr/lib/python3/dist-packages/nova/conductor/manager.py", line 1462, in schedule_and_build_instances\n host_lists = self._schedule_instances(context, request_specs[0],\n File "/usr/lib/python3/dist-packages/nova/conductor/manager.py", line 868, in _schedule_instances\n host_lists = self.query_client.select_destinations(\n File "/usr/lib/python3/dist-packages/nova/scheduler/client/query.py", line 41, in select_destinations\n return self.scheduler_rpcapi.select_destinations(context, spec_obj,\n File "/usr/lib/python3/dist-packages/nova/scheduler/rpcapi.py", line 160, in select_destinations\n return cctxt.call(ctxt, \'select_destinations\', **msg_args)\n File "/usr/lib/python3/dist-packages/oslo_messaging/rpc/client.py", line 177, in call\n self.transport._send(self.target, msg_ctxt, msg,\n File "/usr/lib/python3/dist-packages/oslo_messaging/transport.py", line 124, in _send\n return self._driver.send(target, ctxt, message,\n File "/usr/lib/python3/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 652, in send\n return self._send(target, ctxt, message, wait_for_reply, timeout,\n File "/usr/lib/python3/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 644, in _send\n raise result\nnova.exception_Remote.NoValidHost_Remote: No valid host was found. \nTraceback (most recent call last):\n\n File "/usr/lib/python3/dist-packages/oslo_messaging/rpc/server.py", line 241, in inner\n return func(*args, **kwargs)\n\n File "/usr/lib/python3/dist-packages/nova/scheduler/manager.py", line 200, in select_destinations\n raise exception.NoValidHost(reason="")\n\nnova.exception.NoValidHost: No valid host was found. \n\n'} |
-------------------------------------------

From nova-cloud-controller logs:
-------------------------------------------
nova/nova-scheduler.log:Got 400: {"errors": [{"status": 400, "title": "Bad Request", "detail": "The server could not comply with the request since it is either malformed or otherwise incorrect.\n\n Invalid resource class in resources parameter: No such resource class CUSTOM_BAREMETAL_LARGE. ", "code": "placement.undefined_code", "request_id": "req-f7928846-fbbd-4dc8-950e-dbc9565af0b7"}]}.
nova/nova-conductor.log:2021-11-15 15:22:09.806 164180 ERROR nova.conductor.manager [req-981be1be-53d6-4e03-9e5b-a917f09105ff 95597b144c34406eba16b6e91c1744a4 e8eda340db8e4fab9cd95ce355c2fb18 - b98b2001a4634e8897badf6302b5862f b98b2001a4634e8897badf6302b5862f] Failed to schedule instances: nova.exception_Remote.NoValidHost_Remote: No valid host was found.
nova/nova-conductor.log:nova.exception.NoValidHost: No valid host was found.
-------------------------------------------

Indeed CUSTOM_BAREMETAL_LARGE is not listed in `openstack resource class list`. From the ironic docs, I understand that that resource class should be automatically generated when creating the `baremetal-large` flavor, but that does not happen.

Creating servers bared on the non-baremetal flavors works like it should.

Tags: cdo-qa
Revision history for this message
Felipe Reyes (freyes) wrote :

Hi Bas,

As we discussed offline, your flavor had the flags correctly set, although with the available data there is not much troubleshooting we can do, so please attach a juju crashdump once you hit this issue (make sure to deploy using debug=True in the charms), those logs could allow us to have a better understanding of what went wrong.

I'm setting this as `incomplete` until we have the crashdump.

Best,

Changed in charm-ironic-api:
status: New → Incomplete
Changed in charm-nova-cloud-controller:
status: New → Incomplete
Changed in charm-placement:
status: New → Incomplete
Revision history for this message
Bas de Bruijne (basdbruijne) wrote (last edit ):
Changed in charm-ironic-api:
status: Incomplete → New
Changed in charm-nova-cloud-controller:
status: Incomplete → New
Changed in charm-placement:
status: Incomplete → New
Changed in charm-ironic-api:
assignee: nobody → Felipe Reyes (freyes)
Revision history for this message
Przemyslaw Hausman (phausman) wrote :
tags: added: cdo-qa
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.