Skip to content
Snippets Groups Projects
  1. Jul 09, 2008
  2. Jul 08, 2008
  3. Jul 04, 2008
    • Iustin Pop's avatar
      Fix some issues with the watcher · 26517d45
      Iustin Pop authored
      This patch fixes two bugs:
        - the state file is not saved because we use the method for checking
          for udpated data
        - in two places 'Error' was used instead of 'Exception', which breaks
          error handling
      
      Additionally:
        - the unused 're' import has been removed
        - a variable named 'id' which collides with a builtin function has
          been renamed
      
      Note that comparing the serialized forms might create false negatives
      (due to the dicts being reordered) but that will just cause an extra
      write of the file, which is sub-optimal but harmless.
      
      Reviewed-by: ultrotter
      26517d45
  4. Jul 03, 2008
    • Iustin Pop's avatar
      Add custom logging setup for daemons · 3b316acb
      Iustin Pop authored
      It's better for daemons if:
        - they log only to one log file
        - the log level is included
        - for debug runs, the filename/line number is included
      
      This patch moves the custom formatter from the watcher to the logging
      module and generalizes it; then it changes the master daemon to use this
      function instead of the generic logging (which might be deprecated
      anyway in the future).
      
      Reviewed-by: imsnah
      3b316acb
  5. Jul 02, 2008
  6. Jul 01, 2008
    • Guido Trotter's avatar
      Context: s/GLM/glm/ · 984f7c32
      Guido Trotter authored
      Make the GanetiLockManager instance of GanetiContext lowercase
      
      Reviewed-by: imsnah
      984f7c32
    • Guido Trotter's avatar
      Increase the thread size to 5 · a478cd7e
      Guido Trotter authored
      Now that we use the locking library to make sure running opcodes cannot
      step on each other toes we can have a bigger thread size, and
      potentially process many opcodes in a parallel manner.
      
      Reviewed-by: iustinp
      a478cd7e
    • Guido Trotter's avatar
      Processor: pass context in and use it. · 1c901d13
      Guido Trotter authored
      The processor used to create a new ConfigWriter when it was initialized.
      We now have one in the context, so we'll just recycle it. First of all
      we'll pass the context in when creating a new Processor object, then
      we'll just use context.cfg, which is granted to be initialized, wherever
      we used self.cfg, and stop checking whether the config is already
      initialized or not.
      
      In the future the Processor will be able to use the context also to
      acquire the BGL for LUs that require it, and to push the context down to
      LUs that don't in order for them to manage their own locking.
      
      Reviewed-by: iustinp
      1c901d13
  7. Jun 30, 2008
    • Guido Trotter's avatar
      ganeti-masterd: init and distribute common context · 39dcf2ef
      Guido Trotter authored
      This patch creates a new GanetiContext class, which is used to hold
      context common to all ganeti worker threads. As for the
      GanetiLockingManager class it is paramount that there is only one such
      class throughout the execution of Ganeti, so the class checks for that,
      and also forbids its own modification after it's been initialized. The
      context for now contains a ConfigWriter and a GanetiLockingManager and
      is created by the daemon and propagated to PoolWorker(s) and
      JobRunner(s).
      
      Reviewed-by: iustinp
      39dcf2ef
  8. Jun 27, 2008
  9. Jun 26, 2008
    • Guido Trotter's avatar
      ganeti-noded: quit on QuitGanetiException · 9ae49f27
      Guido Trotter authored
      Accoring to the usage documented in the QuitGanetiException docstring,
      if we receive such an exception we'll set the global _EXIT_GANETI_NODED
      variable to True, and then return either a valid value or an error
      message to the user. This will be the last request we serve, though,
      because the main loop will be interrupted and the daemon will terminate.
      
      Reviewed-by: iustinp
      9ae49f27
    • Guido Trotter's avatar
      ganeti-noded: serve not quite forever · 3b3db8fd
      Guido Trotter authored
      Rather than calling httpd.serve_forever() in ganeti-noded we'll call
      httpd.handle_request() but just while a global variable, which we'll
      call _EXIT_GANETI_NODED, remains false.
      
      Reviewed-by: iustinp
      3b3db8fd
  10. Jun 23, 2008
    • Guido Trotter's avatar
      Handle any exception in ganeti-masterd · 0db7ac4d
      Guido Trotter authored
      If an uncaught exception is thrown currently it destroys the calling
      thread. This patch changes the behaviour to failing the current job,
      logging a message, but trying to keep the daemon up.
      
      Reviewed-by: imsnah
      0db7ac4d
  11. Jun 20, 2008
    • Iustin Pop's avatar
      Add a rpc call for BlockDev.Close() · d61cbe76
      Iustin Pop authored
      This patch adds rpc layer calls (in rpc.py and the equivalent in
      ganeti-noded) to close a list of block devices, and the wrapper in
      backend.py that takes a list of Disk objects, identifies them and
      returns correctly formatted results.
      
      The reason why this very basic call was missing until now from the rpc
      layer is that we usually don't care about device closes (though we
      should, and will do so in the future) as only drbd has a meaningful
      Close() operation; right now we directly do Shutdown().
      
      The patch is clean enough that it's actually independent of the live
      migration implementation.
      
      Reviewed-by: imsnah
      d61cbe76
  12. Jun 19, 2008
  13. Jun 18, 2008
  14. Jun 17, 2008
    • Iustin Pop's avatar
      Implement block device grow at the rpc layer · 4c8ba8b3
      Iustin Pop authored
      This simple patch exposes the block device grow operation at the rpc
      layer. It does not increase the protocol version as it has been recently
      changed by the live failover rpc call.
      
      Reviewed-by: imsnah
      4c8ba8b3
  15. Jun 16, 2008
    • Iustin Pop's avatar
      Add migration support at the rpc layer · 2a10865c
      Iustin Pop authored
      This patch adds the migration rpc call and its implementation in the
      backend. The patch does not deal with the correct activation of disks.
      
      Because of the new RPC, the protocol version is increased.
      
      Reviewed-by: imsnah
      2a10865c
  16. Jun 13, 2008
  17. May 13, 2008
    • Iustin Pop's avatar
      Watcher: do not activate disks for started instances · eee1fa2d
      Iustin Pop authored
      Currently the watcher runs first the instance startup and then the
      boot-id method of disk reactivation. However, irrelevant of the fact
      that a node has rebooted or not, if we just started an instance, there's
      no need for its disks to be activated again, since the start instance
      has done that (if it is at all possible).
      
      The patch modifies the watcher to remember all started instances and not
      run activate-disks for them.
      
      Reviewed-by: ultrotter
      eee1fa2d
    • Iustin Pop's avatar
      Watcher: do not activate disks for admin_down · 0c0f834d
      Iustin Pop authored
      Currently the watcher does activate disks (via bootid mechanisms) even
      for admin_down instances.  This patch logs and skips over these
      instances.
      
      Reviewed-by: ultrotter
      0c0f834d
  18. May 01, 2008
  19. Apr 29, 2008
    • Iustin Pop's avatar
      Disable forking in the master daemon · b74159ee
      Iustin Pop authored
      This patch adds a mechanism to disable utils.RunCmd in selected
      programs. This is needed in the master daemon unless we confirm
      threading doesn't pose any problems.
      
      This makes cluster init fail, but creating new trunk clusters is anyway
      broken at the moment.
      
      Reviewed-by: ultrotter
      b74159ee
  20. Apr 28, 2008
    • Iustin Pop's avatar
      Move the 'cmd' lock from cli.py to ganeti-masterd · a4af651e
      Iustin Pop authored
      This patch removes the lock and the lock options from cli.py and moves
      them to the master.
      
      Later during development we can remove it completely, but for now it's
      good to protect any other tool that uses the lock directly.
      
      Reviewed-by: imsnah,ultrotter
      a4af651e
    • Iustin Pop's avatar
      Convert cli.SubmitOpCode to use the master · 685ee993
      Iustin Pop authored
      This patch converts the cli.py SubmitOpCode method to use the unix
      protocol and thus execute the opcodes via the master.
      
      The patch allows a partial burnin to work with the master. Currently the
      query opcodes, since they are executed via the SubmitOpCode, are
      executed inside a job too, which is suboptimal, but they work fine.
      
      The cmd lock has been removed from the master, but the cli.py still
      takes the lock. This is ok for this in-progress patch (since the master
      still has only one executor thread). This will be fixed in a future
      patch.
      
      Reviewed-by: ultrotter
      685ee993
    • Iustin Pop's avatar
      Move iallocator script execution to ganeti-noded · 8d528b7c
      Iustin Pop authored
      Currently the iallocator execution takes place in the master, which is a
      violation of the current architecture, and will create problems with a
      threaded master daemon.
      
      This patch moves the execution to the backend, similar to the hooks
      runner, by:
        - introducing a new class that handles the execution in the backend
          (and could be used also for listing the allocators, etc.)
        - introducing a new rpc call
        - replacing the actual execution in IAllocator.Run() with a rpc call
      
      This passes burnin with the dumb allocator
      
      Reviewed-by: imsnah
      8d528b7c
  21. Apr 10, 2008
    • Iustin Pop's avatar
      Add per-opcode results to job processing · 35049ff2
      Iustin Pop authored
      This patch changes the definition of a job and introduces per-opcode
      results.
      
      First, the result and status fields of a job are condensed into a single
      'status' attribute. Then, we introduce an opcode status and one result
      list, that allow jobs to return values.
      
      The gnt-job script is also modified to allow these new fields to be
      queried.
      
      Note that the patch changes the opcode field to op_list, and it changes
      its return value from string to a list of (serialized) opcodes.
      
      Reviewed-by: ultrotter
      35049ff2
  22. Apr 05, 2008
    • Iustin Pop's avatar
      Implement forking/master role checking in masterd · c1f2901b
      Iustin Pop authored
      This patch adds checks for the master role and daemonize support to
      ganeti-masterd.
      
      The patch modifies the startup/shutdown of the server because:
        - we want bind()/listen() to the master socket to occur before forking
          so that we can return a correct exit code and write messages to
          stderr
        - but we want thread startup to occur after fork(), otherwise python
          threading gets confused
      
      The patch also has some small cleanups:
        - remove the unix socket after closing it, so we don't need to remove
          it manually
        - instead of just telling the threads to terminate via the new_queue,
          we also join() them so that the logs show what thread clinging to
          life
        - the daemon logs to its own logfile now
        - there is command line parameter support :)
      
      Reviewed-by: imsnah
      c1f2901b
Loading