1. 16 Jun, 2009 1 commit
  2. 15 Jun, 2009 1 commit
  3. 27 May, 2009 1 commit
    • Iustin Pop's avatar
      Add a node powercycle command · f5118ade
      Iustin Pop authored
      This (somewhat big) patch adds support for remotely rebooting the nodes
      via whatever support the hypervisor has for such a concept.
      For KVM/fake (and containers in the future) this just uses sysrq plus a
      ‘reboot’ call if the sysrq method failed. For Xen, it first tries the
      above, and then Xen-hypervisor reboot (we first try sysrq since that
      just requires opening a file handle, whereas xen reboot means launching
      an external utility).
      The user interface is:
          # gnt-node powercycle node5
          Are you sure you want to hard powercycle node node5?
          y/[n]/?: y
          Reboot scheduled in 5 seconds
      The node reboots hopefully after sending the reply. In case the clock is
      broken, “time.sleep(5)” might take ages (but then I suspect SSL
      negotiation wouldn't work).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
  4. 22 May, 2009 3 commits
  5. 19 May, 2009 2 commits
    • Iustin Pop's avatar
      Move to data-based hvparam checks instead of code · 205ab586
      Iustin Pop authored
      Currently the hypervisor parameters are checked using hard-coded snippets in
      each hypervisor. However, most parameter checks fall into three cases:
        - file check
        - directory check
        - string value in a set
      And the remaining ones are checked using simple functions.
      This patch moves to a declarative-style for these parameter checks; in
      hv_base we add the necessary infrastructure for these checks, and the
      above common cases.
      This translates into complete removal of the Check/Verify functions for
      the Xen hypervisors, and a drastic reduction for the KVM one (which has
      inter-parameter dependencies and thus can't use a simple table).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
    • Iustin Pop's avatar
      Move more hypervisor strings into constants · 835528af
      Iustin Pop authored
      This patch adds constants for the mouse and boot order strings; while
      there are still some issues remaining, we're trying to cleanup hardcoded
      strings from the hypervisors.
      Since the formatting of frozensets is currently wrong, we also add an
      utility function for this and change all the error messages to use it.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
  6. 12 May, 2009 2 commits
  7. 05 May, 2009 1 commit
  8. 12 Mar, 2009 1 commit
    • Guido Trotter's avatar
      kvm: use the correct vnc bind address · 19498d6c
      Guido Trotter authored
      There is a bug in kvm, when binding vnc to a specific address the
      constant 'vnc_bind_address' is passed in, instead of the actual
      requested address. This patch fixes it.
      Reviewed-by: iustinp
  9. 27 Feb, 2009 1 commit
    • Guido Trotter's avatar
      Use EnsureDirs in KVM as well. · 9afb67fe
      Guido Trotter authored
      The KVM hypervisor has also code to ensure a list of directories exist.
      Substitute it with our new utils function.
      Reviewed-by: iustinp
  10. 24 Feb, 2009 2 commits
    • Iustin Pop's avatar
      Remove the extra_args parameter in instance start · 07813a9e
      Iustin Pop authored
      This patch removes the extra_args parameter and instead switches the
      instance to the HV_KERNEL_ARGS hypervisor option.
      This is a big change, but it's a needed cleanup, this extra parameter on
      all RPC calls is not generic and we also need to have a persistent value
      Reviewed-by: imsnah
    • Iustin Pop's avatar
      Simplify a little the hypervisor routines · a985b417
      Iustin Pop authored
      Instead of “instance.hvparams”, we use a shorter “hvp” name to make readability
      Reviewed-by: imsnah
  11. 10 Feb, 2009 2 commits
  12. 09 Feb, 2009 8 commits
    • 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
      Reviewed-by: iustinp
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
  13. 07 Feb, 2009 3 commits
  14. 05 Feb, 2009 2 commits
    • 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
    • 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
      Reviewed-by: iustinp
  15. 03 Feb, 2009 1 commit
    • Guido Trotter's avatar
      KVM: Make GetAllInstancesInfo concurrency-safe · 00ad5362
      Guido Trotter authored
      Or actually more so. If this function gets called while instances get
      shut down, it might try to report information on instances which don't
      exits. Try to fail gracefully if that happens, by just skipping an
      instance which has disappeared in the meantime.
      Reviewed-by: iustinp
  16. 29 Jan, 2009 6 commits
  17. 28 Jan, 2009 1 commit
  18. 27 Jan, 2009 2 commits
    • Guido Trotter's avatar
      KVM and Xen: add the HV_ROOT_PATH parameter · 074ca009
      Guido Trotter authored
      This parameter allows a different path to be passed to the instance
      kernel. The new parameter is mandatory, and by default has the value of
      the old hardcoded value for both kvm and xen.
      Beta1 clusters will need to have this parameter added for their
      instances to be able to boot.
      Reviewed-by: iustinp
    • Guido Trotter's avatar
      KVM: implement GetShellCommandForConsole · 637ce7f9
      Guido Trotter authored
      This is a class method, because it calls _InstanceSerial, which is
      another class method. The patch changes it to classmethod for all the
      hypervisor classes.
      Reviewed-by: iustinp