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:
pg_states = ['active', 'peering', 'clean', 'scrubbing', 'undersized',
'backfilling', 'recovering', 'degraded', 'inconsistent',
- 'remapped', 'backfill_toofull', 'wait_backfill',
+ 'remapped', 'backfill_toofull', 'backfill_wait',
'recovery_wait']
for state in pg_states: