Commit adef95a2 authored by Thomas Thrainer's avatar Thomas Thrainer

Merge branch 'stable-2.9' into stable-2.10

Merge branch 'stable-2.9' into stable-2.10

* stable-2.9
  Bump revision for 2.9.1
  Update NEWS and schedule release for 2.9.1
  Fix retrieval of xen command in class method
  Fix docstring for ganeti.storage.filestorage_unittest.py
  Undo revision bump
  Postpone release of 2.9.1
  Revision bump for 2.9.1
  Update NEWS for 2.9.1 release
  Readd nodes as online
  When verifying BRBD version, ignore missing values

* stable-2.8
  Version bump for 2.8.2
  Update NEWS file for 2.8.2 release
  DRBD: ensure peers are UpToDate for dual-primary

Conflicts:
    NEWS: trivial
	configure.ac: ignore version bump
Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
Reviewed-by: default avatarHrvoje Ribicic <riba@google.com>
parents 07e68848 77a5f613
......@@ -70,6 +70,18 @@ Python
version 1.0.1. It is still used for testing only.
Version 2.9.1
-------------
*(Released Wed, 13 Nov 2013)*
- fix bug, that kept nodes offline when readding
- when verifying DRBD versions, ignore unavailable nodes
- fix bug that made the console unavailable on kvm in split-user
setup (issue 608)
- DRBD: ensure peers are UpToDate for dual-primary (inherited 2.8.2)
Version 2.9.0
-------------
......@@ -193,6 +205,17 @@ This was the first beta release of the 2.9 series. All important changes
are listed in the latest 2.9 entry.
Version 2.8.2
-------------
*(Released Thu, 07 Nov 2013)*
- DRBD: ensure peers are UpToDate for dual-primary
- Improve error message for replace-disks
- More dependency checks at configure time
- Placate warnings on ganeti.outils_unittest.py
Version 2.8.1
-------------
......
......@@ -4020,8 +4020,20 @@ def DrbdAttachNet(disks, instance_name, multimaster):
for rd in bdevs:
stats = rd.GetProcStatus()
all_connected = (all_connected and
(stats.is_connected or stats.is_in_resync))
if multimaster:
# In the multimaster case we have to wait explicitly until
# the resource is Connected and UpToDate/UpToDate, because
# we promote *both nodes* to primary directly afterwards.
# Being in resync is not enough, since there is a race during which we
# may promote a node with an Outdated disk to primary, effectively
# tearing down the connection.
all_connected = (all_connected and
stats.is_connected and
stats.is_disk_uptodate and
stats.peer_disk_uptodate)
else:
all_connected = (all_connected and
(stats.is_connected or stats.is_in_resync))
if stats.is_standalone:
# peer had different config info and this node became
......
......@@ -1928,8 +1928,9 @@ class LUClusterVerifyGroup(LogicalUnit, _VerifyErrors):
node_versions = {}
for node_uuid, ndata in node_verify_infos.items():
nresult = ndata.payload
version = nresult.get(constants.NV_DRBDVERSION, "Missing DRBD version")
node_versions[node_uuid] = version
if nresult:
version = nresult.get(constants.NV_DRBDVERSION, "Missing DRBD version")
node_versions[node_uuid] = version
if len(set(node_versions.values())) > 1:
for node_uuid, version in sorted(node_versions.items()):
......
......@@ -432,7 +432,7 @@ def GetInstanceConsole(cluster, instance, primary_node):
@rtype: dict
"""
hyper = hypervisor.GetHypervisor(instance.hypervisor)
hyper = hypervisor.GetHypervisorClass(instance.hypervisor)
# beparams and hvparams are passed separately, to avoid editing the
# instance and then saving the defaults in the instance itself.
hvparams = cluster.FillHV(instance)
......
......@@ -335,6 +335,7 @@ class LUNodeAdd(LogicalUnit):
# later in the procedure; this also means that if the re-add
# fails, we are left with a non-offlined, broken node
if self.op.readd:
self.new_node.offline = False
self.new_node.drained = False
self.LogInfo("Readding a node, the offline/drained flags were reset")
# if we demote the node, we do cleanup later in the procedure
......
......@@ -356,6 +356,19 @@ class XenHypervisor(hv_base.BaseHypervisor):
self._cmd = _cmd
@staticmethod
def _GetCommandFromHvparams(hvparams):
"""Returns the Xen command extracted from the given hvparams.
@type hvparams: dict of strings
@param hvparams: hypervisor parameters
"""
if hvparams is None or constants.HV_XEN_CMD not in hvparams:
raise errors.HypervisorError("Cannot determine xen command.")
else:
return hvparams[constants.HV_XEN_CMD]
def _GetCommand(self, hvparams):
"""Returns Xen command to use.
......@@ -364,10 +377,7 @@ class XenHypervisor(hv_base.BaseHypervisor):
"""
if self._cmd is None:
if hvparams is None or constants.HV_XEN_CMD not in hvparams:
raise errors.HypervisorError("Cannot determine xen command.")
else:
cmd = hvparams[constants.HV_XEN_CMD]
cmd = XenHypervisor._GetCommandFromHvparams(hvparams)
else:
cmd = self._cmd
......@@ -705,11 +715,12 @@ class XenHypervisor(hv_base.BaseHypervisor):
instance_list = self._GetInstanceList(True, hvparams)
return _GetNodeInfo(result.stdout, instance_list)
def GetInstanceConsole(self, instance, primary_node, hvparams, beparams):
@classmethod
def GetInstanceConsole(cls, instance, primary_node, hvparams, beparams):
"""Return a command for connecting to the console of an instance.
"""
xen_cmd = self._GetCommand(hvparams)
xen_cmd = XenHypervisor._GetCommandFromHvparams(hvparams)
return objects.InstanceConsole(instance=instance.name,
kind=constants.CONS_SSH,
host=primary_node.name,
......
......@@ -119,6 +119,7 @@ class DRBD8Status(object): # pylint: disable=R0902
self.is_diskless = self.ldisk == self.DS_DISKLESS
self.is_disk_uptodate = self.ldisk == self.DS_UPTODATE
self.peer_disk_uptodate = self.rdisk == self.DS_UPTODATE
self.is_in_resync = self.cstatus in self.CSET_SYNC
self.is_in_use = self.cstatus != self.CS_UNCONFIGURED
......
......@@ -19,7 +19,7 @@
# 02110-1301, USA.
"""Script for unittesting the ganeti.storage.file module"""
"""Script for unittesting the ganeti.storage.filestorage module"""
import os
import shutil
......
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