1. 20 Dec, 2007 3 commits
  2. 19 Dec, 2007 1 commit
    • Iustin Pop's avatar
      Make utils.RunCmd() deal with interleaved stdout/stderr · 9c233417
      Iustin Pop authored
      Currently, RunCmd is written with the assumption that programs will have
      a small stderr output, therefore we read the child's stdout (which can
      be big, so we don't want to block the child) and then the stderr (which
      is small, so it shouldn't block).
      
      However, with the ‘gnt-cluster verify-disks’ command, we ourselves
      generate heavy stderr, therefore we break the ganeti-watcher which runs
      the verify-disks via utils.RunCmd.
      
      This patch turns the RunCmd command into an poll-based one, which means
      any kind of interleaved output by a child on stdout/stderr will be
      handled correctly. Of course, since the output is buffered in memory,
      there are other ways to break RunCmd(). But at least this should fix the
      common case.
      
      Reviewed-by: hansmi
      9c233417
  3. 18 Dec, 2007 3 commits
    • Alexander Schreiber's avatar
      Internal API change for instance console access. · 30989e69
      Alexander Schreiber authored
      Change the internal hypervisor API for GetShellCommandForConsole, we
      now call it with the instance instead of just the instance name.
      
      This is a prep patch for HVM, since HVM needs more than just the instance
      name to determine a way of console access.
      
      (this is a resend due to mail adress tyop)
      
      Reviewed-by: iustinp
      
      30989e69
    • Alexander Schreiber's avatar
      cleanup for hypervisor constants · 2584d4a4
      Alexander Schreiber authored
      Move constant definitions for hypervisor into constants.py
      
      Reviewed-by: ultrotter
      
      2584d4a4
    • Guido Trotter's avatar
      Specify hint as a named argument · 79caa9ed
      Guido Trotter authored
      hint is declared as a named argument for the LogWarning function. Make its
      caller pass it naming it.
      
      Reviewed-by: iustinp
      79caa9ed
  4. 17 Dec, 2007 2 commits
  5. 12 Dec, 2007 6 commits
    • Iustin Pop's avatar
      Handle ^C while trying to acquire the lock · 36c68ff1
      Iustin Pop authored
      When waiting for the lock and pressing ^C, the user will get a backtrace
      as the KeyboardInterrupt exception is not handled. The patch adds a
      simple method of handling it.
      
      Note that this is not about ^C in any other place.
      
      Reviewed-by: schreiberal,imsnah
      36c68ff1
    • Iustin Pop's avatar
      Update the man page for ‘gnt-cluster’ · ed2d1409
      Iustin Pop authored
      This adds some information about the new ‘verify-disks’ command.
      
      Reviewed-by: imsnah
      ed2d1409
    • Iustin Pop's avatar
      Modify ‘ganeti-watcher’ to run verify-disks · d2f311db
      Iustin Pop authored
      This patch modifies the watcher to run the ‘gnt-cluster verify-disks’
      command and to log its output (if any).
      
      Reviewed-by: imsnah
      d2f311db
    • Iustin Pop's avatar
      Add the ‘gnt-cluster verify-disks’ command · f4d4e184
      Iustin Pop authored
      This patch adds the OpVerifyDisks handling in mcpu.py and the
      verify-disks command in the gnt-cluster script, which for every instance
      computed by LUVerifyDisks submits a new OpActivateInstanceDisks request.
      
      Reviewed-by: imsnah
      f4d4e184
    • Iustin Pop's avatar
      Add LUVerifyDisks · 2c95a8d4
      Iustin Pop authored
      This patch adds a new LUVerifyDisks that implements the OpVerifyDisks.
      The algorithm is that by determining not-used logical volumes for
      instances that are supposed to be running, we presume from there that
      the DRBD devices are not online and therefore one should
      ‘activate-disks’ for those instances.
      
      Reviewed-by: imsnah
      2c95a8d4
    • Iustin Pop's avatar
      Add a new OpVerifyDisks opcode · 150e978f
      Iustin Pop authored
      This patch adds the definition of a new opcode that will be used to
      compute the list of instances with not-online disks.
      
      Reviewed-by: imsnah
      150e978f
  6. 11 Dec, 2007 1 commit
    • Iustin Pop's avatar
      Return more data in rpc.call_volume_list · cb2037a2
      Iustin Pop authored
      Currently, the volume_list call returns only the volume size. However,
      it is useful to also have two other things: the 'inactive' state of the
      volume (which might trigger a ‘vgchange -a y’ on the volume group) and
      the online state (which shows if the volume is in use or not).
      
      Since this modifies an RPC call, we also bump the protocol version,
      although the single user of the call didn't care about the dictionary
      values, only about the keys.
      
      Reviewed-by: imsnah
      cb2037a2
  7. 04 Dec, 2007 5 commits
  8. 03 Dec, 2007 4 commits
  9. 30 Nov, 2007 2 commits
    • Alexander Schreiber's avatar
      Remove orphaned closing tag. · 70873231
      Alexander Schreiber authored
      
      Reviewed-by: iustinp
      
      70873231
    • Iustin Pop's avatar
      Fix parsing of drbdsetup show output · c522ea02
      Iustin Pop authored
      This fixes the parsing of integers in the drbdsetup show output with
      newer pyparsing versions.
      
      Basically, the convert-to-int action that we use was taken from the
      example documentation of an older pyparsing version that automatically
      uses only the second element if the result is returned as a tuple, but
      this was deprecated for a while and removed in 1.4.3.
      
      Based on a nice report by Jorge Cabello <jorge@aspl.es>, and
      confirmation about pyparsing behaviour from its author. Thanks!
      
      Reviewed-by: imsnah
      c522ea02
  10. 29 Nov, 2007 2 commits
    • Iustin Pop's avatar
      Replace hardcoded lock dir · 3aecd2c7
      Iustin Pop authored
      This patch replaces the hardcoded ‘/var/lock/’ directory with one based on
      LOCALSTATEDIR.
      
      Reviewed-by: imsnah
      3aecd2c7
    • Iustin Pop's avatar
      Make utils.RunCmd log failures when using debug · f362096f
      Iustin Pop authored
      This patch adds logging of command failures to the debug log in case the
      user either started the command (gnt-*) or the node daemon with the
      debug flag.
      
      Reviewed-by: imsnah
      f362096f
  11. 28 Nov, 2007 2 commits
  12. 27 Nov, 2007 2 commits
    • Iustin Pop's avatar
      Fix logging of some checks in LUClusterVerify · 8522ceeb
      Iustin Pop authored
      Currently, the results of ConfigWriter.VerifyConfig() are lost. Make
      sure we log them too in cluster verify.
      
      Reviewed-by: ultrotter
      8522ceeb
    • Iustin Pop's avatar
      Update install.sgml with the name of the example OS · 5736852e
      Iustin Pop authored
      We want the name of the example OS to be nicer for packagers, so update
      the install documentation accordingly.
      
      Also, put in a notice about using the latest release OS version, so if
      we forget to update this doc, we are not completely wrong.
      
      Reviewed-by: schreiberal
      5736852e
  13. 26 Nov, 2007 6 commits
    • Iustin Pop's avatar
      Revert "Remove extra docdir variable from Makefile.am" · 1d91c392
      Iustin Pop authored
      This reverts commit 397, as the support in autoconf for docdir is
      present since 2.59c, and this is too new for some distributions.
      
      Reviewed-by: imsnah
      1d91c392
    • Iustin Pop's avatar
      Add checking of python modules at ./configure time · 6e06b36c
      Iustin Pop authored
      This patch adds checking for our external python modules at the
      ./configure stage, as it's better to check than rely on documentation.
      
      The patch adds one autoconf macro from the autoconf macro archive
      (http://autoconf-archive.cryp.to)
      
      Reviewed-by: imsnah
      6e06b36c
    • Iustin Pop's avatar
      Drop the Rename method of DRBD8 devices · a70f34d1
      Iustin Pop authored
      Since we now do changes of remote peers in two steps (Attach with no
      network information and then Attach with the new peer's data), we don't
      need this operation anymore.
      
      Reviewed-by: imsnah
      a70f34d1
    • Iustin Pop's avatar
      Split the change of peer in secondary replace in two operations · 642445d9
      Iustin Pop authored
      This patch splits the single operation of replace peer into two distinct
      phases, in order to make a single change to the instance configuration:
        - detach from network
        - if at least one drbd device succeeded, make one change to the
          instance, pointing all disks to the new peer
        - attach to the new peer
      
      This should eliminate the case when a failure in the second reattach can
      leave the instance with two secondaries.
      
      Reviewed-by: imsnah
      642445d9
    • Iustin Pop's avatar
      Relax even more the identification of DRBD8 devices · 9cdbe77f
      Iustin Pop authored
      This patch adds a new success condition for identifying DRBD8 devices:
      if the local device is correct, but the network peer is not, we shutdown
      the network and attach to the correct one (this also handles going to
      standalone mode).
      
      This new check (and its actions) is based on the fact that we don't pass
      incorrect data from the master to the node (otherwise we could start
      syncing with an incorrect peer.
      
      Reviewed-by: imsnah
      9cdbe77f
    • Iustin Pop's avatar
      Add support for DRBD8 devices to work standalone · 52857176
      Iustin Pop authored
      This patch adds a check in _AssembleNet so that if we are passed None
      value in the unique_id, we instead switch to standalone mode.
      
      Reviewed-by: imsnah
      52857176
  14. 22 Nov, 2007 1 commit