nova scheduler debug logs TypeError

Bug #2028518 reported by Friedrich Hiekel
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)

Bug Description


while activating nova scheduler logs for debugging I face this issue creating a new vm.
The vm is created anyway.

Steps to reproduce
1. set debug in nova-scheduler to ture
 debug = true
2. create a vm
3. look into a nova-scheduler logs

Expected result
debug log should shown without any stacktraces

Actual result
an error/stacktrace is thrown


Openstack: Yoga
Python: Python 3.10.6

Logs & Configs
Traceback (most recent call last):
  File "/usr/lib/python3.10/logging/", line 1100, in emit
    msg = self.format(record)
  File "/usr/local/lib/python3.10/dist-packages/oslo_log/", line 156, in format
    return logging.StreamHandler.format(self, record) + record.reset_color
  File "/usr/lib/python3.10/logging/", line 943, in format
    return fmt.format(record)
  File "/usr/local/lib/python3.10/dist-packages/oslo_log/", line 271, in format
    return _json_dumps_with_fallback(message)
  File "/usr/local/lib/python3.10/dist-packages/oslo_log/", line 181, in _json_dumps_with_fallback
    return jsonutils.dumps(obj, default=convert)
  File "/usr/local/lib/python3.10/dist-packages/oslo_serialization/", line 202, in dumps
    return json.dumps(obj, default=default, **kwargs)
  File "/usr/lib/python3.10/json/", line 238, in dumps
  File "/usr/lib/python3.10/json/", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python3.10/json/", line 257, in iterencode
    return _iterencode(o, 0)
TypeError: keys must be str, int, float, bool or None, not tuple
Call stack:
  File "/usr/local/lib/python3.10/dist-packages/eventlet/", line 88, in _spawn_n_impl
    func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/futurist/", line 71, in __call__
  File "/usr/local/lib/python3.10/dist-packages/futurist/", line 49, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/dist-packages/oslo_messaging/rpc/", line 165, in _process_incoming
    res = self.dispatcher.dispatch(message)
  File "/usr/local/lib/python3.10/dist-packages/oslo_messaging/rpc/", line 309, in dispatch
    return self._do_dispatch(endpoint, method, ctxt, args)
  File "/usr/local/lib/python3.10/dist-packages/oslo_messaging/rpc/", line 229, in _do_dispatch
    result = func(ctxt, **new_args)
  File "/usr/local/lib/python3.10/dist-packages/oslo_messaging/rpc/", line 241, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/nova/scheduler/", line 223, in select_destinations
    selections = self._select_destinations(
  File "/usr/local/lib/python3.10/dist-packages/nova/scheduler/", line 250, in _select_destinations
    selections = self._schedule(
  File "/usr/local/lib/python3.10/dist-packages/nova/scheduler/", line 360, in _schedule
    hosts = self._get_sorted_hosts(spec_obj, hosts, num)
  File "/usr/local/lib/python3.10/dist-packages/nova/scheduler/", line 615, in _get_sorted_hosts
    weighed_hosts = self.host_manager.get_weighed_hosts(
  File "/usr/local/lib/python3.10/dist-packages/nova/scheduler/", line 606, in get_weighed_hosts
    return self.weight_handler.get_weighed_objects(self.weighers,
  File "/usr/local/lib/python3.10/dist-packages/nova/", line 136, in get_weighed_objects
Message: '%s: raw weights %s'
Arguments: ('CPUWeigher', {('compute-01', 'compute-01): 127.0, ('worker-01', 'worker-01'): 125.0})

Revision history for this message
Friedrich Hiekel (fhiekel) wrote :
Revision history for this message
Friedrich Hiekel (fhiekel) wrote :
Revision history for this message
Uggla (rene-ribaud) wrote :

Hello Friedrich,

Thanks for submitting this bug and the associated patch.
That sounds good to me so I traiged it as "fix committed"

Changed in nova:
status: New → Fix Committed
Revision history for this message
sean mooney (sean-k-mooney) wrote :

the patch has not been merged and the one submitted to gerrit is doing the reverse fo the one attached
so setting this back to new

Changed in nova:
status: Fix Committed → New
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.