Skip to content
Snippets Groups Projects
  1. Mar 25, 2011
  2. Mar 24, 2011
  3. Mar 18, 2011
  4. Mar 17, 2011
  5. Mar 16, 2011
    • Michael Hanselmann's avatar
      hooks: Provide variables with post-opcode values · dd7f6776
      Michael Hanselmann authored
      
      When a hook is called, it is provided with a number of variables
      describing the status of the instance/node/etc. before the operation.
      Some opcodes provide extra variables to see modified values from hooks,
      but that's not a generic solution.
      
      This patch modifies the code calling hooks to generate the environment
      once before and once after an opcode has been executed. Doing so should
      be safe—I did not find any LU.BuildHooksEnv modifying LU instance
      attributes. The values collected after running the opcode are prefixed
      with “GANETI_POST_”, as opposed to “GANETI_” for pre-execution
      variables. The latter are still provided for backwards compatibility.
      
      Environment variable examples:
      
      gnt-instance start $instance:
      GANETI_INSTANCE_STATUS=down
      GANETI_POST_INSTANCE_STATUS=up
      
      gnt-instance modify -B memory=512 $instance:
      GANETI_INSTANCE_BE_memory=768
      GANETI_POST_INSTANCE_BE_memory=512
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      dd7f6776
  6. Mar 15, 2011
  7. Mar 14, 2011
  8. Mar 07, 2011
  9. Mar 02, 2011
  10. Mar 01, 2011
    • Michael Hanselmann's avatar
      query: Add support for filters · fb0be379
      Michael Hanselmann authored
      
      This patch adds a “compiler” for query filters, converting them to a
      callable function used while preparing the query result. In addition, a
      hints call allows some analysis to be done on the query (e.g. referenced
      names), making data collection more efficient.
      
      The depth of filters is limited to avoid exceeding the runtime's maximum
      recursion depth.
      
      More operators and other improvements can be implemented using this
      base. Extensive unittests are provided.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      fb0be379
    • Michael Hanselmann's avatar
      Add query field flags · 111bf531
      Michael Hanselmann authored
      
      Some fields (e.g. “name”) should be treated specially when comparing for
      equality. Hypervisor names should use normal rules, but for node names,
      “node2” should be equivalent with “node2.example.com”.
      
      To make these differences, a new field for flags is added to the query
      fields. It is not added to ”objects.QueryFieldDefinition” (the first
      item) as it would be exported to clients, something not desired for
      these internal rules. Instead, an additional field is added.
      
      Other special rules, e.g. “a list of strings” for an instance's
      secondary nodes, can be implemented as flags, too.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      111bf531
  11. Feb 28, 2011
  12. Feb 25, 2011
  13. Feb 24, 2011
  14. Feb 23, 2011
  15. Feb 22, 2011
  16. Feb 18, 2011
  17. Feb 17, 2011
    • Iustin Pop's avatar
      NodeQuery: mark live fields as UNAVAIL for non-vm_capable nodes · effab4ca
      Iustin Pop authored
      
      Since we don't have the data per design, UNAVAIL is appropriate here,
      while NODATA is not.
      
      The patch also adds a comment: if we extend the live fields list to
      contain other data in the future, we need to reevaluate this solution.
      
      This should fix issue 143. The listing now shows (node2==ofline,
      node3==not vm_capable):
      
        Node     DTotal     DFree    MTotal     MNode     MFree Pinst Sinst
        node1    698.6G    630.5G     32.0G      1.0G     30.0G     8     7
        node2 (offline) (offline) (offline) (offline) (offline)     9     4
        node3 (unavail) (unavail) (unavail) (unavail) (unavail)     0     0
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      effab4ca
  18. Feb 15, 2011
  19. Feb 04, 2011
Loading