bdev: Fix DRBD error reporting for syncer rate
authorMichael Hanselmann <hansmi@google.com>
Tue, 19 Jun 2012 10:42:55 +0000 (12:42 +0200)
committerMichael Hanselmann <hansmi@google.com>
Tue, 19 Jun 2012 11:02:14 +0000 (13:02 +0200)
The function is supposed to return a list, not a string. Without this
patch the error message ends up as “C, a, n, ', t,  , c, h, a, n, g, e,
…”.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

lib/bdev.py

index 6c16da4..47b8931 100644 (file)
@@ -1633,7 +1633,7 @@ class DRBD8(BaseDRBD):
       msg = ("Can't change syncer rate: %s - %s" %
              (result.fail_reason, result.output))
       logging.error(msg)
-      return msg
+      return [msg]
 
     return []