Skip to content
Snippets Groups Projects
  1. Jan 09, 2009
    • Iustin Pop's avatar
      Rework the daemonization sequence · 7d88772a
      Iustin Pop authored
      The current fork+close fds sequence has deficiencies which are hard to
      work around:
        - logging can start logging before we fork (e.g. if we need to emit
          messages related to master checking), and thus use FDs which we
          can't track nicely
        - the queue locks the queue file, and again this fd needs to be kept
          open which is hard from the main loop (and this error is currently
          hidden by the fact that we don't log it)
      
      Given the above, it's much simpler, in case we will fork later, to close
      file descriptors right at the beginning of the program, and in Daemonize
      only close/reopen the stdin/out/err fds.
      
      In addition, we also close() the handlers we remove in SetupLogging so
      that the cleanup is more thorough.
      
      Reviewed-by: imsnah
      7d88772a
  2. Jan 08, 2009
    • Iustin Pop's avatar
      Add an instance_migratable rpc call · 56e7640c
      Iustin Pop authored
      This is a forward-port of commit 1194 on the 1.2 branch:
      
        This call will check whether an instance is up on its primary, and that
        it has been started with symlinks. We currently have no on-secondary
        checks, nor any hypervisor specific call.
      
        Reviewed-by: iustinp
      
      The difference from the original patch is that we don't include the
      cmdlib changes, since those will come as a copy from the 1.2 cmdlib.py,
      and not as individual patches.
      
      Original-Author: ultrotter
      56e7640c
  3. Jan 07, 2009
    • Iustin Pop's avatar
      Pass instance name to rpc call blockdev_close · b2e7666a
      Iustin Pop authored
      This is an extract of commit 1166 on the 1.2 branch (Add a rpc call for
      drbd network reconfiguration), but only the blockdev_close part.
      
      The patch changes the blockdev_close call to take the instance so that
      it can remove the symlinks of the instance.
      
      Originally-Reviewed-by: imsnah
      b2e7666a
  4. Jan 06, 2009
  5. Dec 19, 2008
  6. Dec 18, 2008
  7. Dec 11, 2008
    • Iustin Pop's avatar
      Fix epydoc format warnings · c41eea6e
      Iustin Pop authored
      This patch should fix all outstanding epydoc parsing errors; as such, we
      switch epydoc into verbose mode so that any new errors will be visible.
      
      Reviewed-by: imsnah
      c41eea6e
  8. Dec 05, 2008
    • Iustin Pop's avatar
      Cleanup the config file on demotion from candidate · 56aa9fd5
      Iustin Pop authored
      This patch adds a simple rpc which makes a backup of the config file and
      then removes it. This is done so that cluster verify doesn't complain
      immediately after demoting a node.
      
      Reviewed-by: imsnah
      56aa9fd5
    • Iustin Pop's avatar
      watcher: handle offline nodes better · cbfc4681
      Iustin Pop authored
      This patch changes the LUQueryInstances to show a different state for
      offline nodes and also modifies the watcher to understand the offline
      state in its checks.
      
      Reviewed-by: ultrotter
      cbfc4681
  9. Dec 04, 2008
  10. Dec 02, 2008
    • Iustin Pop's avatar
      Fix master failover · bbe19c17
      Iustin Pop authored
      The ssconf files were not updated by the master failover. We need to
      push them, and since we already have RPC initialized, we can use the
      standard ConfigWriter to do so - this will take care of both the config
      file and the ssconf files.
      
      Reviewed-by: imsnah
      bbe19c17
  11. Nov 26, 2008
  12. Nov 25, 2008
  13. Nov 21, 2008
  14. Nov 11, 2008
    • Iustin Pop's avatar
      Abstract runtime creation of dirs into a function · 8adbffaa
      Iustin Pop authored
      Currently the dir creation in ganeti-noded is in the main function. This
      is not nice: we move it into a separate function and also add creation
      of the OS_LOG_DIR (with different permissions, but in the same way).
      This will permit cleanup of the creation of the OS_LOG_DIR from the
      backend module (it's done multiple places currently).
      
      Reviewed-by: imsnah
      8adbffaa
  15. Oct 24, 2008
  16. Oct 23, 2008
    • Iustin Pop's avatar
      Export the disk index in the import/export scripts · 74c47259
      Iustin Pop authored
      We want to export the disk index as some OSes will only want to export
      the first disk (or the second one, etc.), even if we have multiple
      disks.
      
      The patch also updates the backend.ExportSnapshot docstring.
      
      Reviewed-by: ultrotter
      74c47259
  17. Oct 22, 2008
    • Guido Trotter's avatar
      Convert ImportOSIntoInstance to OS API 10 · 6c0af70e
      Guido Trotter authored
      - Change ImportOSIntoInstance not to get any "os_disk" and "swap_disk"
        arguments but to accept multiple target images to import, and to
        return a list of booleans with the result of each import
      - Change the relevant rpc call and the only caller to conform
      - Pass arguments to the import script through the environment
      - Run one import os script for each disk image, passing an IMPORT_DEVICE
      
      Reviewed-by: iustinp
      6c0af70e
  18. Oct 21, 2008
  19. Oct 20, 2008
    • Iustin Pop's avatar
      Convert the job queue rpcs to address-based · 99aabbed
      Iustin Pop authored
      The two main multi-node job queue RPC calls (jobqueue_update,
      jobqueue_rename) are converted to address-based calls, in order to speed
      up queue changes. For this, we need to change the _nodes attribute on
      the jobqueue to be a dict {name: ip}, instead of a set.
      
      Reviewed-by: imsnah
      99aabbed
    • Iustin Pop's avatar
      Remove the logger.py module · 82d9caef
      Iustin Pop authored
      Since now we use only one function from the logger module
      (SetupLogging), we move it to utils.py (which is already imported by all
      users of this function), and we remove the module.
      
      Reviewed-by: imsnah
      82d9caef
  20. Oct 17, 2008
  21. Oct 16, 2008
    • Michael Hanselmann's avatar
      rapi: Convert to new HTTP server class · 16a8967d
      Michael Hanselmann authored
      Requests are no longer logged to a separate file.
      
      Reviewed-by: amishchenko
      16a8967d
    • Iustin Pop's avatar
      Improvements to the master startup checks · d7cdb55d
      Iustin Pop authored
      In order to account for future improvements to master failover, we move
      the actual data gathering capabilities from ganeti-masterd into
      bootstrap.py, and we leave only the verification into masterd.
      
      The verification procedure is then changed to retry multiple times (up
      to one minute) in case most nodes do not respond, and also the algorithm
      is changed to require at least half (but not half+1) votes, since our
      vote also should count (and we vote for ourselves).
      
      Example for consistent (config-wise) cluster:
        - 5 node cluster, 2 nodes down: still start
        - 4 node cluster, 2 nodes down: retry for one minute, abort
      
      Reviewed-by: ultrotter
      d7cdb55d
    • Iustin Pop's avatar
      Add an interface for the drain flag changes/query · 3ccafd0e
      Iustin Pop authored
      This adds the set/reset in the jqueue and luxi modules, and a way to
      query it in OpQueryConfigValues, and also the comand line interface for
      it:
      $ gnt-cluster queue info
      The drain flag is unset
      $ gnt-cluster queue drain
      $ gnt-cluster queue info
      The drain flag is set
      $ gnt-cluster queue undrain
      $ gnt-cluster queue info
      The drain flag is unset
      
      The choice of making the setting via luxi and not an opcode is that
      opcodes can't be executed when drained, but we don't query via luxi
      since in the future it might become a cluster property as opposed to a
      node one.
      
      Reviewed-by: imsnah
      3ccafd0e
  22. Oct 15, 2008
Loading