Open GoogleCodeExporter opened 9 years ago
Original comment by hel...@google.com
on 23 Apr 2014 at 8:44
I thought this was a way to determine the version of the command line tools:
# drbdadm status
<drbd-status version="8.3.13" api="88">
<resources config_file="/etc/drbd.conf">
</resources>
</drbd-status>
but it seems this subcommand was dropped entirely from 8.4 :-(
Original comment by bcandler...@googlemail.com
on 23 Apr 2014 at 8:24
Ganeti uses drbdsetup directly and does not go through drbdadm, so we shouldn't
use drbdadm to detect the version anyway.
On a quick look, I didn't find an obvious way to get the version of drbdsetup.
So we probably have to fall back to parsing the output of `drbdsetup help`...
Original comment by thoma...@google.com
on 24 Apr 2014 at 6:55
Although drbdadm isn't used directly, you could assume that drbdadm and
drbdsetup are from the same package. Looking through source I found this
option:
$ drbdadm -V
DRBDADM_BUILDTAG=GIT-hash:\ 83ca112086600faacab2f157bc5a9324f7bd7f77\ build\
by\ phil@fat-tyre\,\ 2012-05-07\ 10:21:24
DRBDADM_API_VERSION=88
DRBD_KERNEL_VERSION_CODE=0x08030b
DRBDADM_VERSION_CODE=0x08030d
DRBDADM_VERSION=8.3.13
$ drbdadm -V
DRBDADM_BUILDTAG=GIT-hash:\ 89a294209144b68adb3ee85a73221f964d3ee515\ build\
by\ phil@fat-tyre\,\ 2013-02-05\ 15:35:49
DRBDADM_API_VERSION=1
DRBD_KERNEL_VERSION_CODE=0x080402
DRBDADM_VERSION_CODE=0x080403
DRBDADM_VERSION=8.4.3
However I couldn't find anything like this in drbdsetup. Code to print version
number is in print_usage_and_exit() but is commented out :-(
So if you want to use drbdsetup only, I think you'd have to parse the result of
a malformed command.
Version 8.3:
# drbdsetup show
USAGE: drbdsetup device command arguments options
Device is usually /dev/drbdX or /dev/drbd/X.
General options: --create-device, --set-defaults
... snip
Version 8.4:
$ drbdsetup show
Missing first argument
USAGE:
drbdsetup show {resource|minor|all} [--show-defaults]
Original comment by bcandler...@googlemail.com
on 24 Apr 2014 at 9:26
OK, the problem is simpler than I thought.
drbdsetup automatically defers to /lib/drdb/drbdsetup-83 if the kernel drbd
version is 8.3. However it barfs on some of the arguments passed by ganeti
before doing that. An example command line ganeti passes is:
drbdsetup /dev/drbd2 disk
/dev/xenvg/a614fd3b-d016-44a1-a6d6-c51334190757.disk0_data
/dev/xenvg/a614fd3b-d016-44a1-a6d6-c51334190757.disk0_meta 0 -e detach
--create-device -d 1024m
However, it works if you pass this command line to /lib/drbd/drbdsetup-83
directly.
So the workaround I suggest is: in the DRBD83 code, if /lib/drbd/drbdsetup-83
exists, use that in preference to drbdsetup.
(I've also sent a mail to drbd-user with this example, so the compatibility of
drbdsetup may eventually be improved)
Original comment by bcandler...@googlemail.com
on 24 Apr 2014 at 3:18
So you have a link to your mail in the archives? It would be great if we could
track the process there and see what's happening on their end.
Original comment by thoma...@google.com
on 25 Apr 2014 at 7:05
http://lists.linbit.com/pipermail/drbd-user/2014-April/020784.html
(No replies as yet)
Related thread in ganeti google group:
https://groups.google.com/forum/#!topic/ganeti/MkCNmzF6hu8
Original comment by bcandler...@googlemail.com
on 25 Apr 2014 at 10:22
It seems like Ubuntu is coming up with a better package that will remove the
need to workaround this problem in Ganeti.
The details of how it was fixed in Ubuntu are here
https://bugs.launchpad.net/ubuntu/+source/drbd8/+bug/1185756/comments/82
For those who might need the packages before they hit Ubuntu mirrors:
http://people.canonical.com/~smb/lp1185756/
Original comment by simon.de...@gmail.com
on 25 Apr 2014 at 4:03
Reply from the drbd people at
http://lists.linbit.com/pipermail/drbd-user/2014-April/020804.html
Basically they say that if you are calling drbdsetup directly, it's up to you
to call the right binary yourself. drbdsetup is not intended to have a
backwards-compatible interface (drbdadm does), so if you call drbdsetup
directly you have to know what you're doing.
Original comment by bcandler...@googlemail.com
on 9 May 2014 at 7:57
workaround:
apt-get remove drbd8-utils
apt-get install drbd8-utils=2:8.3.11-0ubuntu1
apt-mark hold drbd8-utils
Original comment by atxm...@gmail.com
on 10 May 2014 at 6:05
Original issue reported on code.google.com by
simon.de...@gmail.com
on 22 Apr 2014 at 7:04Attachments: