1. 24 Oct, 2008 4 commits
    • Iustin Pop's avatar
      Some documentation updates · b1206984
      Iustin Pop authored
      This fixes a few doc issues and converts a few docstrings to epydoc.
      
      Reviewed-by: imsnah
      b1206984
    • Iustin Pop's avatar
      Modify utils.RunCmd to write output to file · 36117c2b
      Iustin Pop authored
      Currently we launch processes via the shell in a few places only to
      redirect standard output and error to a log file ("&> $file"). It is
      better to do such redirection from within RunCmd itself.
      
      This patch splits RunCmd in two parts, the setup and the execution part,
      the latter being implemented in two different functions depending on
      whether we write to a file or not.
      
      We also update the unittests with this new case.
      
      Reviewed-by: imsnah
      36117c2b
    • Michael Hanselmann's avatar
      ganeti.http: Implement SSL certificates · f2a6fc9e
      Michael Hanselmann authored
      Reviewed-by: killerfoxi
      f2a6fc9e
    • Michael Hanselmann's avatar
      Document HttpServer.__init__ · 23e46494
      Michael Hanselmann authored
      At the same time, simplify the interface a bit by not using a tuple.
      
      Reviewed-by: killerfoxi, ultrotter
      23e46494
  2. 23 Oct, 2008 9 commits
  3. 22 Oct, 2008 7 commits
    • Oleksiy Mishchenko's avatar
      RAPI: Export beparams as dict. The patch also enables LUQueryInstances to... · 1a05d855
      Oleksiy Mishchenko authored
      RAPI: Export beparams as dict. The patch also enables LUQueryInstances to accept beparams as valid field.
      
      Reviewed-by: iustinp
      
      1a05d855
    • Oleksiy Mishchenko's avatar
      RAPI: Forgoten in r1923 instance add change. · 212fa3a7
      Oleksiy Mishchenko authored
      Reviewed-by: iustinp
      212fa3a7
    • Guido Trotter's avatar
      LUCreateInstance: import multiple disks · 09acf207
      Guido Trotter authored
      Previously we used to handle only one disk. Now we'll import all the
      ones present in the export, in order, on the instance's disks. Any disk
      which was present on the original instance but wasn't exported is just
      skipped in the target instance.
      
      Reviewed-by: iustinp
      09acf207
    • 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
    • Guido Trotter's avatar
      Convert ExportSnapshot to OS API 10 · 0607699d
      Guido Trotter authored
      We pass the data via the environment rather than on the command line, as
      API 10 says. All the rest remains the same, and we export just one disk,
      as the master calls this function for every snapshotted disk.
      
      Reviewed-by: iustinp
      0607699d
    • Guido Trotter's avatar
      LUExportInstance: snapshot all disks · 19d7f90a
      Guido Trotter authored
      Rather than just snapshotting the "sda" disk, we'll snapshot all of the
      instance disks. If we can't snapshot a disk for any reason we'll log an
      error and proceed anyway: in this case the resulting export will miss a
      disk. This also changes all the warning messages to self.LogWarning().
      
      Reviewed-by: iustinp
      19d7f90a
    • Guido Trotter's avatar
      Convert SnapshotBlockDevice's docstring to epydoc · e9e9263d
      Guido Trotter authored
      Reviewed-by: iustinp
      e9e9263d
  4. 21 Oct, 2008 4 commits
    • Oleksiy Mishchenko's avatar
      Pass request headers in to RAPI handlers. · 7a8f64da
      Oleksiy Mishchenko authored
      Reviewed-by: iustinp
      7a8f64da
    • Iustin Pop's avatar
      Move some LU logging to use proc.Log* · 86d9d3bb
      Iustin Pop authored
      We change some messages which are obviously intended for the user to use
      the proc.Log* functions instead of (only) the logging ones.
      
      We also fix some wrong uses of feedback_fn.
      
      Reviewed-by: imsnah
      86d9d3bb
    • Iustin Pop's avatar
      Improve the mcpu.Processor logging routines · c0088fb9
      Iustin Pop authored
      As discussed previously, many of the routinges in cmdlib.py are using
      logging functions as a carry-over from 1.2 (when these also showed the
      message on stderr/to the user), instead of actually warning the user.
      
      This patch extends the syntax for Processor.LogInfo/LogWarning in order
      to be easier to use them.
      
      Reviewed-by: imsnah
      c0088fb9
    • Iustin Pop's avatar
      Fix whitespace-at-EOL · 16653425
      Iustin Pop authored
      Please configure your editors to strip it, or enable your git hooks...
      
      Reviewed-by: ultrotter
      16653425
  5. 20 Oct, 2008 16 commits
    • Iustin Pop's avatar
      Generalize the reading of test file data · 149a5439
      Iustin Pop authored
      Currently we have two methods in ganeti.bdev_unittest.py of computing
      the test data file name - and, of course, they don't give the same
      results.
      
      The patch moves the functions to compute the test file name and reading
      of its contents to the GanetiTestCase class in testutils, which allows
      running the tests from the command line as well.
      
      We also change assertFileContent to use utils.ReadFile.
      
      Reviewed-by: imsnah
      149a5439
    • Alexander Schreiber's avatar
      Set default hypervisor at cluster init · 02691904
      Alexander Schreiber authored
      During cluster init, set the default hypervisor to be used for instances.
      Ensure that the default hypervisor belongs to the set enabled hypervisors
      for this cluster. Also fix a small bug with setting the default enabled
      hypervisor list.
      
      Reviewed-by: imsnah
      
      02691904
    • 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
      Convert rpc.call_upload_file to use addresses · 6b294c53
      Iustin Pop authored
      This patch allows rpc.call_upload_file to use addresses (if passed), and
      also converts the ConfigWriter._DistributeConfig to pass them, since
      this is an often-done operation.
      
      Reviewed-by: imsnah
      6b294c53
    • Iustin Pop's avatar
      Convert non-static rpc calls to use addresses · 25348212
      Iustin Pop authored
      This patch converts all non-staticmethods rpc calls to pass addresses to
      the Client calls.
      
      This is done via two new small helpers. These functions also deal with
      nodes that are not (yet) in the configuration file, and pass None for
      the address instead (which allow NodeControllers to do resolving).
      
      Reviewed-by: imsnah
      25348212
    • Iustin Pop's avatar
      Add infrastructure for using addresses in rpc.py · bdf7d8c0
      Iustin Pop authored
      The patch adds support for passing node addresses to NodeController
      objects, which should speed up the connect sequence.
      
      The patch also adds another very small optimization of computing the
      content-length header value in the parent Client class instead of each
      NodeController.
      
      Reviewed-by: imsnah
      bdf7d8c0
    • Iustin Pop's avatar
      Improve conformance with the style guide for rpc.py · 3ef3c771
      Iustin Pop authored
      This patch renames some internal function to camel case, for compliance
      with the style guide.
      
      It also fixes the module docstring (how old was that?).
      
      Reviewed-by: imsnah
      3ef3c771
    • Guido Trotter's avatar
      Use constants.VALUE_AUTO for ip comparison too · 6fde8221
      Guido Trotter authored
      Forward-port-of: r1889, Reviewed-by: imsnah
      
      Reviewed-by: imsnah
      6fde8221
    • Guido Trotter's avatar
      Document mac option for gnt-backup import · 8cd7cb4c
      Guido Trotter authored
      Forward-port-of: (r1888, r1891), Reviewed-by: (iustinp, imsnah)
      
      Reviewed-by: imsnah
      8cd7cb4c
    • Guido Trotter's avatar
      LUCreateInstance: reuse mac address on import · bc89efc3
      Guido Trotter authored
      When importing an instance with the same name as the exported one if the
      mac address is "auto" we try to reuse the previous mac address. One can
      still force generation of a new one with mac="generate".
      
      Forward-port-of: r1887, Reviewed-by: iustinp
      
      Reviewed-by: imsnah
      bc89efc3
    • Guido Trotter's avatar
      LUCreateInstance: accept mac = VALUE_GENERATE · c78995f0
      Guido Trotter authored
      VALUE_GENERATE is handled exactly the same as VALUE_AUTO and the mac
      address is generated randomly.
      
      Forward-port-of: r1886, Reviewed-by: iustinp
      
      Reviewed-by: imsnah
      c78995f0
    • Guido Trotter's avatar
      Add mac option to gnt-backup import · 3c8886a9
      Guido Trotter authored
      Before 'auto' was the only allowed possibility
      
      Forward-port-of: r1885, Reviewed-by: iustinp
      
      Reviewed-by: imsnah
      3c8886a9
    • Guido Trotter's avatar
      Add VALUE_AUTO and VALUE_GENERATE constants · 4c566ede
      Guido Trotter authored
      'auto' is used in multiple place in the code with a meaning similar to
      'default', 'generate' will be used to force generation of mac addresses
      when the default would be to reuse an old one.
      
      Forward-port-of: r1884, Reviewed-by: iustinp
      
      Reviewed-by: imsnah
      4c566ede
    • 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
    • Iustin Pop's avatar
      Convert http.py to use the logging module · 263ab7cf
      Iustin Pop authored
      Reviewed-by: imsnah
      263ab7cf
    • Iustin Pop's avatar
      Convert cmdlib.py to use the logging module · 9a4f63d1
      Iustin Pop authored
      Note that many uses of logger.Error were used in 1.2 for their
      side-effect of logging to stderr, where the user will see the messages,
      and not for having the entry in the log. As such, we need to go over and
      review every use of logging.* and decide if it should use feedback_fn
      instead of being a logging call.
      
      Reviewed-by: imsnah
      9a4f63d1