1. 09 Aug, 2011 2 commits
  2. 08 Aug, 2011 1 commit
  3. 29 Jul, 2011 1 commit
  4. 25 Jul, 2011 1 commit
  5. 21 Jul, 2011 1 commit
  6. 15 Jul, 2011 1 commit
  7. 11 Jul, 2011 1 commit
    • Iustin Pop's avatar
      Reverts the patch series about console wrappers · 7238edb5
      Iustin Pop authored
      This reverts commits 030a9cb8 and
      ae082df0
      
      .
      
      There are two problems:
      
      - Makefile.am breakage, which is trivial to revert
      - unittest breakage, which honestly I'm not sure how to fix and how
        serial consoles interact with the unpause helper
      
      After the reset, the startup --paused still works but won't unpause
      the instance automatically (if I understood the code correctly).
      
      Furthermore, the code also fixes a style issue in hv_kvm.py (too long
      line) introduced by the next commit after the above two.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      7238edb5
  8. 08 Jul, 2011 2 commits
  9. 27 Jun, 2011 1 commit
    • Apollon Oikonomopoulos's avatar
      KVM: configure bridged NICs at migration start · cc8a8ed7
      Apollon Oikonomopoulos authored
      Commit 5d9bfd87
      
       moved tap interface handling from KVM to Ganeti, partly
      to also solve the problem of routed interfaces getting configured too
      early during live migrations, causing network anomalies. In that
      direction, configuration of NICs of incoming instances was deferred to
      FinalizeMigration time.
      
      However, this causes minor issues with bridged interfaces; KVM sends out
      an ARP-like packet upon migration finish, which is lost because the tap
      interface is not yet configured. As a consequence, intermediate network
      equipment (i.e. switches) does not get notified about the topology
      change, until the instance transmits another packet after the bridge has
      been configured, or the switch's ARP cache expires.
      
      The proper solution to that is to support different phases in network
      configuration (pre/post migration), which also requires separate ifup
      scripts. Until then we fall back to configuring bridged interfaces on
      incoming instances at migration start, instead of finish.
      Signed-off-by: default avatarApollon Oikonomopoulos <apollon@noc.grnet.gr>
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      cc8a8ed7
  10. 23 Jun, 2011 1 commit
  11. 22 Jun, 2011 1 commit
  12. 10 May, 2011 1 commit
    • Marco Casavecchia's avatar
      Use floppy disk and a second CDROM on KVM · fba7f911
      Marco Casavecchia authored
      
      
      Hi all,
      this patch will add 3 new KVM parameters and a new option.
      
      New Parameters:
       - floppy_image_path = "" -> Specify the floppy image to load as
      floppy disk.
       - cdrom2_image_path = "" -> Specify a second cdrom image to load on
      the system (note: this in not intended to be used as a boot device. To
      boot the system from cdrom you must use the "cdrom_image_path"
      parameter as always).
       - cdrom_disk_type = "" -> it can be one of the kvm supported types as
      "ide,scsi,paravirtual,ecc". I introduced this optional parameter to
      make possible to specify a different virtual device for cdroms. It is
      useful if you want to install a windows system
      
      New option for "boot_device" parameter:
       -  "floppy": with this value you should be able to boot a KVM
      instance from floppy image.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      (cherry picked from commit cc130cc7
      
      )
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      fba7f911
  13. 02 May, 2011 1 commit
    • Marco Casavecchia's avatar
      Use floppy disk and a second CDROM on KVM · cc130cc7
      Marco Casavecchia authored
      
      
      Hi all,
      this patch will add 3 new KVM parameters and a new option.
      
      New Parameters:
       - floppy_image_path = "" -> Specify the floppy image to load as
      floppy disk.
       - cdrom2_image_path = "" -> Specify a second cdrom image to load on
      the system (note: this in not intended to be used as a boot device. To
      boot the system from cdrom you must use the "cdrom_image_path"
      parameter as always).
       - cdrom_disk_type = "" -> it can be one of the kvm supported types as
      "ide,scsi,paravirtual,ecc". I introduced this optional parameter to
      make possible to specify a different virtual device for cdroms. It is
      useful if you want to install a windows system
      
      New option for "boot_device" parameter:
       -  "floppy": with this value you should be able to boot a KVM
      instance from floppy image.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      cc130cc7
  14. 08 Mar, 2011 1 commit
  15. 18 Jan, 2011 3 commits
    • Guido Trotter's avatar
      KVM: don't fail removing non-existing nic path · 7be85163
      Guido Trotter authored
      
      
      This shouldn't normally happen, but if it does no need to fail.
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      7be85163
    • Apollon Oikonomopoulos's avatar
      KVM: Perform network configuration in Ganeti · 5d9bfd87
      Apollon Oikonomopoulos authored
      
      
      This patch introduces network configuration for KVM in Ganeti.
      
      There are three problems with having KVM perform network configuration via ifup
      scripts:
        a) Ganeti never gets to know the tap interface that is associated with an
           instance's NIC
        b) Migration of routed instances will cause network problems because the
           incoming KVM side configures the network as soon as it is spawned and not
           as soon as the migration finishes. This means that all routing
           configuration will be present in both, primary and secondary, nodes at the
           same time, possibly causing network disruption during the migration.
        c) We never get to know if the network configuration succeeded or not.
      
      This patch moves network configuration from KVM to Ganeti, using KVM's ability
      to receive already open tap devices as file descriptors.
      
      _WriteNetScript is removed from hv_kvm.py, together with its unit tests.
      
      Minor modifications are made to _ExecKVMRuntime to handle tap device
      initialization. NIC <-> tap associations are stored under a new directory,
      _ROOT_DIR/nic in a file-per-nic fashion.
      
      The end-user semantics remain the same: The user can override the network
      configuration by providing _KVM_NET_SCRIPT. If this is not present or
      executable, the default constants.KVM_IFUP script is run.
      Signed-off-by: default avatarApollon Oikonomopoulos <apollon@noc.grnet.gr>
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      5d9bfd87
    • Apollon Oikonomopoulos's avatar
      KVM: Add auxiliary functions to handle tap devices · 199b2053
      Apollon Oikonomopoulos authored
      
      
      Add two new functions, _OpenTap and _ProbeTapVnetHdr, to
      hypervisors.hv_kvm.
      
      _ProbeTapVnetHdr checks if the host kernel supports the virtio net header
      (IFF_VNET_HDR) feature. This feature allows KVM to ask the the host kernel to
      perform checksumming and segmentation offload of the data passing through a
      guest's virtio NIC, using a special header[1] prepended to data sent through
      the tap interface. A qemu-kvm version later than 0.12 is required for this
      feature to work.
      
      _OpenTap opens a new tap device suitable for use with qemu-kvm's "-net
      tap,fd=n" option. It also enables vnet_hdr support if requested and safe to do
      so.
      
      [1] struct virtio_net_hdr in include/linux/virtio_net.h
      Signed-off-by: default avatarApollon Oikonomopoulos <apollon@noc.grnet.gr>
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      199b2053
  16. 07 Jan, 2011 1 commit
  17. 06 Dec, 2010 1 commit
  18. 03 Dec, 2010 2 commits
  19. 05 Oct, 2010 2 commits
  20. 04 Oct, 2010 1 commit
  21. 20 Sep, 2010 1 commit
  22. 18 Aug, 2010 1 commit
    • Manuel Franceschini's avatar
      Introduce new IPAddress classes · 8b312c1d
      Manuel Franceschini authored
      
      
      This patch unifies the netutils functions dealing with IP addresses to
      three classes:
      - IPAddress: Common IP address functionality
      - IPv4Address: IPv4 specific functionality
      - IPv6address: IPv6-specific functionality
      
      Furthermore it adds methods to check whether an address is a loopback
      address, replacing the .startswith("127") for IPv4 and adding IPv6
      support.
      
      It also provides the basis for future IPv6 address handling. Methods to
      convert IP strings to their corresponding interger values will allow to
      canonicalize IPv6 addresses.
      Signed-off-by: default avatarManuel Franceschini <livewire@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      8b312c1d
  23. 17 Aug, 2010 2 commits
  24. 23 Jul, 2010 1 commit
  25. 16 Jul, 2010 1 commit
    • Iustin Pop's avatar
      Add a migration type global hypervisor parameter · e71b9ef4
      Iustin Pop authored
      
      
      Since migration live/non-live is more stable (e.g.) for Xen-PVM versus
      Xen-HVM, we introduce a new parameter for what mode we should use by
      default (if not overridden by the user, in the opcode).
      
      The meaning of the opcode 'live' field changes from boolean to either
      None (use the hypervisor default), or one of the allowed migration
      string constants. The live parameter of the TLMigrateInstance is still a
      boolean, computed from the opcode field (which is no longer passed to
      the TL).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      e71b9ef4
  26. 15 Jul, 2010 1 commit
  27. 09 Jul, 2010 1 commit
  28. 30 Jun, 2010 2 commits
  29. 04 Jun, 2010 2 commits
    • Guido Trotter's avatar
      _ExecuteKVMRuntime: fix hv parameter fun · 297e6e53
      Guido Trotter authored
      
      
      When executing the kvm runtime we were currently accessing a mix of the
      parameters as configured currently on the instance and the ones it was
      started with. We were doing it without a precise criteria, but quite by
      chance we got it *almost* right. The only remaining issue was that when
      ganeti was upgraded and some parameters were added, trying to access
      them from the "old" ones caused a keyerror, since they weren't present
      back when the instance was started.
      
      To fix this:
        - We fill the startup-time dict with any new parameter
        - We provide a clear guideline on which version of the parameters to
          access, and about the fact that new parameters must have an
          instance-migration backwards compatible default
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      297e6e53
    • Guido Trotter's avatar
      Update FinalizeMigration docstring · fea922fa
      Guido Trotter authored
      
      
      This is used not only for aborted migrations, so the docstring should
      reflect that.
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      fea922fa
  30. 01 Jun, 2010 1 commit
    • Balazs Lecz's avatar
      Add KVM chroot feature · 547a63b7
      Balazs Lecz authored
      This patch adds a new boolean hypervisor parameter to the KVM hypervisor,
      named 'use_chroot'.
      If it's turned on for an instance, than KVM is started in "chroot mode":
      Ganeti creates an empty directory for the instance and passes the path
      of this dir to KVM via the -chroot flag.
      KVM changes its root to this directory after starting up.
      
      It also adds a "quarantine" feature for moving any unexpected files to
      a separate directory for later analysis.
      
      This has been backported from master,
      commit 84c08e4e
      
      Signed-off-by: default avatarBalazs Lecz <leczb@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      547a63b7
  31. 31 May, 2010 1 commit
    • Apollon Oikonomopoulos's avatar
      KVM: Migration bandwidth and downtime control · e43d4f9f
      Apollon Oikonomopoulos authored
      
      
      Introduce 2 new hypervisor options, migration_bandwidth and migration_downtime
      and implement KVM migration bandwidth and downtime control.
      
      migration_bandwidth controls KVM's maximal bandwidth during migration, in
      MiB/s. Default value is 32 MiB/s, same as KVM's internal default. This option
      is a global hypervisor option.
      
      migration_downtime sets the amount of time (in ms) a KVM instance is allowed to
      freeze while copying memory pages. This is useful when migrating busy guests,
      as KVM's internal default of 30ms is too low for the page-copying algorithm to
      converge. This is a per-instance option, with a default of 30ms, same as KVM's
      internal default.
      Signed-off-by: default avatarApollon Oikonomopoulos <apollon@noc.grnet.gr>
      Signed-off-by: default avatarBalazs Lecz <leczb@google.com>
      Reviewed-by: default avatarBalazs Lecz <leczb@google.com>
      e43d4f9f