Skip to content
Snippets Groups Projects
  1. Aug 06, 2008
  2. Aug 05, 2008
  3. Aug 04, 2008
  4. Jul 31, 2008
  5. Jul 30, 2008
    • Iustin Pop's avatar
      Fix cluster destroy · 140aa4a8
      Iustin Pop authored
      With the recent startup/shutdown changes (and with the master daemon in
      place), the cluster destroy needs some fixing.
      
      This patch moves the finalization of the destroy out from cmdlib into
      bootstrap, so we can nicely shutdown the rapi and master daemons.
      
      Reviewed-by: ultrotter
      140aa4a8
    • Guido Trotter's avatar
      Xen: remove two end-of-line semicolons · 97efde45
      Guido Trotter authored
      It's python, isn't it?
      
      Reviewed-by: iustinp
      97efde45
    • Iustin Pop's avatar
      Fix cluster init · b3f1cf6f
      Iustin Pop authored
      With the recent changes, I forgot the extra parameter to this rpc call.
      Also the rpc call needs to be done after we setup the config data, for
      the master daemon to be able to start, so we move it after all other
      init steps.
      
      Reviewed-by: ultrotter
      b3f1cf6f
    • Iustin Pop's avatar
      Make gnt-* commands fail nicely on non-masters · b33e986b
      Iustin Pop authored
      This patch adds a check that we are on the master after failing to
      connect to the socket, and log nicely the master name.
      
      Reviewed-by: ultrotter
      b33e986b
    • Guido Trotter's avatar
      Parallelize LUFailoverInstance · c9e5c064
      Guido Trotter authored
      Reviewed-by: iustinp
      c9e5c064
    • Guido Trotter's avatar
      ChainOpCode is still BGL-only · 64381ad7
      Guido Trotter authored
      Prevent mistakes with an assert.
      
      Reviewed-by: iustinp
      64381ad7
    • Iustin Pop's avatar
      Fix a misuse of exc_info in logging.info · 8161a646
      Iustin Pop authored
      This is my fault, sorry.
      
      Reviewed-by: imsnah
      8161a646
    • Iustin Pop's avatar
      Fix pylint-detected issues · 38206f3c
      Iustin Pop authored
      This is mostly:
        - whitespace fix (space at EOL in some files, not all, broken
          indentation, etc)
        - variable names overriding others (one is a real bug in there)
        - too-long-lines
        - cleanup of most unused imports (not all)
      
      Reviewed-by: ultrotter
      38206f3c
    • Iustin Pop's avatar
      Fix some errors detected by pylint · 3b9e6a30
      Iustin Pop authored
      Reviewed-by: imsnah
      3b9e6a30
    • Iustin Pop's avatar
      Unify SetupDaemon/SetupLogging · 59f187eb
      Iustin Pop authored
      The 'old-style' info, error, debug logs do not make much sense. This
      patch unifies the SetupLogging and SetupDaemon functions. As a result,
      all the commands logs to a 'commands.log' file.
      
      The patch also changes the log setup to keep going if there's an error
      in setting up the file logging but we're logging to stderr.
      
      Also, burnin now logs to its own file (burnin.log).
      
      Reviewed-by: ultrotter
      59f187eb
    • Iustin Pop's avatar
      Simplify the log constants and add another one · 9936bd63
      Iustin Pop authored
      The patch changes the log constants by moving the slash to the end of
      the log dir instead of at the beginning of *each* log file name.
      
      It also adds a new LOG_COMMANDS constant (to be used in a next patch).
      
      Reviewed-by: ultrotter
      9936bd63
    • Iustin Pop's avatar
      Fix gnt-cluster getmaster · ce7151ae
      Iustin Pop authored
      This is special in the sense that it can run on any node. As such, we
      just instantiate ssconf and read the data from it.
      
      Reviewed-by: ultrotter
      ce7151ae
    • Guido Trotter's avatar
      Parallelize {Startup,Shutdown,Reboot}Instance · e873317a
      Guido Trotter authored
      Reviewed-by: iustinp
      e873317a
    • Guido Trotter's avatar
      Parallelize LUReinstallInstance · 4e0b4d2d
      Guido Trotter authored
      self.recalculate_locks[locking.LEVEL_NODE] could have any value and
      everything would work anyway. We'll use the string 'replace' by
      convention because in the future we might want an 'append' mode.
      
      Reviewed-by: iustinp
      4e0b4d2d
    • Guido Trotter's avatar
      LogicalUnit._LockInstancesNodes helper function · c4a2fee1
      Guido Trotter authored
      This function is used to lock instances' primary and secondary nodes
      after locking instances themselves.
      
      Reviewed-by: iustinp
      c4a2fee1
    • Guido Trotter's avatar
      Make sharing locks possible · 3977a4c1
      Guido Trotter authored
      LUs can declare which locks they need by populating the
      self.needed_locks dictionary, but those locks are always acquired as
      exclusive. Make it possible to acquire shared locks as well, by
      declaring a particular level as shared in the self.share_locks
      dictionary. By default this dictionary is populated so that all locks
      are acquired exclusively.
      
      Reviewed-by: iustinp
      3977a4c1
    • Guido Trotter's avatar
      Add LogicalUnit.DeclareLocks · fb8dcb62
      Guido Trotter authored
      This additional LogicalUnit function is optional to implement, but lets
      you change your locking needs for one level just before locking it, but
      after the previous levels have been already locked. It is useful for
      example to calculate what nodes to lock after locking an instance.
      
      Reviewed-by: iustinp
      fb8dcb62
    • Guido Trotter's avatar
      LURenameInstance, add/remove relevant locks · 74b5913f
      Guido Trotter authored
      LURenameInstance forgot to remove the old lock name and add the new one,
      making it impossible for parallel LUs to act on the instance (without a
      master daemon restart). This also fixes burning+rename with the
      parallelization of {Start,Stop}Instance.
      
      Reviewed-by: iustinp
      74b5913f
    • Michael Hanselmann's avatar
      Rewrite job queue · 85f03e0d
      Michael Hanselmann authored
      We found several issues in the old job queue implementation. It had race
      conditions, deadlocks and other deficiencies.
      
      Short summary:
      - _QueuedOpCode and _QueuedJob are now more or less data structures with a few
        utility functions. __Setup is gone.
      - DiskJobStorage and JobQueue classes merged into one to reduce code complexity.
      - One lock in JobQueue for almost everything. There's also a lock per opcode
        for log messages.
      
      Reviewed-by: iustinp
      85f03e0d
    • Michael Hanselmann's avatar
      workerpool: Log when waiting for a thread · c0a8eb9e
      Michael Hanselmann authored
      Reviewed-by: iustinp
      c0a8eb9e
    • Iustin Pop's avatar
      Rework master startup/shutdown/failover · b1b6ea87
      Iustin Pop authored
      This (big) patch reworks the master startup/shutdown and the fixes the
      master failover.
      
      What does the patch do?
      
      For master start/stop:
        - remove the old ganeti-master script and its associated man page
        - moves the ip start/stop directly into the backend.(Start|Stop)Master
        - adds start/stop of the master/rapi daemon into these functions,
          selectively based on the start/stop arguments
        - makes the master call via rpc StartMaster(start_daemons=False) to
          the local node so that the master IP is started
        - and finally changes the example init.d script to directly start and
          stop all three daemons, since they do the right thing (depending on
          master/not master role)
      
      For master failover:
        - moves the code from LUMasterFailover into bootstrap.MasterFailover,
          since we need to start/stop the master during this operation and
          thus it can't be executed from the master
        - removes the LUMasterFailover and its associated opcode
      
      Notes: ubuntu's /etc/lsb-base-logging.sh is dumb, so the messages 'not
      master' are not seen during startup on non-master nodes.
      
      Reviewed-by: ultrotter
      b1b6ea87
    • Iustin Pop's avatar
      Expose utils.DaemonPidFileName · 53beffbb
      Iustin Pop authored
      Since we need to compute this from outside utils.py, we change this to a
      public function.
      
      Reviewed-by: ultrotter
      53beffbb
    • Iustin Pop's avatar
      Implement checking for the master role in rapi · 5675cd1f
      Iustin Pop authored
      This patch moves the CheckMaster function from ganeti-masterd to ssconf
      (most logical place, it cannot go in utils since we would have recursive
      imports between ssconf and utils) and changes ganeti-rapi to also call
      this function.
      
      This is needed so that starting ganeti-rapi on a non-master node does
      the right thing.
      
      Reviewed-by: ultrotter
      5675cd1f
    • Iustin Pop's avatar
      Add a new parameter to backend.(Start|Stop)Master · 1c65840b
      Iustin Pop authored
      This patch adds a new, unused for now, parameter to the start and stop
      master operations in backend. The idea behind it is that we need to be
      able to control whether the IP (de)activation is coupled with daemon
      startup/shutdown.
      
      The callers are also modified to pass this parameter (even if unused for
      now).
      
      Reviewed-by: ultrotter
      1c65840b
  6. Jul 29, 2008
Loading