1. 20 Dec, 2010 2 commits
    • Iustin Pop's avatar
      Change the Node.group attribute · 10ef6b4e
      Iustin Pop authored
      
      
      Currently, the Node.group attribute is the UUID of the group, as until
      recently Ganeti didn't export the node group properties. Since it does
      so now, we make the following changes (again apologies for a big
      patch):
      
      - we change the group attribute to be an index, similar to the way an
        Instance.pnode and snode attributes point to the parent node(s)
      - on load, we read the group.uuid attribute and we use that to lookup
        the actual group index, from previously-loaded groups info
      - this means that we now first read groups, then read nodes using the
        group info, and then read instances using the node info
      
      This patch leaves a few functions showing the group index (ugly since
      it's htools internal), will be converted later.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarBalazs Lecz <leczb@google.com>
      10ef6b4e
    • Iustin Pop's avatar
      Rework the data loader pipelines to read groups · a679e9dc
      Iustin Pop authored
      
      
      This (invasive) patch changes all the loader pipelines to read the node
      groups data from the cluster, via the various backends. It is invasive
      as it needs coordinated changes across all the loaders.
      
      Note that the new group data is not used, just returned.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarBalazs Lecz <leczb@google.com>
      a679e9dc
  2. 01 Dec, 2010 1 commit
    • Iustin Pop's avatar
      AllocElement: extend with the cluster score · 7d3f4253
      Iustin Pop authored
      
      
      AllocElement, a type used as a result of allocations, holds the status
      of the nodes after the allocation. In most cases, we'll compare this
      allocation result with others, to see which allocation decision makes
      the most sense. This comparison is done via the cluster score.
      
      However, if we later need to redo this computation, as part of other
      comparisons, we'd need to evaluate it again, etc. So it's easier to just
      compute the score at the place where we compute the node list in the
      initial step.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarBalazs Lecz <leczb@google.com>
      7d3f4253
  3. 24 Nov, 2010 2 commits
  4. 27 May, 2010 1 commit
    • Iustin Pop's avatar
      Replace fromJResult with annotateJResult · c96d44df
      Iustin Pop authored
      This patch removes all old uses of fromJResult with the annotated
      version, and removes the non-annotated version. All JSON parsing points
      should now have annotated errors.
      c96d44df
  5. 20 May, 2010 1 commit
    • Iustin Pop's avatar
      Stop modifying names for internal computations · 3e4480e0
      Iustin Pop authored
      Currently the name used internally is modified and holds the shortened
      name of the nodes/instances. This has caused issues before, since we
      always have to strip the suffix from input data and reapply it if we
      need to send data back to Ganeti.
      
      This patch changes the code such that the names are never modified, only
      the alias, and all the internal computations can forget about the common
      suffix addition/removal.
      3e4480e0
  6. 31 Mar, 2010 2 commits
    • Iustin Pop's avatar
      Fix iallocator crash when no solutions exist · 57587760
      Iustin Pop authored
      Commit 54365762 added an un-guarded `head' call, which crashes with
      “Prelude.head: empty list” when no results exists for the per-instance
      allocation/relocation calls.
      
      This patch fixes this, and also adds another check for an unguarded
      `head' call during parsing of input data.
      (cherry picked from commit e41f4ba0)
      57587760
    • Iustin Pop's avatar
      Fix IAllocator multi-evacuate message · 934c62dc
      Iustin Pop authored
      Since Ganeti passes full host names (not common-suffix-stripped), we
      need to remove the suffix from the evac_nodes keys too. In case one node
      is not part of the cluster, it will lead to a wrong error message, but
      for now it fixes the problem.
      934c62dc
  7. 09 Mar, 2010 1 commit
    • Iustin Pop's avatar
      Fix iallocator crash when no solutions exist · e41f4ba0
      Iustin Pop authored
      Commit 54365762 added an un-guarded `head' call, which crashes with
      “Prelude.head: empty list” when no results exists for the per-instance
      allocation/relocation calls.
      
      This patch fixes this, and also adds another check for an unguarded
      `head' call during parsing of input data.
      e41f4ba0
  8. 26 Feb, 2010 1 commit
  9. 23 Feb, 2010 1 commit
    • Iustin Pop's avatar
      Update the loader pipeline to set the movable flag · 39f979b8
      Iustin Pop authored
      This updates the movable flag on instances if they have only one node
      (we don't rely on OpMoveInstance) or if they are set so via the command
      line options.
      
      This doesn't yet enable the use of the new flag.
      39f979b8
  10. 22 Feb, 2010 2 commits
  11. 01 Dec, 2009 1 commit
  12. 27 Nov, 2009 1 commit
  13. 17 Nov, 2009 1 commit
    • Iustin Pop's avatar
      Add a command-line option to filter exclusion tags · 0f15cc76
      Iustin Pop authored
      Since we don't want all instance tags to be used for exclusion, we add a
      command line option to filter on these. Since the iallocator protocol
      cannot accept command line options, currently it's not possible to
      specify these for hail, and thus it will never use any exclusion tags.
      0f15cc76
  14. 11 Nov, 2009 1 commit
    • Iustin Pop's avatar
      Add a tags attribute to instances · 17e7af2b
      Iustin Pop authored
      … and read it in all the loaders. hscan is modified to save it to the
      files it generates.
      
      The attribute is not yet used in any place.
      17e7af2b
  15. 06 Nov, 2009 1 commit
    • Iustin Pop's avatar
      Change the Utils.fromObj signature · 262f3e6c
      Iustin Pop authored
      Currently the fromObj function takes a JSON object which is then
      converted into a list of (String, JSValue) in which we make a lookup.
      However, most of the callers of this function call it repeatedly on the
      same object, which means we do the object→list conversion repeatedly.
      
      This patch converts it to take directly the list, and converts its
      callers to do the conversion themselves (and only once).
      
      While this is not in the hot-path today, it would be if we ever were to
      process much data over Luxi (or RAPI), and is a good cleanup in any
      case.
      262f3e6c
  16. 18 Oct, 2009 1 commit
    • Iustin Pop's avatar
      Change the Container.findByName function · e7724ccc
      Iustin Pop authored
      This patch changes the signature and implementation of the function;
      returning the item makes more sense (saves a lookup later again in the
      container, and applying idx is cheap), and the previous implementation
      was ugly.
      e7724ccc
  17. 16 Oct, 2009 1 commit
    • Iustin Pop's avatar
      Add loading and processing of utilisation data · aa8d2e71
      Iustin Pop authored
      This patch adds loading and processing the utilisation data during
      instance moves. While the data is not yet used, it is correctly modified
      by instance changes between nodes.
      
      hbal has the new ‘-U’ command line argument for this. The format of the
      file is simply instance name and the four stats, space-separated.
      aa8d2e71
  18. 08 Oct, 2009 1 commit
    • Guido Trotter's avatar
      parseNode: don't lookup values in drained nodes · e97f211e
      Guido Trotter authored
      
      
      Currently parseNode skips looking for values in offline nodes, but tries
      to read them for drained ones. With this patch we treat offline and
      drained nodes in the same way (which is compatible with the iallocator
      protocol changes introduced in Ganeti 2.0.4, but also doesn't break
      retrocompatibility). As a bonus we don't need to calculate the value of
      the internal Node "offline" parameter, because we know that the node is
      going to be online anyway, if we lookup values (and it was statically
      set to offline, before, in the offline case).
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      e97f211e
  19. 06 Jul, 2009 1 commit
    • Iustin Pop's avatar
      Fix hlint-generated warnings · 9f6dcdea
      Iustin Pop authored
      This big patch cleans up the code per hlint indications. Many removals
      of extra parentheses, replacements of concat . map with concabtMap,
      extra dollar signs, eta reductions, etc. were performed.
      
      The code still compiles and passes a couple of manual tests on sample
      files. The individual changes are also small enough as to be visually
      easy to confirm.
      9f6dcdea
  20. 10 Jun, 2009 3 commits
    • Iustin Pop's avatar
      Add cpu-count-related attributes to nodes · 1a82215d
      Iustin Pop authored
      This patch adds cpu-count related attributes to nodes:
        - total cpus
        - cpus in use
        - ratio of virtual:physical cpus
      
      We also set correctly the cpu values at load time, but we don't do
      anything yet while moving instances around. The cpu ratio is shown in
      the cluster list.
      1a82215d
    • Iustin Pop's avatar
      Add a new vcpus attribute to instances · d752eb39
      Iustin Pop authored
      This patch adds reading of vcpu count for instances, in preparation for
      using the vcpu ratio in cluster scoring.
      d752eb39
    • Iustin Pop's avatar
      Fix reading of total disk space in iallocator · 734b1ff1
      Iustin Pop authored
      IAllocator currently uses a wrong key name for reading the total disk
      space (‘disk_usage’ which was copied from RAPI, but the actual
      iallocator key is ‘disk_space_total’).
      
      This patch fixes that and also makes iallocator always use this key,
      instead of computing the size by itself—with Ganeti 2.0 this is
      key is always available.
      734b1ff1
  21. 01 Jun, 2009 3 commits
  22. 27 May, 2009 2 commits
  23. 26 May, 2009 2 commits
    • Iustin Pop's avatar
      Change the module import hierarchy · 262a08a2
      Iustin Pop authored
      This patch makes the Types module a base module, and Node/Instance ones
      import it, from the previous (opposite) situation. This will allow in
      the future to use newtypes for the index and name types.
      262a08a2
    • Iustin Pop's avatar
      Port offline node fixes from Rapi to IAllocator · 1de50907
      Iustin Pop authored
      The IAllocator source was copied from Rapi before the offline node fixes
      were made. This changes such that offline nodes are accepted correctly.
      1de50907
  24. 25 May, 2009 2 commits
    • Iustin Pop's avatar
      Fix loading of plain instances via iallocator · bd1794b2
      Iustin Pop authored
      Currently iallocator is broken when reading single-node instances (and
      with an ugly error message). This patch fixes this case, by marking them
      with secondary node “noSecondary” like the rest of the code.
      bd1794b2
    • Iustin Pop's avatar
      hail: do not allocate on offline/drained nodes · 8c2ebac8
      Iustin Pop authored
      This patch implements filtering out of the offline/drained nodes and
      fixes a bug in IAllocator.hs parsing (similar to an older bug in Rapi.hs
      from where the code was copied).
      8c2ebac8
  25. 24 May, 2009 1 commit
  26. 23 May, 2009 4 commits