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