UnicodeEncodeError from logging code during ceph-volume lvm create

Bug #1833191 reported by Trent Lloyd
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceph OSD Charm
Invalid
Undecided
Unassigned
ceph (Ubuntu)
Triaged
Low
Unassigned

Bug Description

When deploying ceph-osd with Bionic-Stein, a UnicdeEncodeError exception is logged every time a disk is initialized as a BlueStore OSD. The logging framework appears to catch this and it does not cause any actual problems, only the spurious warning.

The issue appears to be due to non-ascii characters in the output from "systemctl enable" that is executed by ceph-volume (you can see the stderr output at the bottom of the message)

cmd: ['ceph-volume', 'lvm', 'create', '--osd-fsid', '234af60b-d880-4dbb-89dd-658b1412f360', '--bluestore', '--data', 'ceph-234af60b-d880-4dbb-89dd-658b1412f360/osd-block-234af60b-d880-4dbb-89dd-658b1412f360', '--block.db', 'ceph-db-efa085db-6b36-4370-b3fb-76ddd7873154/osd-db-234af60b-d880-4dbb-89dd-658b1412f360']

--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.6/logging/__init__.py", line 996, in emit
    stream.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode character '\u2192' in position 186: ordinal not in range(128)
Call stack:
  File "/usr/sbin/ceph-volume", line 11, in <module>
    load_entry_point('ceph-volume==1.0.0', 'console_scripts', 'ceph-volume')()
  File "/usr/lib/python3/dist-packages/ceph_volume/main.py", line 38, in __init__
    self.main(self.argv)
  File "/usr/lib/python3/dist-packages/ceph_volume/decorators.py", line 59, in newfunc
    return f(*a, **kw)
  File "/usr/lib/python3/dist-packages/ceph_volume/main.py", line 148, in main
    terminal.dispatch(self.mapper, subcommand_args)
  File "/usr/lib/python3/dist-packages/ceph_volume/terminal.py", line 188, in dispatch
    instance.main()
  File "/usr/lib/python3/dist-packages/ceph_volume/devices/lvm/main.py", line 40, in main
    terminal.dispatch(self.mapper, self.argv)
  File "/usr/lib/python3/dist-packages/ceph_volume/terminal.py", line 188, in dispatch
    instance.main()
  File "/usr/lib/python3/dist-packages/ceph_volume/devices/lvm/create.py", line 69, in main
    self.create(args)
  File "/usr/lib/python3/dist-packages/ceph_volume/decorators.py", line 16, in is_root
    return func(*a, **kw)
  File "/usr/lib/python3/dist-packages/ceph_volume/devices/lvm/create.py", line 32, in create
    Activate([]).activate(args)
  File "/usr/lib/python3/dist-packages/ceph_volume/decorators.py", line 16, in is_root
    return func(*a, **kw)
  File "/usr/lib/python3/dist-packages/ceph_volume/devices/lvm/activate.py", line 257, in activate
    activate_bluestore(lvs, no_systemd=args.no_systemd)
  File "/usr/lib/python3/dist-packages/ceph_volume/devices/lvm/activate.py", line 184, in activate_bluestore
    systemctl.enable_volume(osd_id, osd_fsid, 'lvm')
  File "/usr/lib/python3/dist-packages/ceph_volume/systemd/systemctl.py", line 59, in enable_volume
    return enable(volume_unit % (device_type, id_, fsid))
  File "/usr/lib/python3/dist-packages/ceph_volume/systemd/systemctl.py", line 19, in enable
    process.run(['systemctl', 'enable', unit])
  File "/usr/lib/python3/dist-packages/ceph_volume/process.py", line 137, in run
    log_descriptors(reads, process, terminal_logging)
  File "/usr/lib/python3/dist-packages/ceph_volume/process.py", line 59, in log_descriptors
    log_output(descriptor_name, message, terminal_logging, True)
  File "/usr/lib/python3/dist-packages/ceph_volume/process.py", line 34, in log_output
    logger.info(line)
Message: 'stderr Created symlink /<email address hidden> \u2192 /lib/systemd/system/ceph-volume@.service.'
Arguments: ()

Tags: py3
Revision history for this message
Trent Lloyd (lathiat) wrote :

Reproduced on bionic with 13.2.4+dfsg1-0ubuntu2~cloud0 from the stein cloud-archive

tags: added: py3
description: updated
Changed in charm-ceph-osd:
status: New → Invalid
James Page (james-page)
Changed in ceph (Ubuntu):
importance: Undecided → Low
status: New → Triaged
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.