Credits to Jochem Kuijpers for the fix.
Fixes: https://tracker.ceph.com/issues/36318
Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit
20966a3d7253cb1b2ac3339306e2b9b71a6d7ea3)
proc = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE)
for key, value in data.items():
- proc.stdin.write('{0} ceph.{1} {2}\n'.format(hostname, key, value))
+ proc.stdin.write('{0} ceph.{1} {2}\n'.format(hostname, key, value).encode('utf-8'))
stdout, stderr = proc.communicate()
if proc.returncode != 0: