1. 15 Apr, 2014 3 commits
  2. 08 Apr, 2014 1 commit
    • Apollon Oikonomopoulos's avatar
      QMP: always return the command result · 24d3d8da
      Apollon Oikonomopoulos authored
      
      
      According to the QEMU Machine Protocol Specification, the messages sent
      by QMP as a response to a command can be of two types: either an error
      message (identified by the "error" key), or a success message
      (identified by the "return" key).
      
      Since we explicitly handle errors by raising a HypervisorError, there is
      no reason to return the whole response message; instead we return only
      the response part, which is the dual behavior of accepting commands from
      the callers without the surrounding {"execute": ...} object.
      
      We also unexport the RETURN_KEY constant, which is now only used
      internally.
      Signed-off-by: default avatarApollon Oikonomopoulos <apoikos@gmail.com>
      Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
      Reviewed-by: default avatarThomas Thrainer <thomasth@google.com>
      24d3d8da
  3. 07 Apr, 2014 3 commits
  4. 01 Apr, 2014 2 commits
    • Apollon Oikonomopoulos's avatar
      KVM: use running HVPs to calc blockdev options · 918baead
      Apollon Oikonomopoulos authored
      Commit 0fe22ad2
      
       moved the call to _GenerateKVMBlockDevicesOptions() from
      _GenerateKVMRuntime() to _ExecuteKvmRuntime. However, while in
      _GenerateKVMRuntime() there is only one set of HVPs, those of the
      instance's configuration, in _ExecuteKVMRuntime there are two sets of
      HVPs:
      
        - The instance's configured HVPs
        - The HVPs the instance used when it was started
      
      Currently, _GenerateKVMBlockDevicesOptions() uses the first set of HVPs
      only, meaning that it will always read the configured HVPs. Since
      _ExecuteKVMRuntime() is also called at migration time, it should use the
      instance's running HVPs, otherwise migration while fail.
      
      The following scenario will lead to a crash on migration:
      
       1. Start the instance (assuming 'paravirtual' disk_type)
       2. gnt-instance modify -H disk_type=scsi <instance_name>
       3. gnt-instance migrate <instance_name>
      
      Step 3 will start the instance on the remote node with all disks
      configured as 'scsi' and qemu will crash post-migration.
      
      We fix this by making sure _GenerateKVMBlockDevicesOptions gets the
      running HVPs as well.
      Signed-off-by: default avatarApollon Oikonomopoulos <apoikos@gmail.com>
      Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
      Reviewed-by: default avatarThomas Thrainer <thomasth@google.com>
      918baead
    • Apollon Oikonomopoulos's avatar
      KVM: reserve a PCI slot for the SCSI controller · 5e6d16ab
      Apollon Oikonomopoulos authored
      
      
      Currently instances with disk_type=scsi are broken, because the SCSI
      controller uses a PCI slot not accounted for in the PCI assignment
      logic. We reserve a throw-away slot just for that.
      
      This is a temporary workaround and will be reverted during the upcoming
      refactoring.
      Signed-off-by: default avatarApollon Oikonomopoulos <apoikos@gmail.com>
      Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
      Reviewed-by: default avatarThomas Thrainer <thomasth@google.com>
      5e6d16ab
  5. 26 Mar, 2014 1 commit
  6. 24 Mar, 2014 1 commit
    • Dimitris Aragiorgis's avatar
      kvm: Add migration capabilities as an hvparam · 937ff984
      Dimitris Aragiorgis authored
      
      
      Latest QEMU versions support various migration capabilities. Each
      can be enabled/disabled with 'migrate_set_capability' monitor
      command.
      
      Version 1.7.0 defines x-rdma-pin-all, auto-converge, zero-blocks,
      and xbzrle migration capabilities.
      
      Since migration capabilities are more than one, and because hvparams
      accept only strings/integers and not dicts we decide to provide
      the capabilities that should be on via a ":" separated string.
      
      In other words one can use the following to enable xbzrle and
      auto-converge:
      
      -H kvm:migration_caps=xbzrle:auto-converge
      
      IMPORTANT: xbzrle may result to BSOD for instances running
      Windows 2008r8 on drbd.
      
      Update man page of gnt-instance to include the new hvparam.
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
      Reviewed-by: default avatarThomas Thrainer <thomasth@google.com>
      937ff984
  7. 17 Mar, 2014 2 commits
    • Dimitris Aragiorgis's avatar
      Fix conflict between virtio + spice or soundhw · 3a72e34a
      Dimitris Aragiorgis authored
      With regard to PCI slot occupied by a KVM instance we have
      observed the following:
      
      1) Slot 0 will always be Host bridge.
      2) Slot 1 will always be ISA bridge.
      3) Slot 2 will always be VGA controller (even with -display none).
      4) If soundhw=hda|ac97|es1370 an extra PCI slot is occupied.
         This slot *MUST* be the No. 3.
      
      5) Option '-balloon virtio' gets an extra PCI slot.
         Still it can take id, bus, and addr args and be placed anywhere
      
      6) If spice is used instead of vnc we have:
         * No extra PCI slot gets occupied without vdagent
         * Otherwise we have the following extra optionsa [1]
           a) -device virtio-serial-pci
              (this can take id, bus, and addr args too)
           b) -device virtserialport,chardev=spicechannel0,...
           c) -chardev spicevmc,id=spicechannel0
      
      This patch does the following:
      
      1) Change _DEFAULT_PCI_RESERVATIONS to "1110...."
      2) Move soundhw option early in the command line and if hda etc.
         reserve slot 3.
      3) Add id, bus, and addr in balloon option and reserve next slot.
      4) Add id, bus, and addr in -device virtio-serial-pci option and if
         passed reserve next slot.
      
      [1] http://www.linux-kvm.org/page/SPICE
      
      
      
      Fixes issue 757.
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      Reviewed-by: default avatarJose A. Lopes <jabolopes@google.com>
      3a72e34a
    • Dimitris Aragiorgis's avatar
      Fix bitarray ops wrt PCI slots · d13fb3f1
      Dimitris Aragiorgis authored
      
      
      Introduce new method `_GetFreeSlot()` responsible only for bitarray
      operations. It fixes search in case of bitarray is either '0000..'
      or '1111..'.
      
      Use it instead of `_UpdatePCISlots()` and in `_GetFreePCISlot()`.
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      Reviewed-by: default avatarJose A. Lopes <jabolopes@google.com>
      d13fb3f1
  8. 07 Mar, 2014 2 commits
  9. 06 Feb, 2014 5 commits
  10. 04 Feb, 2014 1 commit
  11. 17 Jan, 2014 3 commits
  12. 13 Jan, 2014 3 commits
  13. 09 Jan, 2014 1 commit
    • Michele Tartara's avatar
      Improve backwards compatibility of Issue 649 fix · 02a6b50a
      Michele Tartara authored
      Commit e6e4ff4c
      
       fixed Issue 649 by switching the
      separator for usb_devices from comma to space. That solved the problem with
      the command line, but RAPI was able to work with commas too, so, for backwards
      compatibility we need to keep supporting that as well.
      
      Also, in order to avoid changing the format of the config file, the default
      internal representation is brought back to being comma-based, and it is changed
      at the interface level (CLI or RAPI) before being passed on.
      Signed-off-by: default avatarMichele Tartara <mtartara@google.com>
      Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
      02a6b50a
  14. 07 Jan, 2014 1 commit
  15. 02 Dec, 2013 1 commit
    • Dimitris Aragiorgis's avatar
      Introduce _UpgradeSerializedRuntime() method · e8cbe174
      Dimitris Aragiorgis authored
      This method is invoked during _AnalizeSerializedRuntime() and is
      meant to modify runtime files in the way cfgupgrade does for
      config.data.  This could remove deprecated fields, change the
      format of the file, add/remove sections, etc.
      
      There is a possibility data included inside runtime
      files to cause migration failures after a Ganeti upgrade.
      Use this method to avoid such cases.
      
      Commit cc6fd3da
      
       exports NICs' UUIDs to configuration scripts.
      It assumes UUIDs as an non optional slot in NIC object.
      This is true for latest Ganeti versions. Still there might
      be instances created back in Ganeti 2.7 missing that slot.
      
      Ganeti 2.10 supports hot-plugging of devices. A prerequisite
      for this feature was to change the format of runtime files and
      add another entry containing block devices. This was done in
      _AnalizeSerializedRuntime(). Move this logic in the new method.
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
      Reviewed-by: default avatarThomas Thrainer <thomasth@google.com>
      e8cbe174
  16. 27 Nov, 2013 1 commit
  17. 26 Nov, 2013 1 commit
  18. 25 Nov, 2013 2 commits
  19. 21 Nov, 2013 1 commit
    • Dimitris Aragiorgis's avatar
      Introduce --hotplug-if-possible option · 96ed3a3e
      Dimitris Aragiorgis authored
      
      
      This will be useful for an external entity using RAPI that
      wants to modify devices of instances.
      
      The common use case for that is:
      "I want to add a NIC/disk to an instance. If it is running
      then try to hotplug the device. If not, then just add it to config."
      
      Another use case is that if we are unaware of the instance's
      hypervisor: "I want do add a NIC/disk to an instance and if
      its hypervisor is KVM try to hotplug it."
      
      For all those cases just print a warning in CheckPrereq() and
      disable any further hotplug related actions (and let
      modifications take place after reboot).
      
      Add NoHoplugSupport and HotplugIfPossible unittests an modify
      existing by explicitly creating successful RPC results for
      call_hotplug_supported.
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
      Reviewed-by: default avatarThomas Thrainer <thomasth@google.com>
      96ed3a3e
  20. 14 Nov, 2013 3 commits
  21. 31 Oct, 2013 1 commit
  22. 24 Oct, 2013 1 commit