Skip to content
Snippets Groups Projects
  1. Jul 29, 2008
    • Iustin Pop's avatar
      Use constants for the pid file stems · 99e88451
      Iustin Pop authored
      Reviewed-by: imsnah
      99e88451
    • Iustin Pop's avatar
      Add a KillProcess function · b2a1f511
      Iustin Pop authored
      We cannot depend on all environments to have a start-stop-daemon or
      similar tool. We instead implement a KillProcess function that behaves
      similar to “start-stop-daemon --retry”.
      
      Note that the attached unittest can hang in foreground if the child
      misbehaves (doesn't write to the internal pipe). Since unittest are
      either run in the foreground or are run with a timeout from an automated
      framework, I think this is an acceptable trade-off (against of using
      hardcoded timeouts in the test).
      
      Reviewed-by: imsnah
      b2a1f511
    • Iustin Pop's avatar
      Change IsPidFileAlive into ReadPidFile · d9f311d7
      Iustin Pop authored
      We already have a function to test if a PID is alive, so it makes more
      sense to use function composition that force calling (since we need to
      read PIDs from files in other places too). Now IsProcessAlive returns
      False for PIDs <= 0, since this is the error return from ReadPidFile.
      
      The patch also adds a unittest for checking that WriteFile raises the
      correct exception, and checks that an invalid or missing file causes
      ReadPidFile to return zero. The unittest tearDown method will try to
      cleanup the temp directory too (otherwise it leaves stuff after it).
      
      Reviewed-by: ultrotter
      d9f311d7
    • Iustin Pop's avatar
      Make the rapi daemon create a pidfile · f71245a0
      Iustin Pop authored
      This is needed for controlling it cleanly with start-stop daemon.
      
      Reviewed-by: ultrotter
      f71245a0
  2. Jul 28, 2008
  3. Jul 25, 2008
  4. Jul 24, 2008
  5. Jul 23, 2008
  6. Jul 22, 2008
    • Guido Trotter's avatar
      Convert SetInstanceParams to concurrency · 1a5c7281
      Guido Trotter authored
      Grab a lock for the instance we're working on, and update its params.
      
      Reviewed-by: iustinp
      1a5c7281
    • Guido Trotter's avatar
      Use Update in SetInstanceParams · ea94e1cd
      Guido Trotter authored
      When we set the instance params we're not adding a new instance, but
      just updating an existing one, so why using AddInstance?
      
      Reviewed-by: iustinp
      ea94e1cd
    • Guido Trotter's avatar
      Convert LUConnectConsole to concurrency · 8659b73e
      Guido Trotter authored
      For ConnectConsole we just need to lock the instance we're connecting
      to. We make a few rpcs to its primary node, but node daemons can now
      handle multiple queries and nodes cannot be removed till they have
      instances on them anyway. Note that since we return the ssh command, and
      that's executed outside of the ganeti daemon, without any locks held,
      the instance can then be subject to operations while we're connected to
      it, but that was the previous behavior as well.
      
      Reviewed-by: iustinp
      8659b73e
Loading