Commit 72ce3463 authored by René Nussbaumer's avatar René Nussbaumer
Browse files

Merge branch 'devel-2.4' into devel-2.5



Conflicts:
	NEWS (trivial)
	configure.ac (trivial)
	daemons/ensure-dirs.in (deleted)
Signed-off-by: default avatarRené Nussbaumer <rn@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parents b972c223 e4a48c7b
......@@ -631,6 +631,8 @@ TEST_FILES = \
test/data/proc_drbd8.txt \
test/data/proc_drbd80-emptyline.txt \
test/data/proc_drbd83.txt \
test/data/proc_drbd83_sync.txt \
test/data/proc_drbd83_sync_krnl2.6.39.txt \
test/data/sys_drbd_usermode_helper.txt \
test/import-export_unittest-helper
......
......@@ -136,6 +136,18 @@ Version 2.5.0 beta1
This was the first beta release of the 2.5 series.
Version 2.4.4
-------------
*(Released Tue, 23 Aug 2011)*
Small bug-fixes:
- Fixed documentation for importing with ``--src-dir`` option
- Fixed a bug in ``ensure-dirs`` with queue/archive permissions
- Fixed a parsing issue with DRBD 8.3.11 in the Linux kernel
Version 2.4.3
-------------
......@@ -167,7 +179,7 @@ Many bug-fixes and a few small features:
- Fixed off-by-one bug in job serial generation
- ``gnt-node volumes``: Fix instance names
- Fixed aliases in bash completion
- Fixed a bug in reopening log files after beeing sent a SIGHUP
- Fixed a bug in reopening log files after being sent a SIGHUP
- Added a flag to burnin to allow specifying VCPU count
- Bugfixes to non-root Ganeti configuration
......
......@@ -391,16 +391,16 @@ parameters as such:
- ``root_path`` to a valid setting (e.g. ``/dev/xvda1``)
- ``bootloader_path`` and ``bootloader_args`` to empty
Alternatively, you can delete the kernel management to instances, and
Alternatively, you can delegate the kernel management to instances, and
use either ``pvgrub`` or the deprecated ``pygrub``. For this, you must
install the kernels and initrds in the instance, and create a valid grub
install the kernels and initrds in the instance and create a valid GRUB
v1 configuration file.
For ``pvgrub`` (new in version 2.4.2), you need to set:
- ``kernel_path`` to point to the ``pvgrub`` loader present on the node
(e.g. ``/usr/lib/xen/boot/pv-grub-x86_32.gz``)
- ``kernel_args`` to the path to the grub config file, relative to the
- ``kernel_args`` to the path to the GRUB config file, relative to the
instance (e.g. ``(hd0,0)/grub/menu.lst``)
- ``root_path`` **must** be empty
- ``bootloader_path`` and ``bootloader_args`` to empty
......
......@@ -791,7 +791,10 @@ class DRBD8Status(object):
LINE_RE = re.compile(r"\s*[0-9]+:\s*cs:(\S+)\s+(?:st|ro):([^/]+)/(\S+)"
"\s+ds:([^/]+)/(\S+)\s+.*$")
SYNC_RE = re.compile(r"^.*\ssync'ed:\s*([0-9.]+)%.*"
"\sfinish: ([0-9]+):([0-9]+):([0-9]+)\s.*$")
# Due to a bug in drbd in the kernel, introduced in
# commit 4b0715f096 (still unfixed as of 2011-08-22)
"(?:\s|M)"
"finish: ([0-9]+):([0-9]+):([0-9]+)\s.*$")
CS_UNCONFIGURED = "Unconfigured"
CS_STANDALONE = "StandAlone"
......
......@@ -381,7 +381,7 @@ def UnescapeAndSplit(text, sep=","):
e1 = slist.pop(0)
if e1.endswith("\\"):
num_b = len(e1) - len(e1.rstrip("\\"))
if num_b % 2 == 1:
if num_b % 2 == 1 and slist:
e2 = slist.pop(0)
# here the backslashes remain (all), and will be reduced in
# the next step
......
......@@ -166,12 +166,21 @@ class TestDRBD8Status(testutils.GanetiTestCase):
proc_data = self._TestDataFilename("proc_drbd8.txt")
proc80e_data = self._TestDataFilename("proc_drbd80-emptyline.txt")
proc83_data = self._TestDataFilename("proc_drbd83.txt")
proc83_sync_data = self._TestDataFilename("proc_drbd83_sync.txt")
proc83_sync_krnl_data = \
self._TestDataFilename("proc_drbd83_sync_krnl2.6.39.txt")
self.proc_data = bdev.DRBD8._GetProcData(filename=proc_data)
self.proc80e_data = bdev.DRBD8._GetProcData(filename=proc80e_data)
self.proc83_data = bdev.DRBD8._GetProcData(filename=proc83_data)
self.proc83_sync_data = bdev.DRBD8._GetProcData(filename=proc83_sync_data)
self.proc83_sync_krnl_data = \
bdev.DRBD8._GetProcData(filename=proc83_sync_krnl_data)
self.mass_data = bdev.DRBD8._MassageProcData(self.proc_data)
self.mass80e_data = bdev.DRBD8._MassageProcData(self.proc80e_data)
self.mass83_data = bdev.DRBD8._MassageProcData(self.proc83_data)
self.mass83_sync_data = bdev.DRBD8._MassageProcData(self.proc83_sync_data)
self.mass83_sync_krnl_data = \
bdev.DRBD8._MassageProcData(self.proc83_sync_krnl_data)
def testIOErrors(self):
"""Test handling of errors while reading the proc file."""
......@@ -251,5 +260,15 @@ class TestDRBD8Status(testutils.GanetiTestCase):
stats.rrole == 'Unknown' and
stats.is_disk_uptodate)
def testDRBD83SyncFine(self):
stats = bdev.DRBD8Status(self.mass83_sync_data[3])
self.failUnless(stats.is_in_resync)
self.failUnless(stats.sync_percent is not None)
def testDRBD83SyncBroken(self):
stats = bdev.DRBD8Status(self.mass83_sync_krnl_data[3])
self.failUnless(stats.is_in_resync)
self.failUnless(stats.sync_percent is not None)
if __name__ == '__main__':
testutils.GanetiTestProgram()
......@@ -350,7 +350,7 @@ class TestUnescapeAndSplit(unittest.TestCase):
def setUp(self):
# testing more that one separator for regexp safety
self._seps = [",", "+", "."]
self._seps = [",", "+", ".", ":"]
def testSimple(self):
a = ["a", "b", "c", "d"]
......@@ -375,6 +375,18 @@ class TestUnescapeAndSplit(unittest.TestCase):
b = ["a", "b\\" + sep + "c", "d"]
self.failUnlessEqual(utils.UnescapeAndSplit(sep.join(a), sep=sep), b)
def testEscapeAtEnd(self):
for sep in self._seps:
self.assertEqual(utils.UnescapeAndSplit("\\", sep=sep), ["\\"])
a = ["a", "b\\", "c"]
b = ["a", "b" + sep + "c\\"]
self.assertEqual(utils.UnescapeAndSplit("%s\\" % sep.join(a), sep=sep), b)
a = ["\\" + sep, "\\" + sep, "c", "d\\.moo"]
b = [sep, sep, "c", "d.moo\\"]
self.assertEqual(utils.UnescapeAndSplit("%s\\" % sep.join(a), sep=sep), b)
class TestCommaJoin(unittest.TestCase):
def test(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment