Skip to content
Snippets Groups Projects
  1. Jun 27, 2008
  2. 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
  3. 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
  4. 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
  5. Jun 19, 2008
  6. Jun 18, 2008
  7. 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
  8. 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
  9. Jun 13, 2008
  10. 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
  11. May 01, 2008
  12. 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
  13. 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
  14. 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
  15. 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
    • Manuel Franceschini's avatar
      ganeti-noded directory functions for file backend · a5d7fb43
      Manuel Franceschini authored
      Reviewed-by: ultrotter
      a5d7fb43
  16. Apr 04, 2008
    • Iustin Pop's avatar
      Add a simple gnt-job script · 7a1ecaed
      Iustin Pop authored
      This patch adds a very basic gnt-job script that allows job querying.
      This goes on top of the previous master daemon patches.
      
      Currently, because of the not-changed cmd lock, you can't query the jobs
      as long as a job is running - you have to rm the cmd lock and then you
      can query the jobs.
      
      Reviewed-by: imsnah
      7a1ecaed
    • Iustin Pop's avatar
      Move the daemonize function to utils.py · 8f765069
      Iustin Pop authored
      Currently, in ganeti-noded we have the createDaemon function. Since
      we'll need the same in other daemons, we move this function to utils.py
      
      With the move, a few changes were also done:
        - change the name to Daemonize()
        - add a parameter, logfile, as different daemons will want to log to
          different files
        - remove the try.. except.. around the fork calls, since they were
          only re-raising the OS exception with less data; unless we want to
          actually handle fork error (not just re-raising), these try blocks
          are not useful
        - change the return style at the end of the function
      
      Reviewed-by: imsnah
      8f765069
  17. Apr 01, 2008
    • Iustin Pop's avatar
      Initial tests with ganeti-masterd · ffeffa1d
      Iustin Pop authored
      This patch adds a very in-progress master daemon. This needs to be
      launched manually, does not background itself, but can be used for
      opcode execution.
      
      Also parts of this code should be moved to luxi.py.
      
      Reviewed-by: ultrotter
      ffeffa1d
  18. Mar 27, 2008
  19. Mar 19, 2008
    • Iustin Pop's avatar
      Make ganeti-noded create BDEV_CACHE_DIR automatically · 0214b0c0
      Iustin Pop authored
      Currently in order to deal with tmpfs /var/run, we create the
      BDEV_CACHE_DIR in the init script. However, that does not cover all the
      cases, and it's not a proper place to deal with it: for example, dealing
      with not initialized clusters and the master node is more complicated.
      
      Therefore, this patch does:
        - make ganeti-noded create the directory automatically
        - make ganeti-noded error out if it can't create it or it's already
          there but not a directory
        - remove the creation from the init.d script
      
      Reviewed-by: ultrotter
      0214b0c0
  20. Mar 11, 2008
    • Iustin Pop's avatar
      Modify utils.TcpPing to make source address optional · b15d625f
      Iustin Pop authored
      This patch modifies TcpPing and its callers to make the source address
      selection optional. Usually, the kernel will know better what
      source address to use, just in some cases we want to enforce a given
      source address so it makes sense to make this optional.
      
      Reviewed-by: ultrotter
      b15d625f
  21. Feb 22, 2008
    • Iustin Pop's avatar
      Break trunk by removing twisted · 81010134
      Iustin Pop authored
      This patch switches from the twisted usage for inter-node protocol to
      simple BaseHTTPServer/httplib. The patch has more deletions because we
      use no authentication, no encryption at all.
      
      As such, this is just for trunk, and only for testing. What it brings is
      the ability to use the rpc library from within multiple threads in
      parallel (or it should so).
      
      Since the changes are very few and non-intrusive, they can be reverted
      without impacting the rest of the code.
      
      This passes burnin. QA was not tested.
      
      Reviewed-by: imsnah
      81010134
  22. Feb 05, 2008
  23. Dec 12, 2007
  24. Dec 03, 2007
  25. Nov 29, 2007
  26. Nov 13, 2007
Loading