Skip to content
Snippets Groups Projects
  1. Aug 08, 2011
    • Michael Hanselmann's avatar
      Detect globbing patterns as query arguments · f8638e28
      Michael Hanselmann authored
      
      Short: this patch enables the use of “gnt-instance list '*.site'”.
      
      Detailed description: This patch changes the command line interface code
      to try to deduce the kind of filter from the arguments to a “list”
      command. If it's a list of plain names an old-style name filter is used.
      If filtering is forced or the single argument is potentially a filter,
      it is parsed as a query filter string. Any name looking like a globbing
      pattern (e.g. “*.site” or “web?.example.com”) is treated as such.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      f8638e28
    • Guido Trotter's avatar
      cluster-merge: implement params delta mercifulness · 1fcd3b81
      Guido Trotter authored
      
      Sometimes it's good to tell the user about parameter differences but
      then proceed anyway. Strictness is still enforced for those parameters
      that would break the cluster (volume group name, storage dir if file
      storage is enabled).
      
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      1fcd3b81
    • Guido Trotter's avatar
      cluster-merge: consider file storage enable state · bb074298
      Guido Trotter authored
      
      There's no point in checking whether the file storage dir in the two
      clusters is the same if file storage is not even enabled
      
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      bb074298
    • Iustin Pop's avatar
      Allow fixing of split instances via relocate · e3a19474
      Iustin Pop authored
      
      Currently, the IAllocator code requests strictly that the (set of) groups of
      the nodes we're relocating from is equal to the set of groups we're
      relocating to.
      
      This, however, makes is impossible to fix split instances, since (by
      definition) the secondary of a split instance is not in the same group
      as the primary node, and after the fixing is it the same.
      
      The patch changes the test from group equality to check that the final
      group set (across both primary and secondary nodes) is a subset of the
      initial group set (again across both nodes). This means we can't
      "extend" the group of nodes but keeping the same or decreasing it is
      allowed.
      
      After this patch, one can finally fix (automatically) split instances
      via a gnt-instance replace-disks.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      e3a19474
    • Iustin Pop's avatar
      Revert deprecation of evacuate mode in hail · 88df1fa9
      Iustin Pop authored
      
      As discussed offline, the new node-change mode could be used for
      evacuation, but it's not directly useful as it returns a list of
      opcodes; therefore, we need to partially revert commits fbe5fcf6 and
      5b53ca79 that removed it (and multi-evacuate, which remains removed).
      
      The new version of relocate is actually just a wrapper over the
      tryNodeEvac (which does the node evacuate); we run that and then we do
      some extra checks that the nodes we got from that function are
      consistent with the instance's new state.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      88df1fa9
    • Iustin Pop's avatar
      Further cleanup after multi-evacuate removal · f5fab862
      Iustin Pop authored
      
      Commit f0edfcf6 removed the parsing of multi-evacuate result, but the
      code went from:
      
        if mode in (multi-evac, relocate):
          …
          if mode == relocate:
            …
      
      to:
      
        if mode == relocate:
          …
          if mode == relocate
            …
      
      This patch simply removes the nested if.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      f5fab862
    • Iustin Pop's avatar
      Fix bug in IAllocator parsing of Evacuate result · 2f41ea77
      Iustin Pop authored
      
      Commit 342f9172 added stricter checks for the iallocator result in
      evacuate mode, but it does this irrespective of the result
      status. When the result has failed and (according to the design) the
      list of nodes is empty, this code will trigger the following:
      
          node1# gnt-instance replace-disks -I hail instance14
          Failure: command execution error:
          Groups of nodes returned by iallocator () differ from original groups (default)
      
      After the patch, the result is:
      
          node1# gnt-instance replace-disks -I hail instance14
          Failure: prerequisites not met for this operation:
          error type: insufficient_resources, error details:
          Can't compute nodes using iallocator 'hail': Request failed: …
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      2f41ea77
  2. Aug 05, 2011
  3. Aug 04, 2011
  4. Aug 03, 2011
    • Apollon Oikonomopoulos's avatar
      Pause DRBD sync for OS install if not wait_for_sync · 41e1e79e
      Apollon Oikonomopoulos authored
      
      When wait_for_sync is set to False in LUInstanceCreate, Ganeti lets DRBD sync
      in the background while performing the rest of the installation steps,
      including OS installation.
      
      However, OS installation is a very disk-intensive task that intereferes badly
      with the background I/O caused by DRBD's initial sync. To this end, we pause
      the background sync before OS installation and unpause it afterwards, which
      yields a significant speed boost for OS installation. The following should be
      noted:
      
      a) The user has requested not to wait for sync, i.e. the instance will be
         non-redundant for an unspecified interval anyway and delaying this by a
         couple of minutes is not a big compromise.
      
      b) This approach is also followed during disk wiping.
      
      Signed-off-by: default avatarApollon Oikonomopoulos <apollon@noc.grnet.gr>
      [iustin@google.com: simplify an if check]
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      41e1e79e
Loading