Skip to content
Snippets Groups Projects
  1. Dec 07, 2012
  2. Dec 06, 2012
  3. Dec 05, 2012
  4. Dec 04, 2012
    • Michael Hanselmann's avatar
      iallocator: Add node whitelist · fb60bc6a
      Michael Hanselmann authored
      
      In the future instance creations might have a lock on all nodes as was
      the case until the implementation of opportunistic locking. Nodes for
      which the lock is not held will be shown to the iallocator plugin as if
      they were marked offline.
      
      This patch adds a new parameter named “node_whitelist” to
      “IAReqInstanceAlloc”. If set to a list, only nodes contained within are
      shown as online.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
      fb60bc6a
    • Michael Hanselmann's avatar
      Allow ignoring successful commands in "gnt-cluster command" · d5b031dc
      Michael Hanselmann authored
      
      In some cases it is useful to ignore the output of and avoid mentioning
      successful commands. One would be when looking for a certain string in
      a file:
      
        $ gnt-cluster command egrep -q '^testing$' /etc/...
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
      d5b031dc
    • Guido Trotter's avatar
      Add "proper coloring" unittest check · c94f9990
      Guido Trotter authored
      
      We have to check that for each edge its vertices have different colors.
      
      This is very easy to do with a vertex-to-color map, but not so easy with
      a color-to-vertex one. Since all our coloring algorithms created a
      vertex-to-color map behind the scenes and then converted it, we flip
      them back to returning it directly, and do the conversion explicitly
      where we need it (which for now is everywhere except when testing this
      property).
      
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      c94f9990
    • Guido Trotter's avatar
      Fix Dsatur and add Dcolor · 8b50de5c
      Guido Trotter authored
      
      Our Dsatur implementation was incorrect: while the paper defined the
      degree of saturation of a vertex as the number of different colors it is
      adjacent to, we were using the number of colors, without considering
      uniqueness. This effectively implemented a different algorithm, which is
      very similar to the previous one, and while it performs slightly worse
      on average it still beats Dsatur on some cases.
      
      So we refactor the implementation to effectively support both algorithms
      without code duplication, and then we export both the old algorithms as
      "Dcolor" and the new one as "Dsatur". Since these are all fast
      algorithms in hroller we will still be able to pick the best result.
      
      Note that the new Dsatur implementation uses an IntSet to calculate the
      uniqueness. Results with nub + length on a list were significantly
      slower.
      
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      8b50de5c
Loading