- 24 Oct, 2013 17 commits
-
-
Dimitris Aragiorgis authored
Try base InstanceSetParams tests that modify instance's devices with hotplug=True. Add some unittests for kvm hypervisor regarding runtime file manipulation. Based on a sample runtime file search for specific disk and nic entries based on their UUID. Add unittest for kvm device id generation. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Dimitris Aragiorgis authored
Only if default hypervisor is KVM try all hotplug related actions. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Dimitris Aragiorgis authored
Add --hotplug entry in gnt-instance manpage. Add NEWS entry for hotplug support. In both cases mention that hotplug is only supported for the KVM Hypervisor version >= 1.0. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Dimitris Aragiorgis authored
Add --hotplug option. Only used in OpInstanceSetParams. If this is omitted, modifications become effective after reboot. Ask user confirmation in case NIC modify + hotplug because it will be done via removing old NIC (and the corresponding tap) and adding a new one in the same PCI slot. Corresponding mods in haskell opcode definitions. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Dimitris Aragiorgis authored
Hotplugging is done by functions invoked by ApplyContainerMods(). In order hotplugging to take place the --hotplug option must be passed otherwise the modifications will take place after reboot. NIC hotplug supports add, remove and modify. The modify is done by removing the existing NIC and adding a new one in the same pci slot. Disk hotplug supports add and remove. Before hotplugging a Disk it must be assembled. Use blockdev_assemble RPC, get the device link_name and then call hotplug RPC command. In order to remove a disk (with blockdev_remove) it must be shutdown. So after unplugging the disk ShutdownDiskInstanceDisks() must be invoked. For both device types we use the generic RPC call_hotplug_device. Also adapt unit tests to follow the change. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Dimitris Aragiorgis authored
Until now this RPC returned only dev_path. Since we use it in hotplug we have to know the simlink of the device so that we pass it to the corresponding hypervisor command and include it in block_devices entry in runtime files. Fix unittest to be aware of changed rpc Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Dimitris Aragiorgis authored
Introduce new RPC that eventually invoke hypervisor specific hotplug functions. In order to be generic it has the following arguments: device type, action, device, extra info, seq. Device type can be NIC or DISK, action can be ADD, REMOVE, device is the NIC or Disk object, extra info is used by Disk hotplug to point the device path and seq is the device index (from the master perspective) Add HotplugSupported() in all Hypervisors Only KVM hypervisor supports this method. The other hypervisors raise HypervisorError. Before trying hotplug in backend layer invoke hyper.HotplugSupported and abort RPC in case it is not implemented or for some other reason not supported (disk+chroot, nic without fdsend, etc). Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Dimitris Aragiorgis authored
4 new methods: HotAddDevice, HotDelDevice, HotModDevice, HotplugSupported All these are the hypervisor interface with the backend. In general they read current runtime info, do the actual hotplug and update the runtime file. NIC hot-add: - open a tap and get its file descriptor. - pass fd with SCM rights (using python-fdsend) via monitor socket - create netdev and device with id=kvm_devid and proper pci info Disk hot-add: - create drive with id=kvm_devid - create device with id=kvm_devid and corresponding pci info Use MonitorSocket in _PassTapFd in order to connect to monitor socket and pass the tap's file descriptor using fdsend. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Dimitris Aragiorgis authored
Separate unix socket related code from QmpMonitor class and make the latter extend the newly introduced one: MonitorSocket Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Dimitris Aragiorgis authored
Hotplug is currently *not* supported for: - KVM < 1.0 - existing devices in the cluster - python-fdsend module is not installed (NIC hotplug) - chroot (Disk hotplug) - security mode other than None (Disk hotplug) For the above reasons raise HotplugError exception and let masterd handle it. TODO: modify CallHotplugCommand() so that it parses monitor output and reports whether the command succeeded or not. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Dimitris Aragiorgis authored
Extend kvm_cmd with -device option for the case of paravirual Disks and NICs. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Dimitris Aragiorgis authored
Device naming: QEMU monitor expects devices to be uniquely named. Device ids derive from the following function: kvm_devid = <device_type>-<part of uuid>-pci-<pci_slot> Device ids must be reproduce-able when we want to remove them. For that reason we store the pci slot inside the runtime file and in case we want to remove a device we obtain its pci slot by parsing the corresponding runtime enrty and matching the device by its uuid. Finding the PCI slot: For newly added devices Hypervisor parses existing PCI allocations (via _GetFreePCISlot() and eventually ``info pci`` monitor command) and decides the PCI slot to plug in the device. During instance startup hypervisor invokes _UpdatePCISlots() for every device of the instance. Initial PCI reservations derive from KVM default setup, that allocates 4 slots for devices other than disks and NICs. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Dimitris Aragiorgis authored
With this patch we add another entry in runtime files along with kvm_cmd, kvm_nics, and hvparams. block_devices that used to be encapsulated inside kvm_cmd, live now separately just like nics do but in tupples of (L{objects.Disk}, dev_path). Introduce also _GetExistingDeviceInfo() helper function to search for runtime entries. This is going to be useful later in hotplug methods. Define new exception: HotplugError. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Dimitris Aragiorgis authored
Newer kvm version support -device driver,... option where available drivers can be found by running kvm -device ? command. Currently ganeti uses `if` property of driver to define the disk type to use which is also passed as hvparam. This patch prepares the use of -device option only for paravirtual disks. To support other drivers as well we must create a mapping between the values passed now as disk_type hvparam and existing drivers. Note that if -device is used `if` property of `drive` option should be `none`. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Dimitris Aragiorgis authored
Do not pass BlockDev instance to hypervisor. Instead calculate the drive_uri (if any) in backend level and pass only the string to hypervisor. Hypervisor should not be aware of the entire block device but only the final path it can be reached. This is done also for easy manipulation of block devices inside runtime files since hotplug support enforces separate entry and BlockDev is not serializable. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Dimitris Aragiorgis authored
Simply move logic that generates block device related options out of _GenerateKVMRuntime(). Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Dimitris Aragiorgis authored
Add pci slot in NIC/Disk objects. This slot will be used only by hypervisor code. Currently only KVM will use it and store it temporarily in runtime files. Add HOTPLUG_* constants to define device types an hotplug actions. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
- 21 Oct, 2013 1 commit
-
-
Klaus Aehlig authored
* stable-2.9 Start NEWS entry for 2.9.0 rc4 * stable-2.8 Version bump for 2.8.1 Verify that ConfD is running after master-failover daemon-util: handle luxid in {start,stop}_master() Fix typo in storage.FileStorage docstring Fix path for serial file Conflicts: NEWS: take both additions Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Jose A. Lopes <jabolopes@google.com>
-
- 18 Oct, 2013 2 commits
-
-
Michele Tartara authored
Checking the correctness of the NEWS file syntax is an important part of the check process, but up to now it was only possible as part of a bigger set of tests. This commit creates a Makefile target to run that independently. The developer notes are updated to document this new target. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Jose A. Lopes <jabolopes@google.com>
-
Michele Tartara authored
This feature is new in Ganeti 2.10. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
- 17 Oct, 2013 9 commits
-
-
Santi Raffa authored
Add entry to the news file, per request. Signed-off-by:
Santi Raffa <rsanti@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Thomas Thrainer authored
Add a NEWS entry about the cmdlib test framework and increased test coverage, and mention that at least python-mock 1.0.1 is required as of Ganeti 2.10. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Klaus Aehlig authored
So far, we have correct start/stop of luxid during gnt-cluster master-failover inherited form stable-2.8 Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Jose A. Lopes authored
Add information about Haskell to Python opcode and constant generation. Signed-off-by:
Jose A. Lopes <jabolopes@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Klaus Aehlig authored
* stable-2.8 Version bump for 2.8.1 Verify that ConfD is running after master-failover daemon-util: handle luxid in {start,stop}_master() Fix typo in storage.FileStorage docstring Fix path for serial file Conflicts: NEWS: take both changes configure.ac: ignore version bump lib/bdev.py: apply change to lib/storage/bdev.py Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Michele Tartara authored
Also, update the NEWS file accordingly. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Helga Velroyen authored
This fixes a unit test in instance_storage_unittest.py, which was affected by the recent change in the RCP 'node_info'. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Hrovje Ribicic <riba@google.com>
-
Hrvoje Ribicic authored
Add information about disk template changes and using default iallocators on the target cluster. Signed-off-by:
Hrvoje Ribicic <riba@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Helga Velroyen authored
This patch fixes a problem with the RPC call 'node_info'. Depending on the exclusive storage flag, we need to add a storage unit for physical volumes in order to obtain storage space information for them. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
- 16 Oct, 2013 8 commits
-
-
Helga Velroyen authored
This patch adds additional 'gnt-node list' commands to the testing of 'gnt-cluster master-failover' in order to test if ConfD (or LuxiD) is still running after a master-failover. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Apollon Oikonomopoulos authored
Luxid was not handled in start_master() and stop_master() at all. As a result, during a master-failover, luxid would be left running on the old master and would not start on the new master, leaving the cluster without management until luxid was manually started. Signed-off-by:
Apollon Oikonomopoulos <apoikos@gmail.com> Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Santi Raffa authored
This commit is separated from the previous one for reviewing convenience. If git-blame points to this revision as the culprit of your problem, you probably have to go deeper. Signed-off-by:
Santi Raffa <rsanti@google.com> Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Santi Raffa authored
Add support for wheezy in build_chroot. * Run squeeze-specific install logic only when building squeeze * Collapse consecutive apt-get commands * Add wheezy-specific install logic * Ask for python-pyinotify 0.9.4 to avoid py-apidoc failures * Add generic setup logic Commands inside the new case construct were not indented inside the new case construct for reviewing convenience. This will be fixed in the next patch. The changes allow "make commit-check" to run to completion without errors inside the newly created chroot. Signed-off-by:
Santi Raffa <rsanti@google.com> Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Helga Velroyen authored
Through some merge from 2.9 to master, some unit tests in the file ganeti.comdlib.common_unittest.py were no longer referenced in the Makefile and as such not run anymore. With the introduction of the cmdlib test suite and the following extension of the unit tests, the orphaned unit tests (which are not already subsumed by others) are moved into the new unit test files. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Raffa Santi authored
Signed-off-by:
Santi Raffa <rsanti@google.com> Reviewed-by:
Jose A. Lopes <jabolopes@google.com>
-
Santi Raffa authored
Signed-off-by:
Santi Raffa <rsanti@google.com> Reviewed-by:
Jose Lopes <jabolopes@google.com>
-
Klaus Aehlig authored
It is actually located inside the queue directory. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
- 15 Oct, 2013 3 commits
-
-
Thomas Thrainer authored
This is required in order to calm a doclint warning. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Thomas Thrainer authored
- Bump version numbers to 2.10 in various files - Move implemented designs to design-2.10 Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Thomas Thrainer authored
* stable-2.9: Version bump for 2.9.0 rc3 Add NEWS entry for 2.9.0 rc3 Remove incorrect comment cfg auto update: match ipolicy with enabled disk templates Remove obsolete configure option for shared file storage * stable-2.8: Improve harep documentation Conflicts: Makefile.am NEWS configure.ac (all trivial merges) Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-