Issue 312 in ganeti: Patch: Incorrect RBD code causes failure to create RBD devices

11 views
Skip to first unread message

gan...@googlecode.com

unread,
Nov 15, 2012, 5:59:56 PM11/15/12
to ganeti...@googlegroups.com
Status: New
Owner: ----

New issue 312 by jeffrey.mitchell: Patch: Incorrect RBD code causes failure
to create RBD devices
http://code.google.com/p/ganeti/issues/detail?id=312

What software version are you running? Please provide the output of "gnt-
cluster --version" and "gnt-cluster version".

gnt-cluster (ganeti v2.6.0-25-g27e15be) 2.6.1

Software version: 2.6.1
Internode protocol: 2060000
Configuration format: 2060000
OS api version: 20
Export interface: 0


What distribution are you using?
Ubuntu 12.04 with 3.6.3 kernel from the Ceph team (recommended for kernel
RBD client).


What steps will reproduce the problem?
1. Attempt to create an instance using the RBD backend.


What is the expected output? What do you see instead?
Ganeti expects different output than is actually displayed from "rbd
showmapped", leading to a failure to create a device.

It's possible that the output has changed in newer rbd versions; I'm not
sure as I haven't used old versions.


Please provide any additional information below.
Attached is a patch that fixes two problems:

1) When the output of "rbd showmapped" was empty (due to no device having
been created) an error was thrown. In fact, this is exactly what is
expected if no device has yet been created, and as such None should be
returned so that creation proceeds.

2) The output uses spaces, in order for the column fields to line up. The
split filter was using tabs, however. Removing the tab filter and
defaulting to the normal Python split behavior (split on runs of
whitespace) allows th parsing to behave correctly.

Attachments:
bdev.py.diff 587 bytes

gan...@googlecode.com

unread,
Nov 16, 2012, 5:18:05 AM11/16/12
to ganeti...@googlegroups.com

Comment #1 on issue 312 by cven...@gmail.com: Patch: Incorrect RBD code
causes failure to create RBD devices
http://code.google.com/p/ganeti/issues/detail?id=312

Which version of rbd tool are you using?

When the patch was implemented "rbd showmapped" returned just the headers,
if no devices were mapped. So you got this:

root@node1:/# rbd showmapped
id pool image snap device

We explicitely had that check there, to ensure that the format hasn't
changed.
So maybe indeed the format has changed (judging from your comment with the
seperator too). If so, we need to adjust the _ParseRbdShowmappedOutput.
I'll probable send an email to the Ceph list for this


gan...@googlecode.com

unread,
Nov 16, 2012, 7:12:50 AM11/16/12
to ganeti...@googlegroups.com

Comment #2 on issue 312 by ius...@google.com: Patch: Incorrect RBD code
causes failure to create RBD devices
http://code.google.com/p/ganeti/issues/detail?id=312

Hmm, if the output of rdp changes between versions, it would be very good
if we can add test data files with version-specific output. Look, for
example, at test/data:

├── proc_drbd80-emptyline.txt
├── proc_drbd83_sync_krnl2.6.39.txt
├── proc_drbd83_sync.txt
├── proc_drbd83.txt
├── proc_drbd8.txt
├── vgreduce-removemissing-2.02.02.txt
├── vgreduce-removemissing-2.02.66-fail.txt
├── vgreduce-removemissing-2.02.66-ok.txt
├── vgs-missing-pvs-2.02.02.txt
└── vgs-missing-pvs-2.02.66.txt

So that we actually have unittests which record these differences. Thanks!

gan...@googlecode.com

unread,
Nov 16, 2012, 7:45:23 AM11/16/12
to ganeti...@googlegroups.com

Comment #3 on issue 312 by jeffrey.mitchell: Patch: Incorrect RBD code
causes failure to create RBD devices
http://code.google.com/p/ganeti/issues/detail?id=312

I'm using the current testing release 0.54 -- this is very close to the
next stable release, which will be 0.55.

The rbd tool shows *no* output when there are no devices mapped; also the
fields are space-separated (with multiple spaces to make the output line
up) rather than tab-separated.

gan...@googlecode.com

unread,
Mar 12, 2013, 12:56:09 PM3/12/13
to ganeti...@googlegroups.com
Updates:
Status: Fixed

Comment #4 on issue 312 by ultrot...@google.com: Patch: Incorrect RBD code
causes failure to create RBD devices
http://code.google.com/p/ganeti/issues/detail?id=312

commit bdecfea26196996c4467dc28fc82a43a75de6dd8
Author: Stratos Psomadakis <pso...@grnet.gr>
Date: Fri Feb 8 18:36:34 2013 +0200

Fix rbd showmapped output parsing

'rbd showmapped' output formatting differs between older and newer
versions of
the ceph tools. Try to use json output formatting if available
(currently
available only in the ceph master branch). For bobtail, argonaut and
older
releases fallback to manually parsing the 'rbd showmapped' output,
handling the
differences in the output format for each rbd version correctly.

Signed-off-by: Stratos Psomadakis <pso...@grnet.gr>
Reviewed-by: Guido Trotter <ultr...@google.com>


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

gan...@googlecode.com

unread,
May 9, 2013, 1:46:27 AM5/9/13
to ganeti...@googlegroups.com
Updates:
Status: Released
Labels: Milestone-Release2.7

Comment #5 on issue 312 by ultrot...@google.com: Patch: Incorrect RBD code
causes failure to create RBD devices
http://code.google.com/p/ganeti/issues/detail?id=312

Released in the 2.7 series.
Reply all
Reply to author
Forward
0 new messages