Public bug reported:

Taken from rbd RA

find_rbd_dev() {
    local sedpat

    # Example output from "rbd showmapped" (tab separated):
    # id        pool    image   snap    device
    # 0         rbd     test    -       /dev/rbd0

    # 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]\+\)"

    # Run rbd showmapped, filter out the header line, then try to
    # extract the device name
    rbd showmapped | tail -n +2 | sed -n -e "s,$sedpat,\1,p"
}

rbd showmapped is outputing a trailing whitespace character at the end
of the block device which means that the monitor check can't find the
mapped block device

add | tr -d ' ' fixes the problem

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: ceph-resource-agents 0.56.3-0ubuntu1 [modified: 
usr/lib/ocf/resource.d/ceph/rbd]
ProcVersionSignature: Ubuntu 3.8.0-6.13-generic 3.8.0-rc7
Uname: Linux 3.8.0-6-generic x86_64
ApportVersion: 2.8-0ubuntu4
Architecture: amd64
Date: Mon Feb 18 10:47:14 2013
MarkForUpload: True
PackageArchitecture: all
SourcePackage: ceph
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: ceph (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug raring uec-images

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to ceph in Ubuntu.
https://bugs.launchpad.net/bugs/1129217

Title:
  rbd showmapped has trailing whitespace which break rbd monitor

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/1129217/+subscriptions

-- 
Ubuntu-server-bugs mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to