Merge PR #28624 into master

* refs/pull/28624/head:
	mgr/zabbix: encode string for Python 3 compatibility

Reviewed-by: Tim Serong <tserong@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Sage Weil 2019-06-24 13:15:16 -05:00
commit fe4c5fcb26

View File

@ -38,7 +38,7 @@ class ZabbixSender(object):
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: