Revision:

Revisions

# Date Author Comment
52906402 11/29/2014 01:14 pm Apollon Oikonomopoulos

(2.12) Convert QmpMessage to a new-style class

Signed-off-by: Apollon Oikonomopoulos <>
Reviewed-by: Hrvoje Ribicic <>

48f108e7 11/29/2014 01:14 pm Dimitris Aragiorgis

(2.12) KVM: move monitor & QMP classes to a submodule

We move the HMP and QMP classes to the hv_kvm.monitor module.

Signed-off-by: Apollon Oikonomopoulos <>
Reviewed-by: Hrvoje Ribicic <>
Signed-off-by: Dimitris Aragiorgis <>

30c1dea8 11/29/2014 01:14 pm Dimitris Aragiorgis

(2.12) Convert hv_kvm to a package

Weighing in at 3k LOC, it is probably time to split hv_kvm into a
number of modules before adding new code.

Signed-off-by: Apollon Oikonomopoulos <>
Reviewed-by: Hrvoje Ribicic <>
Signed-off-by: Dimitris Aragiorgis <>

2e08e1b9 11/29/2014 01:14 pm Dimitris Aragiorgis

(2.12) kvm: Add migration capabilities as an hvparam

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,...

f649c38d 11/29/2014 01:14 pm Jose A. Lopes

(2.12) Add TAP interface name as argument in '_OpenTap'

This is necessary in order to create TAP interfaces for the
communication mechanism, which are named 'gnt.com.%d', where '%d' is a
unique number within a given node.

Signed-off-by: Jose A. Lopes <>...

b2a18282 11/29/2014 01:14 pm Jose A. Lopes

(2.12) Rename 'CdromOption' to '_CdromOption'

... because it is a protected definition.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Michele Tartara <>
Signed-off-by: Dimitris Aragiorgis <>

f305b92e 11/29/2014 01:14 pm Jose A. Lopes

(2.12) Fix KVM cdrom image URL in the second cdrom drive

  • The previous patch introduced cdrom image URLs for KVM cdrom drives.
    However, it worked only for the first drive and not the second.
    This patch generalizes the KVM cdrom command line option to allow...
6686a8c8 11/29/2014 01:14 pm Jose A. Lopes

(2.12) kvm: check that the ISO image is there if it's a URL

Perform a simple urllib2 check on ISO images specified as URL before
instance start, so as to work around qemu bug #597575 [1].

[1] https://bugs.launchpad.net/qemu/+bug/597575

Signed-off-by: Apollon Oikonomopoulos <>...

bfe9902d 11/29/2014 01:14 pm Jose A. Lopes

(2.12) Allow KVM to boot from HTTP

New versions of KVM support booting from HTTP-hosted ISO images, via
libcurl. This patch adds a proper check to allow defining either a sane,
absolute path or an HTTP URL as an iso image path.

Remove "format=raw" from the cdrom device options when iso_image starts...

fa0783d6 11/29/2014 01:14 pm Klaus Aehlig

(2.11) Add andRestArguments to IDiskParams

In this way, we cann pass through the opaque parameters
required for disk creation and modification in the case of
external storage.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>...

3ceb0107 11/29/2014 01:14 pm Klaus Aehlig

(2.11) Add function providing the canonical andRestArguments

The field catching the remaining fields will always be of the same
shape, so add a function for this to make usage simple.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>...

413ff9b5 11/29/2014 01:14 pm Klaus Aehlig

(2.11) Add genAndRestArguments :: Gen (Map String JSValue)

So that objects using AndRestArguments are available for testing.
As the AndRestArguments are intended for passing through additional
parameters passed on the command line, we restrict them to the...

0a50f32c 11/29/2014 01:14 pm Klaus Aehlig

(2.11) Add additional constructor AndRestArguments to OptionalType

A field of this type will capture all the remaining fields
of an object as JSValues. Obviously, the intended use is
to have precisely one such field. This mechanism will allow
to pass opaque values trough, as it is, e.g., required for...

4a930c44 11/29/2014 01:14 pm Klaus Aehlig

(2.11) Make BlockDev subclasses adhere the interface for Create

In commit 702c3270 two new parameters were added to the
Create function of BlockDev. Make subclasses also adhere
this specification.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

a4ee39f4 11/29/2014 01:14 pm Klaus Aehlig

(2.11) Make BlockDev subclasses adhere to new interface

In commit 702c3270 two new parameters were added to the
constructor of BlockDev. Make the subclassess accept these
additional parameters as well.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

098031e7 11/29/2014 01:14 pm Dimitris Aragiorgis

(2.11) Make disk.name and disk.uuid available in bdev

Until now Disk name and uuid was not available on bdev level.
In case of ExtStorage, this info is useful, and may be for other
templates in the future too.

This patch treats the name and uuid object slots just like the size...

18f680f9 11/29/2014 01:14 pm Ilias Tsitsimpis

(2.11) Add 'provider' to IDiskParams

IDISK_PROVIDER was included in python's IDISK_PARAMS, so it
should also be included in the Haskell code.

Now that luxid creates and enqueues jobs, without this patch the
ExtStorage interface is broken as the user can not pass the disk...

dc4e38f8 11/29/2014 01:14 pm Jose A. Lopes

(2.11) Fix class methods in KVM hypervisor

Several methods in KVM hypervisor behave like 'classmethods', however,
they did not have the '@classmethod' annotation. This patch adds
'@classmethod' annotations to several of these methods with the goal
of making '_StopInstance' available to the QA. This step is necessary...

3ba98a16 11/29/2014 01:14 pm Dimitris Aragiorgis

(2.8r) Workaround for Issue 621

Upon LUNetworkDisconnect() and LUNetworkConnect() try to acquire
all cluster's instances.

By that _LS_ACQUIRE_ALL acquire mode is set and not
_LS_ACQUIRE_EXACT and thus the deleted lock does cause any problem.

NOTE: This workaround is not merged upstream. They prefer to have...

d66693fa 11/29/2014 01:14 pm Dimitris Aragiorgis

Disable CheckFileStoragePathNotWritable test

..because it fails when runs as root.

Signed-off-by: Dimitris Aragiorgis <>

44431b8a 11/19/2014 06:51 pm Dimitris Aragiorgis

kvm: Delegate socket handling to monitor module

Introduce @_ensure_connection decorator that properly handles
the socket connection (i.e. connect, close) and propagates
any exceptions raise in the decorated method.

Signed-off-by: Dimitris Aragiorgis <>

d6b695ce 11/03/2014 07:03 pm Klaus Aehlig

Fix python shebang line in tools as well

While most of our top-level python scripts used to be generated
in the Makefile already, the scripts under tools used to be
"ready to use". However, in our current situation where the
python 2 interpreter is called different on different platforms...

534515c0 10/31/2014 01:12 pm Klaus Aehlig

Do not hard-code python path

...in our automatically generated top-level python files.
Instead use the automatically detected python path.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

02d233cf 10/22/2014 02:07 pm Klaus Aehlig

Add a target to inspect make variables

...this will allow inspecting, e.g., the effective compiler
flags without actually running the compiler. For example,
to see the value of the HFLAGS,

make print-HFLAGS

Signed-off-by: Klaus Aehlig <>...

00300562 10/22/2014 02:07 pm Klaus Aehlig

Have fatal warnings on in developer mode

Unless you develop Ganeti, it is not a problem if some of
the functions used are deprecated in you newer haskell
environment. So allow those builds for normal users.

Signed-off-by: Klaus Aehlig <>...

564a8e07 10/22/2014 02:07 pm Klaus Aehlig

Add a flag --developer-mode

So that we can have fatal warnings in development, but
people can still build old Ganeti versions with newer
compilers despite some functions are deprecated by now.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Helga Velroyen <>

b62dabce 10/21/2014 03:45 pm Neal Oakey

Fix check for sphinx-build from python2-sphinx

if using python2-sphinx '/usr/bin/sphinx-build2 --version' prints
"Sphinx (sphinx-build2) 1.2.3" which didn't match the regex

Signed-off-by: Neal Oakey <>
Reviewed-by: Helga Velroyen <>

d7353fe0 10/20/2014 06:29 pm Neal Oakey

use the Python interpreter from env

use the Python interpreter which has been set via PYTHON env-var at
configure time

Signed-off-by: Neal Oakey <>
Signed-off-by: Klaus Aehlig <>
Reviewed-by: Klaus Aehlig <>

a9ea19d0 10/20/2014 06:27 pm Dimitris Aragiorgis

kvm: Use vhostfds obtained by OpenTap

During instance startup, if vhost_net is True, OpenTap() opens
/dev/vhost-net device to obtain some fds. These fds were never
used. This patch adds the vhostsfd option to the --netdev option.

Signed-off-by: Dimitris Aragiorgis <>

2f8cb286 10/20/2014 05:52 pm Dimitris Aragiorgis

hotplug: Retry VerifyHotplugCommand up to 5 times

It seems that QMP upon device_del returns without QEMU having
completely removed the device from the PCI bus. This probably has to
do PCI bus hotplug handlers (DeviceState->BusState->hotplug_handler).

So we invoke HasPCIDevice up to 5 times with 1 sec sleep in between...

295f66c7 10/20/2014 05:52 pm Dimitris Aragiorgis

Update hotplug design doc

..to reflect the transition from HMP to QMP during hotplug
actions.

Signed-off-by: Dimitris Aragiorgis <>

8b201d2d 10/20/2014 05:52 pm Dimitris Aragiorgis

qa: Re-enable NIC hotplug tests

This was disabled due to Issue 885. This issue states that NIC
hotplugging sometimes makes an instance unresponsive. This cannot be
the case, since NIC hotplug takes place on an extra NIC and does not
mess up with instance's primary NIC. Still this sometimes might be...

4098b6a5 10/20/2014 05:52 pm Dimitris Aragiorgis

qmp: Log qmp commands and responses

Add debug logging for all qmp commands and responses, except for
query-commands, and qmp_capabilities, that are executed upon
initialization of QmpConnection (and their output is not really
useful).

Signed-off-by: Dimitris Aragiorgis <>

65876a11 10/20/2014 05:52 pm Dimitris Aragiorgis

hotplug: Is not supported for QEMU < 1.7

Change the bulk check of whether hotplug is supported or not.
Only versions >= 1.7 support the required qmp commands.

Signed-off-by: Dimitris Aragiorgis <>

13c20ce3 10/20/2014 05:52 pm Dimitris Aragiorgis

hotplug: Remove unused code after refacoring

All HMP related code gets removed since everything is done via QMP.

Signed-off-by: Dimitris Aragiorgis <>

c4244889 10/20/2014 05:52 pm Dimitris Aragiorgis

hotplug: Use QMP during HotDelDevice

During device hot-del use new QMP helper methods: HotDelDisk() for
disk hotplug and HotDelNic() for NIC hotplug.

Signed-off-by: Dimitris Aragiorgis <>

d9df45b0 10/20/2014 05:52 pm Dimitris Aragiorgis

hotplug: Use QMP during HotAddDevice

During device hot-add use new QMP helper methods: GetFreePCISlot()
for allocating a free PCI slot, HotAddDisk() for disk hotplug and
HotAddNic() for NIC hotplug.

Signed-off-by: Dimitris Aragiorgis <>

a9447afa 10/20/2014 05:52 pm Dimitris Aragiorgis

kvm: Use the new interface during instance start

Use new OpenTap() and _GetNetworkDeviceFeatures() interfaces
during _ExecuteKVMRuntime().

Signed-off-by: Dimitris Aragiorgis <>

3d47387e 10/20/2014 05:52 pm Dimitris Aragiorgis

monitor: Extend HotAddNic() for advanced features

In case vhost is enabled we have to pass the vhostfds as returned by
OpenTap() via SCM_RIGHTS prior issuing netdev_add command with vhost
and vhostfds extra arguments.

In case multiqueue is enabled we add the mq and vectors extra...

2d873f4d 10/20/2014 05:52 pm Dimitris Aragiorgis

kvm: Refactor _GetNetworkDeviceFeatures() helper

Make _GetNetworkDeviceFeatures() return a tuple of (dict, str, str).
The first item should be a dictionary including the enabled
netdev/device features (vhost, vnet_hdr, mq). The other two are
strings to be appended to --netdev and --device qemu options....

99b9ecbe 10/20/2014 05:52 pm Dimitris Aragiorgis

netdev: Refactor OpenTap for future use

Make OpenTap() helper method to take a dictionary with the features
that should be enabled or not. Currently these features are: vhost,
vnet_hdr, multiqueue.

In case vhost is enabled, along with the tapfds we return a list of...

f88445c5 10/20/2014 05:52 pm Dimitris Aragiorgis

hotplug: Use QMP in VerifyHotplugCommand

This used to check whether a specific hotplug action has succeeded.
Use HasPCIDevice() qmp method to verify if the requested device
exists or not.

Signed-off-by: Dimitris Aragiorgis <>

b864ad02 10/20/2014 05:52 pm Dimitris Aragiorgis

hotplug: Use QMP in VerifyHotplugSupport

This used to check whether a specific hotplug action is supported.
Since everything is about to be done via qmp commands delegate these
checks to QmpConnection class.

Signed-off-by: Dimitris Aragiorgis <>

cece9ac9 10/20/2014 05:52 pm Dimitris Aragiorgis

monitor: Close socket fd if already connected

We close the socket fd only if we have an active connection.
We hide this logic in the public close() method, and all
the actions are moved to a private method.

Signed-off-by: Dimitris Aragiorgis <>

fdcec170 10/20/2014 05:52 pm Dimitris Aragiorgis

kvm: New _with_qmp decorator

The decorator takes the hypervisor and the instance object as passed
to all hotplug related commands and ensures a valid QmpConnection()
object is found in hypervisor's qmp attribute. After the method
returns, the qmp connection is closed. This way if we have nested...

e92bc4b1 10/20/2014 05:52 pm Dimitris Aragiorgis

qmp: Add Disk hotplugging related methods

HotAddDisk() uses blockdev-add and device_add after getting the
drive fd and passing it with the AddFd() helper method. Please note
that in case of userspace access mode this step will be omitted.

HotDelDisk() uses device_del. Please note that drive_del is...

e52af0e0 10/20/2014 04:17 pm Dimitris Aragiorgis

qmp: Add NIC hotplugging related methods

HotAddNic() uses netdev_add and device_add after passing the tapfd
to the running process with the GetFd() helper method.

HotDelNic() uses device_del and netdev_del qmp commands.

Signed-off-by: Dimitris Aragiorgis <>

e1031077 10/20/2014 04:17 pm Dimitris Aragiorgis

qmp: Helper methods for parsing query-pci output

Introduce GetPCIDevices() that gets the devices of the first PCI bus
of a running instance, HasPCIDevice() that will be used to verify
if a specific device is correctly hotplugged or not, and
GetFreePCISlot() that will be used during hot-add to find the first...

caecbd06 10/20/2014 04:17 pm Dimitris Aragiorgis

qmp: Add helper methods to verify hotplug support

Introduce CheckDiskHotAddSupport() and CheckNicHotAddSupport()
helper methods that will be used to verify hotplug support.
Both check for fdsend python module and if the required qmp
commands are supported....

206b3586 10/20/2014 04:17 pm Dimitris Aragiorgis

qmp: Add GetFd() wrapper around getfd command

getfd qmp command will be used to pass an fd using SCM_RIGHTS
and name it properly so that NIC hot-add can take place.

Signed-off-by: Dimitris Aragiorgis <>

ac1bb9ee 10/20/2014 04:17 pm Dimitris Aragiorgis

qmp: Refactor of add-fd and remove-fd commands

Instead of sending the qmp command along with the SCM_RIGHTS control
message we send just a blank (idea taken from qemu iotests). Then we
invoke the corresponding command (add-fd, remove-fd) with the
regular way (qmp.Execute). Since the qmp connection does not close...

e2fb80be 10/20/2014 04:17 pm Dimitris Aragiorgis

utils: Introduce GetFreeSlot() function

Since this is a generic function that implements bitarray logic move
it from kvm to utils so that it can be easily used across all modules.

Make it raise errors.GenericError if it cannot find a free slot in
the given bitarray....

9d6bfeba 10/20/2014 04:16 pm Dimitris Aragiorgis

kvm: Minor refactor of MonitorSocket

Create socket upon connect(), keep the status of connection
(self._connected = False) in close(), make existing connect()
method protected and let connect() act as a reconnect method.

Signed-off-by: Dimitris Aragiorgis <>

dbdbd5fb 10/20/2014 02:45 pm Klaus Aehlig

Link to the config-lock design document

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

e61878d4 10/20/2014 02:22 pm Klaus Aehlig

Merge branch 'stable-2.12' into master

  • stable-2.12
    The config lock still exists

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Hrvoje Ribicic <>

b95bc577 10/20/2014 12:58 pm Klaus Aehlig

The config lock still exists

...so update the daemons-refactoring design document accordingly
to fit with implementation. The mentioned design document already
exists on the master branch.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

28f34054 10/20/2014 11:27 am Klaus Aehlig

Add a design document for removal of the config lock

This design document describes how the negative effect of the config
lock can be removed in an incremental way.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

319f51ae 10/17/2014 02:55 pm Niklas Hambuechen

qa_filters: Use retry in more cases

Even starting a (delay 0.01) job without filters does not happen
within the 0.5 seconds we allowed if run in a big cluster.
Use retry here as well.

Signed-off-by: Niklas Hambuechen <>
Reviewed-by: Hrvoje Ribicic <>

94f2be5b 10/16/2014 11:45 pm Niklas Hambuechen

qa: qa_filters: Make status check less flaky by using retry

The time needed to delete a filter and have jobs that were paused
by that filter be scheduled depends on the size of the cluster.

The polling retry introduced here is more robust than a sleep.
...

1aaabf94 10/16/2014 11:45 pm Niklas Hambuechen

qa: qa_job_utils: add `RetryingUntilJobStatus`

Dual to `RetryingWhileJobStatus`.
It retries until the given status is reached.

Signed-off-by: Niklas Hambuechen <>
Reviewed-by: Hrvoje Ribicic <>

3b53dd6e 10/16/2014 11:45 pm Niklas Hambuechen

QA: Move `GetJobStatus`/`RetryingWhileJobStatus` to utils

We would like to use them from other QAs involving jobs.

Signed-off-by: Niklas Hambuechen <>
Reviewed-by: Hrvoje Ribicic <>

2538bb61 10/16/2014 07:31 pm Niklas Hambuechen

JQScheduler: Run scheduler when filters change in config

Until now, job filters being added, modified, or deleted triggered
a scheduler run (`scheduleSomeJobs`) from the place where the filter
modification request is handled (Query.Server).

This could lead to a race:...

1270e629 10/16/2014 07:31 pm Niklas Hambuechen

JQScheduler: Allow triggering scheduler if config changes

Some changes to the config need the scheduler to be re-run,
e.g. when job filters change.

This commit adds the infrastructure for that, with no things
triggering rescheduling.

Signed-off-by: Niklas Hambuechen <>...

1c9bc679 10/16/2014 07:31 pm Niklas Hambuechen

ConfigReader: Simplify `initConfigReader` argument passing

We passed in a cfg_transform and an IORef, just to apply the
cfg_transform and write it to the IORef.

Instead, directly pass in a function that decides what to do
with the read config, so that `ConfigReader` now is solely...

3b5029be 10/16/2014 07:28 pm Klaus Aehlig

Fix API doc

...by also removing the unused parameter from the doc string.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Niklas Hambuechen <>

da8ab8c7 10/16/2014 07:23 pm Niklas Hambuechen

Query.Server: Fix GHC 7.8 `bitSize` deprecation warning

This makes Ganeti compile on GHC 7.8 with our -Werror.

Signed-off-by: Niklas Hambuechen <>
Reviewed-by: Klaus Aehlig <>

1837c7df 10/16/2014 07:14 pm Klaus Aehlig

Drop unused argument from RunSshCmdWithStdin

Due to merging up 9f8f740 the ssconf_store (positional) argument
became unused in 6a06c42. So remove it from the interface.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Niklas Hambuechen <>

6a06c42e 10/16/2014 06:42 pm Klaus Aehlig

Drop ipv6 keyword argument for SshRunner

...as the SshRunner now determines by itself the address
family. This is a semantic conflict of merging 9f8f740
into master.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Niklas Hambuechen <>

b45d0912 10/16/2014 05:45 pm Klaus Aehlig

Merge branch 'stable-2.12' into master

  • stable-2.12
    Fix FIXME comment
  • stable-2.11
    break too long line
    Read if IPv6 is used directly in SshRunner
  • stable-2.10
    Check the return value of query in ConnectToInstanceConsole

Conflicts:
lib/bootstrap.py...

7c028015 10/16/2014 02:45 pm Klaus Aehlig

Merge branch 'stable-2.11' into stable-2.12

  • stable-2.11
    break too long line
    Read if IPv6 is used directly in SshRunner
  • stable-2.10
    Check the return value of query in ConnectToInstanceConsole

Conflicts:
lib/client/gnt_instance.py
Resolution:
follow the client switch...

e9ca268f 10/16/2014 02:13 pm Klaus Aehlig

Make ConfD honor /etc/services

...to determine which port to bind to. The priorities are now
- the --port option,
- the services entry, and
- the default port.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Helga Velroyen <>

cd0d5ce5 10/15/2014 05:47 pm Klaus Aehlig

break too long line

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Niklas Hambuechen <>

9158b5b9 10/15/2014 05:22 pm Klaus Aehlig

Merge branch 'stable-2.10' into stable-2.11

  • stable-2.10
    Check the return value of query in ConnectToInstanceConsole

Conflicts:
lib/client/gnt_instance.py
Resolution:
follow the switch to query socket

Signed-off-by: Klaus Aehlig <>...

01ab7ec9 10/15/2014 04:01 pm Niklas Hambuechen

QA for job filtering

Includes QA for RAPI filter management and gnt_filter.

System tests (adding/removing filters, observing their effects)
are done with gnt_filter.

Signed-off-by: Niklas Hambuechen <>
Reviewed-by: Klaus Aehlig <>

226455df 10/15/2014 04:01 pm Niklas Hambuechen

qa_utils: Allow passing fail=None to AssertCommand

This is for cases where we don't care about the exit code.

Signed-off-by: Niklas Hambuechen <>
Reviewed-by: Klaus Aehlig <>

b47587b0 10/15/2014 04:01 pm Niklas Hambuechen

qa_utils: Make AssertCommand return stdout/stderr as well

This is usefull if the run commands output something that's needed afterwards.

Signed-off-by: Niklas Hambuechen <>
Reviewed-by: Klaus Aehlig <>

513673d0 10/15/2014 04:01 pm Niklas Hambuechen

Unit tests for job filtering

This tests only the filter logic; the QA testing filter management + logic
comes later.

Signed-off-by: Niklas Hambuechen <>
Reviewed-by: Klaus Aehlig <>

1c05226b 10/15/2014 04:01 pm Niklas Hambuechen

Implement job filtering

This implements the operational part of the design doc
"Filtering of jobs for the Ganeti job queue"
(design-optables.rst).

It includes
- respecting filter rules when jobs are scheduled
- cancelling running jobs rejected by filters...

5ebc6675 10/15/2014 04:01 pm Niklas Hambuechen

JSON: Add `nestedAccessByKey` and `nestedAccessByKeyDotted`

We will need them for job filters, where we want to access OpCodes
as a JSON structure.

Signed-off-by: Niklas Hambuechen <>
Reviewed-by: Klaus Aehlig <>

e25ed280 10/15/2014 04:01 pm Niklas Hambuechen

Query.Filter: Add `evaluateFilterJSON`

We will need it to evaluate filters on OpCodes for job filtering.

Signed-off-by: Niklas Hambuechen <>
Reviewed-by: Klaus Aehlig <>

bfbad922 10/15/2014 04:01 pm Niklas Hambuechen

Objects: Add filterRuleOrder / Ord instance for FilterRule

This is necessary to process filters in this order, as required
by the filtering spec.

Signed-off-by: Niklas Hambuechen <>
Reviewed-by: Klaus Aehlig <>

aff5a102 10/15/2014 04:00 pm Klaus Aehlig

Look up RPC port

...instead of hard-codedly using the default port.
Ganeti's noded honors /etc/services, so also look
up the port there when trying to contact the daemon.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Helga Velroyen <>

27551954 10/15/2014 04:00 pm Klaus Aehlig

Add withDefaultOnIOError

This is a specialized version of try with a constant
handler. The main benefit is the type annotation forcing
the free type variable in 'try' to be IOError.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Helga Velroyen <>

9f8f740b 10/15/2014 03:49 pm Neal Oakey

Read if IPv6 is used directly in SshRunner

Moved check if the Primary Network is running on IPv6 into the SshRunner.
Until now SshRunner was only initialized correctly in the bootstrap.py
and not in the other 5 places.

Fixing issue #892

Signed-off-by: Neal Oakey <>...

8540a023 10/15/2014 02:17 pm Niklas Hambuechen

Test.JQScheduler: Fix queue jobs having same job IDs

The `Arbitrary Queue` instance so far would simply generated lists
of jobs, for which it was possible that job IDs are repeated
(inside individual lists or accross all lists).

While this hasn't created any problem so far, real-world Queues...

15ccbc02 10/15/2014 02:17 pm Niklas Hambuechen

TestCommon: Add listOfUniqueBy

This is a Gen for creating elements that are distinct by a certain property,
(e.g. for generating a list of jobs, all of which have different job IDs).

Signed-off-by: Niklas Hambuechen <>
Reviewed-by: Klaus Aehlig <>

14aac564 10/15/2014 02:17 pm Niklas Hambuechen

Utils.Monad: Add unfoldrM and unfoldrM'

Taken from monad-loops, with a variable rename to avoid name shadowing.

Signed-off-by: Niklas Hambuechen <>
Reviewed-by: Klaus Aehlig <>

c8feab6b 10/15/2014 01:01 pm Klaus Aehlig

Fix FIXME comment

As Ganeti supports jump-upgrades, we cannot anywhere in the
2.x series assume that we have not just been upgraded form
a 2.10 or earlier system. Hence the bootstrap code needs to
remain. Change the comment accordingly.

Signed-off-by: Klaus Aehlig <>...

2fb6a398 10/14/2014 07:35 pm Klaus Aehlig

Retry death detection after killing

We cannot avoid the race on death detection after
forcefully killing a job: the only guarantee the
operating system gives us is that the process will
die eventually. However, we can improve the chance
of being able to successfully clean up a job by...

c2be0834 10/14/2014 07:35 pm Klaus Aehlig

Add orM from monad-loops

...a monadic short-circuit version of 'or'.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Niklas Hambuechen <>

6f160319 10/14/2014 07:35 pm Klaus Aehlig

Add constants for retries of death detection

Add constants describing how often, and at which intervals,
to retry death detection of a job after sending it a SIGKILL.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Niklas Hambuechen <>

e4195480 10/14/2014 07:35 pm Klaus Aehlig

Report back death status after check

Make cleanupIfDead report the death status of the job,
so that a caller can decide to retry.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Niklas Hambuechen <>

876b0d0a 10/14/2014 07:35 pm Klaus Aehlig

Improve debug statements in death detection

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Niklas Hambuechen <>

8eafdd51 10/13/2014 10:43 pm Klaus Aehlig

Merge branch 'stable-2.12' into master

  • stable-2.12
    Also clean up stale livelock files
    Add a function to list livelock files found on the system
    Change monitoring test invocation
    Make parallel performance rename test more serial
    Break up parallel performance QA tests...
6d5cede1 10/13/2014 10:09 pm Klaus Aehlig

Also clean up stale livelock files

So far, WConfD only cleans up the livelock files of resource
owners. While this is sufficient for reclaiming resources and
Ganeti to work properly, we still don't want to leak stale
livelock files.

Signed-off-by: Klaus Aehlig <>...

bd1d7b91 10/13/2014 10:09 pm Klaus Aehlig

Add a function to list livelock files found on the system

While we mainly care to detect deaths of resource owners, we
also want to avoid leaking stale livelock files. Those can
occur is someone dies after returning all resources. Provide
a function listing them, so that they can be cleaned up....

421ab83e 10/13/2014 10:02 pm Yuto KAWAMURA(kawamuray)

Check the return value of query in ConnectToInstanceConsole

When running gnt-instance console for an instance name that doesn't
exist, I got the following raw error:

...
cl.QueryInstances([instance_name], ["console", "oper_state"], False)
ValueError: need more than 0 values to unpack...

9aba0357 10/13/2014 08:06 pm Niklas Hambuechen

Test.JQScheduler: Make test more precise

The output of a filter operation should be exactly a subsequence.

Signed-off-by: Niklas Hambuechen <>
Reviewed-by: Klaus Aehlig <>

733c704c 10/13/2014 08:06 pm Niklas Hambuechen

Utils: Add `isSubsequenceOf`

It is useful for defining properties of `filter` like functions
(in fact, it is the only property that can be said about filter
if the filter predicate is not known).

Signed-off-by: Niklas Hambuechen <>
Reviewed-by: Klaus Aehlig <>

b7dfde6a 10/13/2014 08:06 pm Niklas Hambuechen

Test.JQScheduler: Refactor enqueued jobs

Makes the test easier to read.

Signed-off-by: Niklas Hambuechen <>
Reviewed-by: Klaus Aehlig <>

« Previous 1 2 3 4 5 ... 161 Next » (201-300/16089) | Per page: 25, 50, 100

Also available in: Atom