Skip to content
Snippets Groups Projects
  1. Oct 25, 2012
  2. Oct 16, 2012
  3. Aug 30, 2012
  4. Aug 22, 2012
    • Dimitris Aragiorgis's avatar
      Hotplug: client support · 50fab955
      Dimitris Aragiorgis authored
      
      Add --hotplug option.
      Only used by OpInstanceCreate()/OpInstanceSetParams.
      
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      50fab955
    • Dimitris Aragiorgis's avatar
      Hotplug: cmdlib support · 9ac60360
      Dimitris Aragiorgis authored
      
      Hotplugging is done by functions invoked by ApplyContainerMods().  In
      order hotplugging to take place a --hotplug option must be passed.
      Hotplug can enabled for a VM if --hotplug is passed during
      gnt-instance add (hotplug_info will be added).
      
      In order initial devices of a VM to be hotpluggable hotplug_info must be
      early available. So _GetPCIInfo() gets either lu.hotplug_info in case of
      LUInstanceCreate() or invokes lu.cfg.GetPCIInfo() in case of
      LUInstanceSetParams(). To return a pci slot into the pool
      lu.cfg.UpdatePCIInfo() must be invoked.
      
      If no --hotplug is passed during gnt-instance modify --net add the nic
      won't get a pci value and will be placed automaticaly in a free pci slot
      after reboot. This means that is not going to be hotpluggable for the
      rest of the instance's life.
      
      To keep pci pool consistent we do not let a device that has been
      hotplugged (i.e. has pci value) to be removed without --hotplug.
      
      Before hotplugging a Disk it must be assembled. During
      LuInstanceSetParams() newly created disks are not added to the instance
      so _ExpandCheckDisks() in _AssembleInstanceDisks() will fail. So we make
      this check optional only for this case.
      
      In order to remove a disk (with blockdev_remove) it must be shutdown. So
      after unplugging the disk _ShutdownDiskInstanceDisks() must be invoked.
      
      Everything else is just like nic hotplugging.
      
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      9ac60360
    • Dimitris Aragiorgis's avatar
      Hoplug: rpc support · 5ed75b63
      Dimitris Aragiorgis authored
      
      Introduce new RPCs that eventually invoke hypervisor specific
      hotplug functions.
      
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      5ed75b63
    • Dimitris Aragiorgis's avatar
      Hotplug: KVM support · 1642a1d0
      Dimitris Aragiorgis authored
      
      KVM >= 1.0 is needed.
      
      Introduce new methods: HotAddNic/HotDelNic
      
      Both qemu monitor interface for hotplugging. If a device has
      hotplug info (idx, pci) then:
       - it gets named after it (e.g. virtio-net-pci.%d % idx ).
       - it gets placed to the pci slot (hex(pci)) of bus 0.
      If no hotplug info exist or kvm version is old then no hotplug takes
      place and modifications will take place after reboot:
       - devices will get traditionaly named
       - and placed automaticaly in empty pci slots
      
      NIC hotplug:
       - open a tap and get its file descriptor.
       - pass fd with SCM rights (using python-fdsend) via monitor socket
       - create netdev and device with proper qemu interface
      
      Disk hotplug:
       - create drive with drive%d % idx name
       - create device virtio-blk-pci.%d % idx
      
      In order to migrate a VM that has devices hotplugged, an identical
      VM should be booted with -incoming. To this end every time a hotplug
      takes place runtime file must be updated.
      
      For disk hotplug support we removeds disk from kvm_cmd in
      runtime file add added them separately just like nics. So code building
      disk related options has been moved out from _GenerateKVMRuntime()
      and added to _ExecuteKVMRuntime().
      
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      1642a1d0
    • Dimitris Aragiorgis's avatar
      Hoplug: objects modifications/additions · 41a1df34
      Dimitris Aragiorgis authored
      
      Introduce new HotplugInfo object as part of Instance object.
      
      hotplug_info { 'nics': 0, 'disks': 0, 'pci_pool': [16, 17, 18] }
      
      nics/disks is an index used for device identification and naming.
      Everytime a new device (disk/nic) is hotadded these values get incremented.
      
      pci_pool is a list of pci slots where a device can be placed. Every
      time a device gets hot-plugged/unplugged a pci slot gets popped/appended.
      
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      41a1df34
    • Constantinos Venetsanopoulos's avatar
      Fix computation of disk sizes in _ComputeDiskSize · 6a3166cb
      Constantinos Venetsanopoulos authored
      
      Currently, hail fails with FailDisk when trying to add an instance
      of type: 'file', 'sharedfile' and 'rbd'.
      
      This is due to a "0" or None value in the corresponding dict inside
      _ComputeDiskSize, which results in a "O" or non Int value of the
      exported 'disk_space_total' parameter. This in turn makes hail fail,
      when trying to process the value:
      
       - with "Unable to read Int" if value is None (file)
       - with FailDisk if value is 0 (sharedfile, rbd)
      
      The latter happens because the 0 value doesn't match the instance's
      IPolicy, since it is lower than the minimum disk size.
      
      The second problem still exists when using adoption with 'plain'
      and 'blockdev' template and will be addressed in another commit.
      
      Signed-off-by: default avatarConstantinos Venetsanopoulos <cven@grnet.gr>
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      6a3166cb
  5. Aug 15, 2012
    • Iustin Pop's avatar
      Add verification of RPC results in _WipeDisks · f08e5132
      Iustin Pop authored
      
      Due to an oversight, the pause/resume sync RPC calls in _WipeDisks
      lack the verification of the overall RPC status, and directly iterate
      over the payload. The code actually doing the wipe does verify
      correctly the results. This can result in jobs failing with a hard to
      diagnose:
      
      OpExecError ['NoneType' object is not iterable]
      
      instead of proper "RPC failed" message.
      
      This patch adds a hard check on the pause call, but for the resume
      call it just logs a warning if the RPC failed; the rationale being
      that if we can't contact the node for pausing the sync, it's likely
      wiping will fail too, but after the wipe has been done, we can
      continue.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      f08e5132
  6. Aug 10, 2012
  7. Aug 09, 2012
  8. Aug 08, 2012
  9. Jul 27, 2012
  10. Jul 26, 2012
  11. Jul 25, 2012
  12. Jul 24, 2012
  13. Jul 23, 2012
    • Iustin Pop's avatar
      Ensure a stable content of the bash completion file · f5ce7613
      Iustin Pop authored
      
      Currently, the order of commands in the bash completion file is
      random, because the sub-commands are not sorted. This makes it harder
      to investigate the differences in packaged Ganeti or in installed
      Ganeti, since chunks in this file will have a random order.
      
      To fix this, we sort the subcommands based on the first subcommand in
      a given group ('first' also in sorted order); this results in a stable
      contents of file, as tested by building it many times and checking for
      differences.
      
      The patch also does a few other minor changes to the file
      (e.g. updating copyright years, etc.).
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      f5ce7613
  14. Jul 19, 2012
Loading