commit 7e2dd310deb4d44a764b98dae26f567919196df1
Merge: ae52a3a bd40455
Author: Petr Pudlak <[email protected]>
Date:   Tue Jun 2 17:47:37 2015 +0200

    Merge branch 'stable-2.15' into master
    
    * stable-2.15
      Allow unconditional failovers off offline nodes, again
    
    * stable-2.14
      Suffix bump for 2.14.0
      Prepare NEWS for 2.14.0 release
      Get QuickCheck 2.7 compatibility
      For instances use the real instance disk template
      Log iAllocator request at debug level
      Do not assume all requests are relocation requests
      In opportunistic locking, update NODE_RES locks after nodes
      Suffix bump for 2.14.0~rc2
      Prepare NEWS for 2.14.0~rc2
    
    * stable-2.13
      Increase waiting time to avoid races
      Avoid watcher interaction in TestFilterRateLimit
      Avoid races in TestAdHocReasonRateLimit
      Avoid races in TestFilterRateLimit
    
    * stable-2.12
      Make WConfD's updateLocksWaiting safe
      Tests specifying safeUpdateLocksWaiting
      Provide a repeatable version of updateLocksWaiting
      Verify that updateLocks is idempotent
      Always accept no-op requests
      Allow unconditional failovers off offline nodes
      Remove now unused variable
      Fix bug in ssconf comparison, disable it for vcluster
      QA: test renewing the cluster certificate only
      QA: Assert equality of ssconf_master_candidate_certs
      QA: Add more verify steps in renew crypto QA
      Add a unit test for the Gluster storage type
      Add missing Gluster storage verification checks
      Add Gluster type to the node storage reporting set
      Introduce the Gluster storage type
      Make xend-config.sxp optional
      Revision bump to 2.12.4
      Update NEWS for 2.12.4
      Ignore *.dyn* files generated by GHC 7.8
      Replace HFLAGS_NOPROF with HFLAGS_DYNAMIC in the Makefile
    
    * stable-2.11
      (no news)
    
    * stable-2.10
      Substitute 'suffix' for 'revision'
      Check for gnt-cluster before running gnt-cluster upgrade
    
    Conflicts:
        lib/cmdlib/cluster/verify.py
              - merge: keep _VerifyExclusionTags from [6ce3bfcf] and
                pylint disable from [ff36cac]
        src/Ganeti/HTools/Cluster/Moves.hs
              - merge: keep addSecExEx from [bd40455] and add `force`
                introduced in [9322efb]

diff --cc lib/cmdlib/cluster/verify.py
index 4855796,8526dc7..73357fd
--- a/lib/cmdlib/cluster/verify.py
+++ b/lib/cmdlib/cluster/verify.py
@@@ -1766,37 -1766,7 +1766,37 @@@ class LUClusterVerifyGroup(LogicalUnit
      if n_drained:
        feedback_fn("  - NOTICE: %d drained node(s) found." % n_drained)
  
 +  def _VerifyExclusionTags(self, nodename, pinst, ctags):
 +    """Verify that all instances have different exclusion tags.
 +
 +    @type nodename: string
 +    @param nodename: the name of the node for which the check is done
 +    @type pinst: list of string
 +    @param pinst: list of UUIDs of those instances having the given node
 +        as primary node
 +    @type ctags: list of string
 +    @param ctags: tags of the cluster
 +
 +    """
 +    exclusion_prefixes = utils.GetExclusionPrefixes(ctags)
 +    tags_seen = set([])
 +    conflicting_tags = set([])
 +    for iuuid in pinst:
 +      allitags = self.my_inst_info[iuuid].tags
 +      if allitags is None:
 +        allitags = []
 +      itags = set([tag for tag in allitags
 +                   if utils.IsGoodTag(exclusion_prefixes, tag)])
 +      conflicts = itags.intersection(tags_seen)
 +      if len(conflicts) > 0:
 +        conflicting_tags = conflicting_tags.union(conflicts)
 +      tags_seen = tags_seen.union(itags)
 +
 +    self._ErrorIf(len(conflicting_tags) > 0, constants.CV_EEXTAGS, nodename,
 +                  "Tags where there is more than one instance: %s",
 +                  list(conflicting_tags), code=constants.CV_WARNING)
 +
-   def Exec(self, feedback_fn):
+   def Exec(self, feedback_fn): # pylint: disable=R0915
      """Verify integrity of the node group, performing various test on nodes.
  
      """
diff --cc src/Ganeti/HTools/Cluster/Moves.hs
index 69e6365,8f18019..560c248
--- a/src/Ganeti/HTools/Cluster/Moves.hs
+++ b/src/Ganeti/HTools/Cluster/Moves.hs
@@@ -80,7 -80,8 +80,8 @@@ applyMoveEx force nl inst Failover 
        new_nl = do -- OpResult
          Node.checkMigration old_p old_s
          new_p <- Node.addPriEx (Node.offline old_p || force) int_s inst
-         new_s <- Node.addSecEx force int_p inst old_sdx
 -        new_s <- Node.addSecExEx (Node.offline old_p) (Node.offline old_p)
 -                   int_p inst old_sdx
++        new_s <- Node.addSecExEx (Node.offline old_p)
++                   (Node.offline old_p || force) int_p inst old_sdx
          let new_inst = Instance.setBoth inst old_sdx old_pdx
          return (Container.addTwo old_pdx new_s old_sdx new_p nl,
                  new_inst, old_sdx, old_pdx)

Reply via email to