1. 04 Sep, 2008 6 commits
  2. 02 Sep, 2008 4 commits
  3. 01 Sep, 2008 4 commits
    • Alexander Schreiber's avatar
      merge r1539 from branches/ganeti/ganeti-1.2 · 34b6ab97
      Alexander Schreiber authored
      Display VNC console port in gnt-instance info.
      
      
      Reviewed-by: iustinp
      
      34b6ab97
    • Alexander Schreiber's avatar
      merge r1538 from branches/ganeti/ganeti-1.2 · 5bc84f33
      Alexander Schreiber authored
      Check HVM device type on instance modify as well.
      
      Reviewed-by: imsnah
      
      5bc84f33
    • Guido Trotter's avatar
      Check memory size before setting it · cfefe007
      Guido Trotter authored
      With this change when a user asks for a new memory size for an instance,
      the number is checked instead of just applied. The operation fails only
      if the instance would not be able to restart on its primary node, but
      generates warnings should it be impossible to failover the instance or
      should the computation be impossible due to nodes being unreachable.
      
      This is a forward-port from branches/ganeti-1.2
      
      Original-Reviewed-by: iustinp
      Reviewed-by: iustinp
      
      cfefe007
    • Guido Trotter's avatar
      Pass the force param to SetInstanceParms · 4300c4b6
      Guido Trotter authored
      It was already allowed in gnt-instance modify, but ignored.
      It will be used to force skipping parameter checks.
      
      This is a forward-port from branches/ganeti-1.2
      
      Original-Reviewed-by: imsnah
      Reviewed-by: iustinp
      4300c4b6
  4. 29 Aug, 2008 5 commits
    • Alexander Schreiber's avatar
      Merge r1536 from branches/ganeti/ganeti-1.2 · 5397e0b7
      Alexander Schreiber authored
      Add HVM device type flags 2/3
      
      Reviewed-by: ultrotter
      
      5397e0b7
    • Michael Hanselmann's avatar
      utils.SplitTime: Fix rounding of milliseconds · b77ba978
      Michael Hanselmann authored
      Reported by Iustin.
      
      It used to return this:
      >>> utils.SplitTime(1234.999999999999)
      (1234, 1000)
      
      while it should've returned this:
      >>> utils.SplitTime(1234.999999999999)
      (1235, 0)
      
      Reviewed-by: ultrotter
      b77ba978
    • Alexander Schreiber's avatar
      merge r1535 from branches/ganeti/ganeti-1.2 · b894f5a8
      Alexander Schreiber authored
      Add HVM device type flags 1/4
      
      Reviewed-by: ultrotter
      
      b894f5a8
    • Iustin Pop's avatar
      Make WaitForJobChanges deal with long jobs · 5c735209
      Iustin Pop authored
      This patch alters the WaitForJobChanges luxi-RPC call to have a
      configurable timeout, so that the call behaves nicely with long jobs
      that have no update.
      
      We do this by adding a timeout parameter in the RPC call, and returning
      a special constant when the timeout is reached without an update. The
      luxi client will repeatedly call the WaitForJobChanges until it gets a
      real change. The timeout is hardcoded as half the RWTO value.
      
      The patch also removes an unused variable (new_state) from the
      WaitForJobChanges method.
      
      Reviewed-by: imsnah,ultrotter
      5c735209
    • Alexander Schreiber's avatar
      merge r997 from branches/ganeti/ganeti-1.2 · 3fc175f0
      Alexander Schreiber authored
      Fix gnt-instance modify for HVM parameters
      
      This patch makes gnt-instance modify work again for the advanced
      HVM parameters after it was broken by other changes.
      
      
      Reviewed-by: ultrotter
      
      3fc175f0
  5. 28 Aug, 2008 2 commits
    • Michael Hanselmann's avatar
      Fix error message when masterd is not listening · 082c5adb
      Michael Hanselmann authored
      Reported by Iustin.
      
      Reviewed-by: iustinp
      082c5adb
    • Guido Trotter's avatar
      Fix issue when acquiring empty lock sets · 6683bba2
      Guido Trotter authored
      By design if an empty list of locks is acquired from a set, no locks are
      acquired, and thus release() cannot be called on the set. On the other
      hand if None is passed instead of the list, the whole set is acquired,
      and must later be released. When acquiring whole empty sets, a release
      must happen too, because the set-lock is acquired.
      
      Since we used to overwrite the required locks (needed_locks) with the
      acquired ones, we weren't able to distinguish the two cases (empty list
      of locks required, and all locks required, but an empty list returned
      because the set is empty). Valid solutions include:
        (1) forbidding the acquire of empty lists of locks
        (2) skipping the acquire/release on empty lists of locks
        (3) separating the to-acquire and the acquired list
      
      This patch implements the third approach, and thus LUs will find
      acquired locks in the acquired_locks dict, rather than in needed_locks.
      The LUs which used this feature before have been updated. This makes it
      easier because it doesn't force LUs to do more checks on corner cases,
      which are easily forgettable (1) and allows more flexibility if we want
      LUs to release (part-of) the locks (which is still a possibly scary
      operation, but anyway). This easily combines with (2) should we choose
      to implement it.
      
      Reviewed-by: imsnah
      6683bba2
  6. 27 Aug, 2008 5 commits
    • Michael Hanselmann's avatar
      jqueue: Replace normal cache dict with weakref dict · 5685c1a5
      Michael Hanselmann authored
      A job should only exist once in memory. After the cache is cleaned,
      there can still be references to a job somewhere else. If there
      are multiple instances, one can get updated while a function is
      waiting for changes on another instance. By using
      weakref.WeakValueDictionary, which automatically removes instances as
      soon as there are no strong references to it anymore, we can solve
      this problem.
      
      Reviewed-by: iustinp
      5685c1a5
    • Michael Hanselmann's avatar
      jqueue: Keep timestamp of opcode start and end · 70552c46
      Michael Hanselmann authored
      Reviewed-by: ultrotter
      70552c46
    • Michael Hanselmann's avatar
      jqueue: Reset run_op_idx after job is done · 65548ed5
      Michael Hanselmann authored
      It can be confusing otherwise.
      
      Reviewed-by: ultrotter
      65548ed5
    • Iustin Pop's avatar
      Fix a small typo in a constant · 6abe9194
      Iustin Pop authored
      Seems noone ran a burnin lately :)
      
      Reviwed-by: amischenko,ultrotter
      6abe9194
    • Michael Hanselmann's avatar
      Make sure that client programs get all messages · 6c5a7090
      Michael Hanselmann authored
      This is a large patch, but I can't figure out how to split it without
      breaking stuff. The old way of getting messages by always getting the
      last one didn't bring all messages to the client if they were added
      too fast, thereby making commands like “gnt-cluster verify” less than
      useful. These changes now introduce some sort a serial number per
      log entry to keep track what message a client already received. They
      also remove the log lock per opcode to make reading log entries thread
      safe.
      
      Reviewed-by: ultrotter
      6c5a7090
  7. 26 Aug, 2008 1 commit
    • Michael Hanselmann's avatar
      Add simple lock debug output · e67bd559
      Michael Hanselmann authored
      Currently it can only be enabled by modifying utils.py, but we can
      add a command line parameter later if needed.
      
      Reviewed-by: schreiberal
      e67bd559
  8. 18 Aug, 2008 7 commits
    • Guido Trotter's avatar
      Parallelize LUQueryNodes · 35705d8f
      Guido Trotter authored
      As for LUQueryInstances the first version just acquires a shared lock on all
      nodes. In the future further optimizations are possible, as outlined by
      comments in the code.
      
      Reviewed-by: imsnah
      35705d8f
    • Guido Trotter's avatar
      Parallelize LUQueryInstances · 7eb9d8f7
      Guido Trotter authored
      This first version acquires a shared lock on all requested instances and
      their nodes. In the future it can be improved by acquiring less locks if
      no dynamic fields have been asked, and/or by locking just primary nodes.
      
      Reviewed-by: imsnah
      7eb9d8f7
    • Guido Trotter's avatar
      LockSet: allow lists with duplicate values · 34ca3914
      Guido Trotter authored
      If a list with a duplicate value is passed to a lockset what the code
      now does is to try to acquire the lock twice, generating a
      double-acquire exception in the SharedLock code. This is definitely an
      issue. In order to solve it we can either forbit double values in a list
      or just delete the duplicates. In this patch we go for the latter
      solution, removing any duplicate values when creating the acquire_list.
      
      Reviewed-by: imsnah
      34ca3914
    • Guido Trotter's avatar
      Processor: lock all levels even if one is missing · 8a2941c4
      Guido Trotter authored
      If a locking level wasn't specified locking used to stop. This means
      that if one, for example, didn't specify anything at the LEVEL_INSTANCE
      level, no locks at the LEVEL_NODE level were acquired either. With this
      patch we force _LockAndExecLU to be called for all existing levels, and
      break the recursion if the level doesn't exist in locking.LEVELS.
      
      Reviewed-by: imsnah
      8a2941c4
    • Guido Trotter's avatar
      LURebootInstance: move arg check in ExpandNames · 0fcc5db3
      Guido Trotter authored
      The check for the reboot type can be done without any locks held, so
      we'll move it to ExpandNames. Plus, we note in a FIXME that if the
      reboot type is not full, we can probably just lock the primary node, and
      leave the secondary unlocked.
      
      Reviewed-by: imsnah
      0fcc5db3
    • Michael Hanselmann's avatar
      LUVerifyCluster: Return boolean indication success · 34290825
      Michael Hanselmann authored
      Reviewed-by: schreiberal
      34290825
    • Michael Hanselmann's avatar
      Use Linux-specific way to name master socket · 9894ece7
      Michael Hanselmann authored
      By using this Linux-specific way we don't have to care about removing the
      socket file when quitting or starting (after an unclean shutdown). For a
      more detailed description, see the comment in the patch.
      
      Reviewed-by: schreiberal
      9894ece7
  9. 15 Aug, 2008 4 commits
  10. 14 Aug, 2008 2 commits
    • Guido Trotter's avatar
      Pass hypervisor type to the OS scripts · 4f0afaf5
      Guido Trotter authored
      It's handy to make the os scripts know which hypervisor the instance is
      going to run under. In order not to change the os API we pass this
      information in the environment, where the os scripts can access it if
      they're hypervisor-aware.
      
      Reviewed-by: imsnah
      4f0afaf5
    • Guido Trotter's avatar
      RunCmd: add optional environment overriding · 2557ff82
      Guido Trotter authored
      If the user passes an env dict to RunCmd we'll override the environment
      passed to the to-be-executed command with the values in the dict. This
      allows us to pass arbitrary environment values to commands we run.
      
      Reviewed-by: imsnah 
      2557ff82