Revision 5e85269f

b/lib/cmdlib.py
2530 2530
    if pvminmax is not None:
2531 2531
      (nimg.pv_min, nimg.pv_max) = pvminmax
2532 2532

  
2533
  def _VerifyGroupDRBDVersion(self, node_verify_infos):
2534
    """Check cross-node DRBD version consistency.
2535

  
2536
    @type node_verify_infos: dict
2537
    @param node_verify_infos: infos about nodes as returned from the
2538
      node_verify call.
2539

  
2540
    """
2541
    node_versions = {}
2542
    for node, ndata in node_verify_infos.items():
2543
      nresult = ndata.payload
2544
      version = nresult.get(constants.NV_DRBDVERSION, "Missing DRBD version")
2545
      node_versions[node] = version
2546

  
2547
    if len(set(node_versions.values())) > 1:
2548
      for node, version in sorted(node_versions.items()):
2549
        msg = "DRBD version mismatch: %s" % version
2550
        self._Error(constants.CV_ENODEDRBDHELPER, node, msg,
2551
                    code=self.ETYPE_WARNING)
2552

  
2533 2553
  def _VerifyGroupLVM(self, node_image, vg_name):
2534 2554
    """Check cross-node consistency in LVM.
2535 2555

  
......
3466 3486
      node_verify_param[constants.NV_PVLIST] = [vg_name]
3467 3487

  
3468 3488
    if drbd_helper:
3489
      node_verify_param[constants.NV_DRBDVERSION] = None
3469 3490
      node_verify_param[constants.NV_DRBDLIST] = None
3470 3491
      node_verify_param[constants.NV_DRBDHELPER] = drbd_helper
3471 3492

  
......
3664 3685
          _ErrorIf(not test, constants.CV_ENODEORPHANINSTANCE, node_i.name,
3665 3686
                   "node is running unknown instance %s", inst)
3666 3687

  
3688
    self._VerifyGroupDRBDVersion(all_nvinfo)
3667 3689
    self._VerifyGroupLVM(node_image, vg_name)
3668 3690

  
3669 3691
    for node, result in extra_lv_nvinfo.items():
b/lib/constants.py
1588 1588
   "Instance running on nodes that are not suitable for it")
1589 1589
CV_ENODEDRBD = \
1590 1590
  (CV_TNODE, "ENODEDRBD", "Error parsing the DRBD status file")
1591
CV_ENODEDRBDVERSION = \
1592
  (CV_TNODE, "ENODEDRBDVERSION", "DRBD version mismatch within a node group")
1591 1593
CV_ENODEDRBDHELPER = \
1592 1594
  (CV_TNODE, "ENODEDRBDHELPER", "Error caused by the DRBD helper")
1593 1595
CV_ENODEFILECHECK = \

Also available in: Unified diff