Add DRBD barriers disk parameters
authorAndrea Spadaccini <spadaccio@google.com>
Mon, 28 Nov 2011 18:17:04 +0000 (18:17 +0000)
committerAndrea Spadaccini <spadaccio@google.com>
Tue, 6 Dec 2011 16:34:42 +0000 (16:34 +0000)
commit8a69b3a8193cab2c46daceccf8686028a43cecc3
tree63c8e397271a117322a371a5a5e2d32a9c70cb72
parent8bec868e6fc982fea98c6ecbf56e9c1529a94ae6
Add DRBD barriers disk parameters

Add the disk-barriers and meta-barriers parameters described in the
design doc.

constants.py:
* add the needed LD and DT-level parameters, use the defaults provided
  at ./configure time;
* add constants representing which barriers should be disabled and the
  set of valid options.

lib/bdev.py:
* factor the barriers handling code to a class method, for testing
  purposes;
* implement the more granular version checking logic;
* use the LD level parameters;
* add stricter check on DRBD version (8.0, 8.2 or 8.3), as we do not
  support 8.4 yet.

lib/cmdlib.py:
* translate DT level parameters to LD level ones.

configure.ac, Makefile.am:
* set both disk and meta barriers parameters depending on the value of
  --enable-drbd-barriers.

test/ganeti.bdev_unittest.py:
* unit tests for the code that sets DRBD barrier parameters depending on
  the version.

doc/design-resource-model.rst:
* reword the description of meta-barriers;
* change all disk parameters names to use dashes instead of underscores.

Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Makefile.am
configure.ac
doc/design-resource-model.rst
lib/bdev.py
lib/cmdlib.py
lib/constants.py
test/ganeti.bdev_unittest.py