Skip to content
Snippets Groups Projects
  1. Mar 18, 2011
  2. 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
  3. Mar 15, 2011
  4. Mar 14, 2011
  5. Mar 01, 2011
  6. Feb 25, 2011
  7. Feb 24, 2011
  8. Feb 22, 2011
  9. Feb 18, 2011
  10. Feb 17, 2011
  11. Feb 15, 2011
  12. Feb 04, 2011
  13. Jan 28, 2011
  14. Jan 27, 2011
  15. Jan 26, 2011
  16. Jan 20, 2011
  17. Jan 19, 2011
  18. Jan 18, 2011
  19. Jan 12, 2011
  20. Jan 11, 2011
Loading