Skip to content
Snippets Groups Projects
  1. Dec 27, 2012
  2. Nov 21, 2012
  3. Oct 18, 2012
  4. Sep 18, 2012
  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
    • Andrea Spadaccini's avatar
      Generalize HooksMaster · 949dcb1d
      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.
      
      Signed-off-by: default avatarAndrea Spadaccini <spadaccio@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      949dcb1d
  6. Oct 27, 2011
  7. Mar 18, 2011
    • Michael Hanselmann's avatar
      Split BuildHooksEnv of LUs · 07e0896f
      Michael Hanselmann authored
      
      Commit dd7f6776 added another call to BuildHooksEnv to provide
      post-phase status variables. Since BuildHooksEnv also built the node
      lists, that meant they have to be built twice. First a rather strict
      check was used, but it turned out to be more tricky. Commit b423c513
      had to remove the strict check again.
      
      With this patch the function is split in two parts, one generating the
      actual environment variables, and another part returning the node lists.
      The former is called twice.
      
      Unittests are updated.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      07e0896f
  8. Mar 17, 2011
  9. 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
  10. Nov 03, 2009
  11. Aug 24, 2009
  12. Jun 15, 2009
  13. Feb 03, 2009
    • Iustin Pop's avatar
      Fix unittest encoding breakage · 7b80424f
      Iustin Pop authored
      Due to the fact that we sanitize now the output from environment
      scripts, the unittest needs to be adjusted. My bad for not checking it.
      
      Reviewed-by: imsnah
      7b80424f
  14. Dec 02, 2008
  15. Oct 21, 2008
    • Iustin Pop's avatar
      Move some LU logging to use proc.Log* · 86d9d3bb
      Iustin Pop authored
      We change some messages which are obviously intended for the user to use
      the proc.Log* functions instead of (only) the logging ones.
      
      We also fix some wrong uses of feedback_fn.
      
      Reviewed-by: imsnah
      86d9d3bb
  16. Oct 10, 2008
    • Iustin Pop's avatar
      Convert rpc module to RpcRunner · 72737a7f
      Iustin Pop authored
      This big patch changes the call model used in internode-rpc from
      standalong function calls in the rpc module to via a RpcRunner class,
      that holds all the methods. This can be used in the future to enable
      smarter processing in the RPC layer itself (some quick examples are not
      setting the DiskID from cmdlib code, but only once in each rpc call,
      etc.).
      
      There are a few RPC calls that are made outside of the LU code, and
      these calls are left as staticmethods, so they can be used without a
      class instance (which requires a ConfigWriter instance).
      
      Reviewed-by: imsnah
      72737a7f
  17. Oct 01, 2008
  18. Jul 08, 2008
    • Guido Trotter's avatar
      Pass context to LUs · 77b657a3
      Guido Trotter authored
      Rather than passing a ConfigWriter to the LUs we'll pass the whole
      context, from which a ConfigWriter can be extracted, but we can also
      access the GanetiLockManager. This also fixes the places where a FakeLU
      is created.
      
      Reviewed-by: iustinp
      77b657a3
  19. Jun 30, 2008
  20. Nov 09, 2007
    • Iustin Pop's avatar
      Soften the requirements for hooks execution · 2395c322
      Iustin Pop authored
      Currently, an unreachable node (or one that return undetermined failure)
      in the hooks pre-phase will abort the curren operation. This is not
      good, as a down node could prevent many operation on the cluster.
      
      This patch changes a RPC-level failure (and not a hook execution
      failure) into a warning. It also modifies the related test cases.
      
      This fixes issue 11.
      
      Reviewed-by: ultrotter
      2395c322
  21. Oct 17, 2007
  22. Sep 12, 2007
  23. Jul 23, 2007
    • Iustin Pop's avatar
      Big change/cleanup in relation to the master startup: · 880478f8
      Iustin Pop authored
        - move the master node name from the ConfigWriter to SimpleStore (all
          nodes need this, and it was the only thing pulled in from the
          ConfigWriter on nodes)
        - fix mcpu.py and the testing w.r.t. this change; for testing, rename
          the fake_config.py to mocks.py and add a FakeSStore object
        - then add a ganeti-master script which can be run on any node at boot
          and which will not do anything if not master on start (on stop it
          will still try to remove the ip address)
        - also add a new cluster-wide variable (master_netdev) that determines
          on which interface we add this ip address; it's customizable at
          cluster init time
        - also remove the cluster name file which was separately handled from
          ssconf (not needed anymore)
        - remove the master init.d links from the list of config files as this
          is not our responsibility now
      
      880478f8
  24. Jul 16, 2007
Loading