TypeError when logging device_map

Bug #1789073 reported by Avishay Traeger
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-brick
Invalid
Undecided
Unassigned

Bug Description

At the end of _get_connection_devices(), the device_map is logged. This results in the attached stack trace.

If I change the line from:
LOG.debug('Resulting device map %s', device_map)
To:
LOG.debug('Resulting device map %s', str(device_map))
The following is printed:
Resulting device map defaultdict(<function <lambda> at 0x3d99668>, {(u'10.47.212.21:3260', u'iqn.2010-06.com.purestorage:flasharray.5f252660cfa07c08'): (set([u'sdg']), set([])), (u'10.47.212.22:3260', u'iqn.2010-06.com.purestorage:flasharray.5f252660cfa07c08'): (set([u'sdf']), set([])), (u'10.47.212.11:3260', u'iqn.2010-06.com.purestorage:flasharray.5f252660cfa07c08'): (set([u'sdd']), set([])), (u'10.47.212.12:3260', u'iqn.2010-06.com.purestorage:flasharray.5f252660cfa07c08'): (set([u'sde']), set([]))})(iscsi::_get_connection_devices:823)

Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/__init__.py", line 851, in emit
    msg = self.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 724, in format
    return fmt.format(record)
  File "/usr/lib/python2.7/site-packages/strato_common/log/machinereadableformatter.py", line 12, in format
    return simplejson.dumps(data, default=self._defaultSerializer, encoding='raw-unicode-escape')
  File "/usr/lib64/python2.7/site-packages/simplejson/__init__.py", line 397, in dumps
    **kw).encode(obj)
  File "/usr/lib64/python2.7/site-packages/simplejson/encoder.py", line 275, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib64/python2.7/site-packages/simplejson/encoder.py", line 357, in iterencode
    return _iterencode(o, 0)
TypeError: keys must be a string
Logged from file iscsi.py, line 823

Changed in os-brick:
status: New → Incomplete
Revision history for this message
Avishay Traeger (avishay-il) wrote :

Not reproducible

Changed in os-brick:
status: Incomplete → Invalid
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.