diff options
author | James Page <james.page@ubuntu.com> | 2013-02-18 16:24:54 +0000 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-02-18 14:41:26 -0800 |
commit | 7889c5412deaab1e7ba53d66814d0f25659229c1 (patch) | |
tree | 9129683450b70c619a0656676afc742e77d0308a | |
parent | 42fba772c3c0e2396124a9d6ec39297dd9af4cc9 (diff) | |
download | ceph-7889c5412deaab1e7ba53d66814d0f25659229c1.tar.gz |
Strip any trailing whitespace from rbd showmapped
More recent versions of ceph append a bit of whitespace to the line
after the name of the /dev/rbdX device; this causes the monitor check
to fail as it can't find the device name due to the whitespace.
This fix excludes any characters after the /dev/rbdN match.
(cherry picked from commit ad84ea07cac5096de38b51b8fc452c99f016b8d8)
-rw-r--r-- | src/ocf/rbd.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ocf/rbd.in b/src/ocf/rbd.in index 041788d96fc..150ad6e6b21 100644 --- a/src/ocf/rbd.in +++ b/src/ocf/rbd.in @@ -134,7 +134,7 @@ find_rbd_dev() { # Build the sed pattern, substituting "-" for the snapshot name if # it's unset - sedpat="[0-9]\+[ \t]\+${OCF_RESKEY_pool}[ \t]\+${OCF_RESKEY_name}[ \t]\+${OCF_RESKEY_snap:--}[ \t]\+\(/dev/rbd[0-9]\+\)" + sedpat="[0-9]\+[ \t]\+${OCF_RESKEY_pool}[ \t]\+${OCF_RESKEY_name}[ \t]\+${OCF_RESKEY_snap:--}[ \t]\+\(/dev/rbd[0-9]\+\).*" # Run rbd showmapped, filter out the header line, then try to # extract the device name |