Skip to content
Snippets Groups Projects
  1. Nov 30, 2011
  2. Nov 24, 2011
    • Michael Hanselmann's avatar
      LUGroupAssignNodes: Fix node membership corruption · 54c31fd3
      Michael Hanselmann authored
      
      Note: This bug only manifests itself in Ganeti 2.5, but since the
      problematic code also exists in 2.4, I decided to fix it there.
      
      If a node was assigned to a new group using “gnt-group assign-nodes” the
      node object's group would be changed, but not the duplicate member list
      in the group object. The latter is an optimization to require fewer
      locks for other operations. The per-group member list is only kept in
      memory and not written to disk.
      
      Ganeti 2.5 starts to make use of the data kept in the per-group member
      list and consequently fails when it is out of date. The following
      commands can be used to reproduce the issue in 2.5 (in 2.4 the issue was
      confirmed using additional logging):
      
        $ gnt-group add foo
        $ gnt-group assign-nodes foo $(gnt-node list --no-header -o name)
        $ gnt-cluster verify  # Fails with KeyError
      
      This patch moves the code modifying node and group objects into
      “config.ConfigWriter” to do the complete operation under the config
      lock, and also to avoid making use of side-effects of modifying objects
      without calling “ConfigWriter.Update”. A unittest is included.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      (cherry picked from commit 218f4c3d)
      54c31fd3
    • Michael Hanselmann's avatar
      LUGroupAssignNodes: Fix node membership corruption · 218f4c3d
      Michael Hanselmann authored
      
      Note: This bug only manifests itself in Ganeti 2.5, but since the
      problematic code also exists in 2.4, I decided to fix it there.
      
      If a node was assigned to a new group using “gnt-group assign-nodes” the
      node object's group would be changed, but not the duplicate member list
      in the group object. The latter is an optimization to require fewer
      locks for other operations. The per-group member list is only kept in
      memory and not written to disk.
      
      Ganeti 2.5 starts to make use of the data kept in the per-group member
      list and consequently fails when it is out of date. The following
      commands can be used to reproduce the issue in 2.5 (in 2.4 the issue was
      confirmed using additional logging):
      
        $ gnt-group add foo
        $ gnt-group assign-nodes foo $(gnt-node list --no-header -o name)
        $ gnt-cluster verify  # Fails with KeyError
      
      This patch moves the code modifying node and group objects into
      “config.ConfigWriter” to do the complete operation under the config
      lock, and also to avoid making use of side-effects of modifying objects
      without calling “ConfigWriter.Update”. A unittest is included.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      218f4c3d
  3. Nov 23, 2011
  4. Nov 08, 2011
  5. Nov 01, 2011
    • Andrea Spadaccini's avatar
      Generalize HooksMaster · da124e89
      Andrea Spadaccini authored
      
      - remove any dependence on Logical Units from the HooksMaster;
      - add a new function parameter to the constructor, a function that is
        expected to convert the results of the hooks execution in a format
        understood by the HooksMaster;
      - add a factory method that builds a HooksMaster from a LU, keeping the
        interface of the old constructor of HooksMaster;
      - remove usage of Processor.hmclass from external classes, introducing
        the Processor.BuildHooksMaster method;
      - update unit tests.
      
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      Signed-off-by: default avatarAndrea Spadaccini <spadaccio@google.com>
      da124e89
  6. Oct 31, 2011
  7. Oct 27, 2011
  8. Oct 26, 2011
  9. Oct 25, 2011
  10. Oct 20, 2011
  11. Oct 18, 2011
  12. Oct 17, 2011
  13. Oct 13, 2011
  14. Oct 04, 2011
  15. Sep 30, 2011
  16. Sep 13, 2011
  17. Sep 05, 2011
  18. Sep 03, 2011
  19. Aug 26, 2011
  20. Aug 23, 2011
  21. Aug 19, 2011
  22. Aug 12, 2011
  23. Aug 11, 2011
  24. Aug 09, 2011
  25. 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
  26. Aug 05, 2011
  27. Aug 04, 2011
  28. Aug 02, 2011
  29. Jul 26, 2011
  30. Jul 25, 2011
  31. Jul 21, 2011
Loading