Skip to content
Snippets Groups Projects
  1. Feb 10, 2009
  2. Feb 09, 2009
    • Guido Trotter's avatar
      KVM: Add usb mouse type parameter · 11344a50
      Guido Trotter authored
      In some cases 'mouse' may work better than 'tablet', so we'll handle
      both by allowing the user to specify a parameter. By default no mouse is
      used.
      
      Reviewed-by: iustinp
      11344a50
    • Guido Trotter's avatar
      KVM: allow netboot · 8745c3d7
      Guido Trotter authored
      With this patch we allow KVM instances to be booted off the network.
      The only issue is that this is not compatible with virtio nics, so
      we disallow them, when booting from the net.
      
      Reviewed-by: iustinp
      8745c3d7
    • Guido Trotter's avatar
      KVM: actually support different nic types · 37f88dc6
      Guido Trotter authored
      When executing the KVM runtime we load the nic type from the runtime
      hvparams and use it to specify the nic model type. As for the disk we
      translate the DEV_PARAVIRTUAL type to 'virtio'.
      
      Reviewed-by: iustinp
      37f88dc6
    • Guido Trotter's avatar
      KVM: export hvparams in the runtime · c2672466
      Guido Trotter authored
      They'll be used to set the nic type when we execute the runtime, since
      the nics are processed later. We need to save the hvparams because we
      want to use the same one as when we saved the runtime, rather than use
      the current instance ones, to avoid applying only some changed
      parameters when the runtime is loaded.
      
      Reviewed-by: iustinp
      c2672466
    • Guido Trotter's avatar
      KVM: actually support different disk types · 1213604d
      Guido Trotter authored
      By passing the relevant if= value to the disk we support different disk
      types. The only change is that we'll translate "paravirtual" to
      "virtio" to keep only one "paravirtualized" value, around ganeti. The
      if= value is calculated outside the disks loop, as it's the same for all
      disks (as currently ganeti doesn't support per-disk params).
      
      Reviewed-by: iustinp
      1213604d
    • Guido Trotter's avatar
      Xen-HVM: Improve the invalid disk/nic type error · 5155ede7
      Guido Trotter authored
      Copy the message from the KVM one, adding a missing 'the' and a list of
      possible values, to help the user in his decision.
      
      Reviewed-by: iustinp
      5155ede7
    • Guido Trotter's avatar
      KVM: parameters for different disk and nic types · 43440815
      Guido Trotter authored
      - Add a bunch of NICs and DISKs types
      - Specify which one are valid disks and nics for KVM (the new ones
        toghether with some of the old ones)
      - Add the default values (paravirtual)
      - Allow the disk and nic types as parameters and check their validity
      
      Reviewed-by: iustinp
      43440815
    • Guido Trotter's avatar
      Rename the device type constants · d08f6067
      Guido Trotter authored
      These are not HVM specific, so have been given an HT generic name.
      
      Reviewed-by: iustinp
      d08f6067
    • Guido Trotter's avatar
      s/HT_HVM_VNC_BASE_PORT/VNC_BASE_PORT/g · 377d74c9
      Guido Trotter authored
      The VNC base port has nothing to do with HVM itself, and is general to
      VNC itself, so we're removing the HT_HVM prefix to the constant.
      
      Reviewed-by: iustinp
      377d74c9
    • Iustin Pop's avatar
      Add a new instance query flag ‘disk_usage’ · 024e157f
      Iustin Pop authored
      This patch adds a new instance query flag called disk_usage that
      retrieves the overall space used by an instance on each of its nodes.
      This can be used when balancing the cluster or checking N+1 status.
      
      The flag is also exported in RAPI. Note the flag is currently broken for
      file-based instances, as it represents the amount of space in the
      cluster volume group.
      
      Reviewed-by: ultrotter
      024e157f
    • Iustin Pop's avatar
      Uniformize some function names in backend.py · 821d1bd1
      Iustin Pop authored
      Currently, the names of the functions in backend.py that are actually
      RPC procedures and are called from ganeti-noded are not corresponding to
      the RPC names. This makes it hard to actually see which functions are
      exported and which functions are internal to backend.
      
      This patch renames all blockdevice-related functions in backend.py match
      the name of the RPC call (without the ‘call’ or ‘perspective’ prefix).
      This should make it easier to grep for a given function called in
      cmdlib, without having to open and check in ganet-inoded what backend
      function it corresponds to.
      
      The patch also does two minor extra cleanups (rename a variable and
      change a logging level).
      
      Reviewed-by: ultrotter
      821d1bd1
    • Iustin Pop's avatar
      bdev: add and use two utility functions · 82463074
      Iustin Pop authored
      This patch adds two utility functions for raising BlockDeviceError
      exceptions and for running functions while ignoring this error. Most of
      the manual “raise errors.BlockDeviceError” cases are converted to
      _ThrowError, as this makes the code clearer.
      
      We also change most of the DRBD error messages to include the minor
      number because with the parallel execution of commands it's not longer
      possible to identify the failed DRBD just from the timestamp, and the
      minor number can be mapped back to the instance easier.
      
      Reviewed-by: ultrotter
      82463074
    • Iustin Pop's avatar
      rpc.call_blockdev_find: convert to (status, data) · 23829f6f
      Iustin Pop authored
      This patch converts the call_blockdev_find - which searches for block
      devices and returns their status - to the (status, data) format. We also
      modify the backend function name to match the rpc call.
      
      Reviewed-by: ultrotter
      23829f6f
    • Iustin Pop's avatar
      Export the cpu nodes and sockets from Xen · 0105bad3
      Iustin Pop authored
      This is a hand-picked forward patch of commit 1755 on the 1.2 branch
      (hand-picked since the trees diverged too much since then):
      
          The patch changed the xen hypervisor to compute the number of cpu
          sockets/nodes and enables the command line and the RAPI to show this
          information (for RAPI is enabled by default in node details, for gnt-one
          one can use the new “cnodes” and “csockets” fields).
      
          Originally-Reviewed-by: ultrotter
      
      For the KVM and fake hypervisors, the patch just exports 1 for both
      nodes and sockets. This can be fixed, by looking at the
      /sys/devices/system/cpu/cpuN/topology directories, and computing the
      actual information, but that should be done in a separate patch.
      
      Reviewed-by: imsnah
      0105bad3
    • Iustin Pop's avatar
      Fix handling OS errors in AddOSToInstance · 1268d6fd
      Iustin Pop authored
      This patch fixes the error handling in the add OS to instance function
      with regard to invalid OSes. Previously, we didn't handle any such
      errors, with the end result that the user would have to look in the node
      daemon log.
      
      The patch also renames the name of the function to match the RPC call
      name.
      
      Reviewed-by: ultrotter
      1268d6fd
    • Iustin Pop's avatar
      backend.DrbdAttachNet: don't ignore Open() errors · d3da87b8
      Iustin Pop authored
      Currently the return value or errors from the block device Open() method
      are ignored. This patch catches any BlockDeviceErrors and returns a
      well-formatted result.
      
      Reviewed-by: ultrotter
      d3da87b8
    • Iustin Pop's avatar
      cmdlib: simplify some rpc error handling cases · 0959c824
      Iustin Pop authored
      By using the RemoteFailMsg() or the payload field of RpcResult, we can
      simplify a few functions in cmdlib.
      
      Reviewed-by: ultrotter
      0959c824
    • Iustin Pop's avatar
      RpcResult: add a new payload field · f2def43a
      Iustin Pop authored
      For results which use the (status, payload) response type, it's easier
      to define a ‘payload’ field on the result holding the payload than to
      extract it using “data[1]” in the caller code.
      
      Reviewed-by: ultrotter
      f2def43a
    • Iustin Pop's avatar
      LUCreateInstance: only set running flag at the end · 4978db17
      Iustin Pop authored
      In lockless queries, it's better if we see the instance in ADMIN_down
      rather than ERROR_down during the time it's installed. As such, we
      change the LU to only mark the instance 'up' at the time we are ready to
      start it.
      
      Reviewed-by: ultrotter
      4978db17
  3. Feb 07, 2009
    • Guido Trotter's avatar
      KVM: don't boot from a virtio cdrom · 9dd363eb
      Guido Trotter authored
      Apparently it's not supported. Also add -boot command line parameters
      to kvm, since they seem to help booting from the right place. Everything
      will still only work when not using a kernel, but well... :)
      
      Reviewed-by: iustinp
      9dd363eb
    • Guido Trotter's avatar
      KVM: don't boot from cdrom with no cdrom · ec91c05d
      Guido Trotter authored
      Reviewed-by: iustinp
      ec91c05d
    • Guido Trotter's avatar
      Support cdrom image and boot order for KVM · 66d5dbef
      Guido Trotter authored
      The cdrom image has the same meaning than in Xen HVM, and so does
      boot_order, even though it has a slightly different syntax, and uses the
      value 'disk' too boot from disk and 'cdrom' to boot from cdrom.
      
      Reviewed-by: iustinp
      66d5dbef
    • Guido Trotter's avatar
      Get rid of constants.HT_HVM_DEFAULT_BOOT_ORDER · 30948aa6
      Guido Trotter authored
      Confusingly, as a leftober from 1.2, there was a
      constants.HT_HVM_DEFAULT_BOOT_ORDER constant, with a value opposite to
      the default HV_BOOT_ORDER hv param that got enabled only if
      HV_BOOT_ORDER was set to None. Since setting it to None is very
      hard/impossible for the user, and we didn't handle other "empty" values
      (False, ''), we'll just force the parameter to have a valid value (after
      all we have a default, and that's the way we use hvparams) and get rid
      of the old constant altoghether.
      
      Reviewed-by: iustinp
      30948aa6
  4. Feb 06, 2009
    • Iustin Pop's avatar
      QA: switch RAPI to https · 49b1d36e
      Iustin Pop authored
      Since we by default now use SSL for RAPI, we need to switch the QA
      tests to SSL too.
      
      Reviewed-by: amishchenko
      49b1d36e
    • Iustin Pop's avatar
      Fix rapi job listing · ee69c97f
      Iustin Pop authored
      This patch fixes a couple of issues with the job listing:
        - in case of a non-existing job, nicely raise 404 instead of 500
        - in the job detail listing, also list the job log, the job
          timestamps, etc.
        - the opcode migrate instance was missing its description field
      
      Reviewed-by: imsnah
      ee69c97f
  5. Feb 05, 2009
    • Iustin Pop's avatar
      rapi: fix SSL mode and use SSL by default · 2ed6a7d6
      Iustin Pop authored
      This patch fixes the SSL mode (by actually constructing SSL parameters
      from the command line options) and enables SSL by default; the old “-S”
      option which enabled SSL is now changed to “--no-ssl”. The certificate
      and key are by default pointing to the Ganeti auto-generated certificate
      for rapi.
      
      Reviewed-by: imsnah
      2ed6a7d6
    • Iustin Pop's avatar
      Small improvement to the init.d example file · e10a3aea
      Iustin Pop authored
      The start_action function is changed so that it can be called with
      arguments - this could be used to parse a defaults file, etc.
      
      Reviewed-by: imsnah
      e10a3aea
    • Guido Trotter's avatar
      KVM: add VNC TLS and X509 parameters · 8b2d1013
      Guido Trotter authored
      With this parameters VNC for KVM is able to be protected by tls,
      optionally with an x509 certificate, and optionally verifying the
      client as well. Additionally in this patch we limit the bind address to
      being a directory, rather than a file or a directory, for simplicity, as
      it allows for the same level of control anyway.
      
      Reviewed-by: iustinp
      8b2d1013
    • Guido Trotter's avatar
      KVM: allow binding vnc to a file · 8447f52b
      Guido Trotter authored
      Before we forced the VNC_BIND_ADDRESS to be an ip. Now we also accept a
      path, and bind the instance to it, or to a file in it if it's a
      directory.
      
      Reviewed-by: iustinp
      8447f52b
    • Iustin Pop's avatar
      Fix some issues for lockless queries · 2e7b8369
      Iustin Pop authored
      This patch converts some more jobs with only queries into cheaper luxi
      queries (no job created), and fixes some fallout from the lockless
      queries changes.
      
      Reviewed-by: ultrotter
      2e7b8369
    • Iustin Pop's avatar
      Revive RAPI QA tests for 2.0-style RAPI · a5b9d725
      Iustin Pop authored
      This patch fixes the RAPI QA tests to work with today's RAPI code and
      also does some other minor improvements:
        - QA: only create the cluster if so configured (‘create-cluster’ key),
          this allows running parts of the QA suite against existing clusters
        - export the “hvparams” for instances in RAPI
      
      Reviewed-by: imsnah
      a5b9d725
  6. Feb 04, 2009
    • Iustin Pop's avatar
      rapi: fix 'bulk' processing and add locking option · 3d103742
      Iustin Pop authored
      This patch fixes the 'bulk' parameter (before any non-empty
      specification was considered True, in conflict with the documentation,
      i.e. bulk=0 still did bulk queries).
      
      The patch also adds optional locking on the instance/node listing (does
      not have effect when we only list names).
      
      Reviewed-by: imsnah
      3d103742
    • Iustin Pop's avatar
      rapi: cleanup and update to latest 2.0 API · 9031ee8e
      Iustin Pop authored
      This patch cleans up and updates the RAPI interface:
        - queries are changes to luxi queries instead of jobs, where possible
        - since we changed the API version, we remove the old-style attributes
          (sda_size, ip, etc.) and replace them with 2.0 style
        - a small optimization in the instance and node list, don't query
          twice the names in bulk output
        - switch the instance and node lists to no locking
      
      Reviewed-by: imsnah
      9031ee8e
    • Iustin Pop's avatar
      Enable lockless node queries · bc8e4a1a
      Iustin Pop authored
      Similar to the instance list, this patch enables lockless node queris.
      “gnt-node list” accepts now the “--sync” flag which enables locking, the
      default is lockless.
      
      Reviewed-by: imsnah
      bc8e4a1a
    • Iustin Pop's avatar
      rapi: fix authentication and queries · 85414b69
      Iustin Pop authored
      For queries, we don't want to require authentication. We fix this by adding an
      override GetAuthRealm in the rapi daemon.
      
      We also fix a method name.
      
      Reviewed-by: imsnah
      85414b69
Loading