ganeti-local
9 years ago(grnet) Remove deprecated physical_id if found stable-2.10-grnet
Dimitris Aragiorgis [Thu, 8 May 2014 07:58:05 +0000 (10:58 +0300)]
(grnet) Remove deprecated physical_id if found

In 2.8 disks have been added to runtime files for hotplug support.
Back then physical_id slot existed. Remove this slot in the early
stage of Disk.FromDict() otherwise an exception will be raised.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

9 years agoDisable CheckFileStoragePathNotWritable test
Dimitris Aragiorgis [Tue, 6 May 2014 14:13:11 +0000 (17:13 +0300)]
Disable CheckFileStoragePathNotWritable test

..because it fails when runs as root.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

9 years ago(grnet) Upgrade runtime files
Dimitris Aragiorgis [Mon, 5 May 2014 16:09:44 +0000 (19:09 +0300)]
(grnet) Upgrade runtime files

Each disk entry should include (disk dict, link name, disk uri).

When hotplug was backported in 2.8 access uri was not supported.
Thus the relevant entry for each disk entry might be missing from
the runtime files. Add an empty string in this case.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

9 years agoifdown: Use new methods to unconfigure NICs
Dimitris Aragiorgis [Tue, 4 Feb 2014 13:47:24 +0000 (15:47 +0200)]
ifdown: Use new methods to unconfigure NICs

We unconfigure a NIC (invoke ifdown script) during:

* instance cleanup
* finalizing successful migration on source node
* hot-unplugging a NIC

In case of migration we do only a local cleanup.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

9 years agoifdown: Use new methods to create NIC files
Dimitris Aragiorgis [Tue, 4 Feb 2014 13:40:46 +0000 (15:40 +0200)]
ifdown: Use new methods to create NIC files

NIC files containing corresponding tap name are created during:

* instance startup
* NIC hot-add

For compatibility we continue creating indexed based NIC files along
with uuid based ones.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

9 years agoifdown: Introduce _UnconfigureNIC() helper method
Dimitris Aragiorgis [Tue, 4 Feb 2014 13:33:09 +0000 (15:33 +0200)]
ifdown: Introduce _UnconfigureNIC() helper method

This method takes a NIC object, creates the proper invironment
and invokes ifdown script.

It takes an extra boolean argument only_local which is passed
to ifdown script as the second positional argument. It states
if the external script should wipe out every configuration
related to the NIC or should only clean up local thinks, e.g.
during a successful migration we are going to invoke ifdown
on the source node but we do not want to purge any DDNS
configuration related to instance's NICs.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

9 years agoifdown: Make Read/LoadKVMRuntime classmethods
Dimitris Aragiorgis [Tue, 4 Feb 2014 13:01:58 +0000 (15:01 +0200)]
ifdown: Make Read/LoadKVMRuntime classmethods

.. and make LoadKVMRuntime() take instance_name rather than the
whole instance object as first argument. This will be needed during
instance cleanup where we the instance object is not available.

We are going to retrieve current NIC configuration from the runtime
file in order to invoke the corresponding ifdown scripts.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

9 years agoifdown: Extract env creation from ConfigureNic()
Dimitris Aragiorgis [Tue, 4 Feb 2014 12:49:00 +0000 (14:49 +0200)]
ifdown: Extract env creation from ConfigureNic()

Introduce new helper method that creates the environment passed
to ifup/ifdown scripts. Instance tags and NIC index will be passed
only during ifup script since only then are available and
valid. Both can change until a NIC gets removed and thus will not
be passed to ifdown script.

Note that TAP name may be not available during ifdown script for
old instances without UUID indexed NIC files. That's why it gets
included in env only if it exists.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

9 years agoifdown: Introduce helper methods
Dimitris Aragiorgis [Tue, 4 Feb 2014 12:21:34 +0000 (14:21 +0200)]
ifdown: Introduce helper methods

Until now Ganeti upon TAP creation, a NIC file was created
under $RUNDIR/kvm-hypervisor/nic/<instance_name>/<nic_index>

Since NICs have obtained a UUID, we are going to create another
file named after its UUID. This will be needed during ifdown
script in order to retrieve the tap name related to the
corresponding NIC. Index of a NIC may change but UUID will not;
When a NIC is getting hot-plugged may be the third one from
the master perspective but after removing the second, its index
will change.

In the following patches we are going to refer to NIC files
named after NIC's uuid. Here we add helper methods that
add/remove those kind of files. For retrieving NIC's tap name
we search *only* for a NIC file named after its UUID. If not
found (e.g. in case of already existing instances) we fail
silently. External ifdown script must deal with this corner case.

To keep compatibility we still create NIC files based on their
*current* index.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

9 years agoifdown: Change kvm-if* scripts
Dimitris Aragiorgis [Thu, 30 Jan 2014 15:16:41 +0000 (17:16 +0200)]
ifdown: Change kvm-if* scripts

* Rename kvm-vif-bridge to kvm-ifup-custom
* Search if /etc/ganeti/kvm-if*-custom is available
  and execute it instead
* Pass positional argument to custom script

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

9 years agoifdown: Add example kvm-ifdown script
Dimitris Aragiorgis [Fri, 24 Jan 2014 16:45:02 +0000 (18:45 +0200)]
ifdown: Add example kvm-ifdown script

This script currently does nothing more that calling user the
user provided one if it exists.

User provided script should be placed under /etc/ganeti/
and named `ganeti-kvm-ifdown`.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

9 years ago(ipfix) Allow NICs with mode=routed and ip=none
Dimitris Aragiorgis [Mon, 16 Dec 2013 01:13:48 +0000 (03:13 +0200)]
(ipfix) Allow NICs with mode=routed and ip=none

This allows us to define an IPv6 only network (currently with a
dummy IPv4 network) with connectivity mode 'routed' and let
the NICs inside this network have only IPv6 address (auto-generated
from their MAC and the network's prefix).

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

9 years ago(ext) Do not remove disks if --keep-disks and DT_EXT
Dimitris Aragiorgis [Thu, 17 Oct 2013 15:47:18 +0000 (18:47 +0300)]
(ext) Do not remove disks if --keep-disks and DT_EXT

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

9 years ago(ext) Override disk_cache hvp with disk param in ext
Dimitris Aragiorgis [Tue, 3 Dec 2013 09:41:30 +0000 (11:41 +0200)]
(ext) Override disk_cache hvp with disk  param in ext

This is a hack that brings disk_cache hypervisor param
at disk level. This is supported only for disks of ext
template that allow arbitrary params. The corresponding
param that should be used is 'cache'.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

9 years ago(ext) Pass disk geometry in kvm command
Dimitris Aragiorgis [Tue, 3 Dec 2013 09:32:21 +0000 (11:32 +0200)]
(ext) Pass disk geometry in kvm command

Currently we allow this feature only for ext templates that
allow arbitrary params per disk. If both 'heads' and 'secs'
params are given then 'cyls' is calculated from the disk size.

TODO: export these params in IDISK_PARAMS since the can be
useful for every disk.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

9 years ago(ext) Export logical_id info to hooks env
Dimitris Aragiorgis [Mon, 2 Dec 2013 10:26:58 +0000 (12:26 +0200)]
(ext) Export logical_id info to hooks env

DISK_ID as the second part of logical_id

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

9 years ago(b64) Use base64 encoding in networks' bitarrays
Dimitris Aragiorgis [Wed, 2 Oct 2013 19:36:54 +0000 (22:36 +0300)]
(b64) Use base64 encoding in networks' bitarrays

This is needed for GRNET'S production environment.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

9 years ago(snap) Snapshot support for ExtStorage
Dimitris Aragiorgis [Wed, 16 Oct 2013 18:46:25 +0000 (21:46 +0300)]
(snap) Snapshot support for ExtStorage

Extend existing RPC params with the snapshot name and
add allow snapshot not only for LVM but also for EXT.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

9 years ago(grnet) Move disk options before nic ones in kvm command
Dimitris Aragiorgis [Thu, 28 Nov 2013 06:25:59 +0000 (08:25 +0200)]
(grnet) Move disk options before nic ones in kvm command

Older versions of Ganeti did ensure that during startup
disk devices will be inserted before nic devices in PCI
configuration space. KVM inserts devices to PCI slots
depending on the order of command line options.

Upon migration kvm command options are re-generated based
on runtime files info. To be able to migrate instances
with old format runtime files put disk options before
NIC ones so that disk occupy the first pci slots available
and not the other way around.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

9 years ago(2.11) Make BlockDev subclasses adhere the interface for Create
Klaus Aehlig [Mon, 3 Feb 2014 16:02:16 +0000 (17:02 +0100)]
(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 <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

9 years ago(2.11) Make BlockDev subclasses adhere to new interface
Klaus Aehlig [Mon, 3 Feb 2014 10:53:40 +0000 (11:53 +0100)]
(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 <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

9 years ago(2.11) Make disk.name and disk.uuid available in bdev
Dimitris Aragiorgis [Fri, 31 Jan 2014 15:36:55 +0000 (17:36 +0200)]
(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
one and passes them to BlockDev.__init__() and to BlockDev.Create().

The ExtStrorage interface exports these options to scripts via the
VOL_CNAME and VOL_UUID environment variables.

This fixes Issue 696.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

9 years ago(2.13) kvm: Add migration capabilities as an hvparam
Dimitris Aragiorgis [Fri, 21 Mar 2014 10:16:10 +0000 (12:16 +0200)]
(2.13) 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,
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: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

9 years ago(2.8r) Workaround for Issue 621
Dimitris Aragiorgis [Mon, 25 Nov 2013 16:25:08 +0000 (18:25 +0200)]
(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
one opcode fail and make the end user retry, rather than have a
greedy way that locks all instances to resolve this. Since synnefo
does not use nodegroups, locking all instances is the same with
locking instances on default nodegroup.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

9 years agoAdd a test for parsing version strings
Klaus Aehlig [Tue, 29 Apr 2014 11:43:35 +0000 (13:43 +0200)]
Add a test for parsing version strings

...even in the presence of patch levels.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

9 years agoSet correct Ganeti version on setup commands
Klaus Aehlig [Tue, 29 Apr 2014 09:13:42 +0000 (11:13 +0200)]
Set correct Ganeti version on setup commands

When asked to execute a setup command, prefix it with
a command sequence to test for the existence of the
needed Ganeti version and switching to it.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

9 years agoAdd a utility to combine shell commands
Klaus Aehlig [Mon, 28 Apr 2014 16:20:45 +0000 (18:20 +0200)]
Add a utility to combine shell commands

Add a function that combines individual shell commands into
a single command (calling the standard shell) that executes
the given commands in sequence while they succeed.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

10 years agoAdd design doc for performance tests
Thomas Thrainer [Wed, 16 Apr 2014 12:40:21 +0000 (14:40 +0200)]
Add design doc for performance tests

This design doc describes which tests are added in order to test the
performance of Ganeti, specifically when handling multiple jobs in
parallel.

Note that this design doc is submitted to stable-2.10 so performance
changes over different Ganeti versions can be captured.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

10 years agoMerge branch 'stable-2.9' into stable-2.10
Klaus Aehlig [Fri, 25 Apr 2014 14:41:33 +0000 (16:41 +0200)]
Merge branch 'stable-2.9' into stable-2.10

* stable-2.9
  If Automake version > 1.11, force serial tests

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoIf Automake version > 1.11, force serial tests
Petr Pudlak [Fri, 25 Apr 2014 13:53:33 +0000 (15:53 +0200)]
If Automake version > 1.11, force serial tests

This fixes broken compilation on Debian Jessie (#802).
See also http://stackoverflow.com/questions/15820844/

Thanks to Apollon Oikonomopoulos for finding the solution
and Klaus Aehlig for helping to do it conditionally.

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoFix failed DRBD disk creation cleanup
Hrvoje Ribicic [Thu, 24 Apr 2014 16:53:10 +0000 (16:53 +0000)]
Fix failed DRBD disk creation cleanup

When creating a DRBD disk, Ganeti reserves minor numbers on a per-node
basis. In case of a failed disk creation, these reservations should be
released. During the name/uuid refactoring, the invocation of the
function that releases the minors was not updated, resulting in no
minors being released in case of a DRBD disk creation failure.
Ganeti's verification utilities catch this error and rightly complain.
This patch fixes the issue by providing the UUID and not the name.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoFix lint errors introduced during cherry-pick
Thomas Thrainer [Wed, 23 Apr 2014 07:25:58 +0000 (09:25 +0200)]
Fix lint errors introduced during cherry-pick

Calm a few lint errors introduced during cherry-picking code in
qa_job_utils.py. The fixes were intentionally made in a way which should
produce merge conflicts later on, so it's not forgotten to undo them.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoHooking up verification for shared file storage
Helga Velroyen [Tue, 22 Apr 2014 11:00:35 +0000 (13:00 +0200)]
Hooking up verification for shared file storage

As for the cluster modify, it was also forgotten to
hook up the verification of the shared file storage
paths despite all infrastructure was done already.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoFix --shared-file-storage-dir option of gnt-cluster modify
Helga Velroyen [Tue, 22 Apr 2014 10:51:07 +0000 (12:51 +0200)]
Fix --shared-file-storage-dir option of gnt-cluster modify

While all infrastructure to make shared-file storage
runtime-configurable was already submitted, the actual
setting of the path was forgotten. This patch fixes it.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoClarify default setting of 'metavg'
Helga Velroyen [Tue, 22 Apr 2014 11:23:50 +0000 (13:23 +0200)]
Clarify default setting of 'metavg'

This fixes issue 810, suggesting to clarify where the
default for 'metavg' comes from.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

10 years agoFix invocation of GetCommandOutput in QA
Thomas Thrainer [Thu, 17 Apr 2014 08:59:34 +0000 (10:59 +0200)]
Fix invocation of GetCommandOutput in QA

The cherry-picked function _GetOutputFromMaster() calls
GetCommandOutput() with parameters only present in newer Ganeti
branches. Remove those parameters as they cause errors in stable-2.10.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoClean up RunWithLocks
Thomas Thrainer [Wed, 16 Apr 2014 15:07:30 +0000 (17:07 +0200)]
Clean up RunWithLocks

This patch cleans RunWithLocks up a little bit by reducing the number
of delay function terminations, and using the QAThread class to ensure
exceptions are thrown at the right time and in the right place.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

(cherry picked from commit 9558c2a4fc9eee309d56a6a84cc2a5935054dd1e)

10 years agoAdd an exception-trapping thread class
Thomas Thrainer [Wed, 16 Apr 2014 15:07:09 +0000 (17:07 +0200)]
Add an exception-trapping thread class

To have better control over threads, this patch adds a helper Thread
subclass which captures any exceptions occurring for later use.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

(cherry picked from commit e677d5e8e1c0ea7ef24e78f9ae842c9371449a77)

10 years agoWait for delay to provide interruption information
Thomas Thrainer [Wed, 16 Apr 2014 15:06:50 +0000 (17:06 +0200)]
Wait for delay to provide interruption information

The RunWithLocks test assumed that gnt-debug delay would have the info
needed for interruption ready immediately after being run, and in some
situations this is not the case. This patch makes the test more patient
and forgiving by retrying a number of times.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

(cherry picked from commit fbab1c76fbf3e84aeb82ed28be7d30a491de3718)

10 years agoAdd an expected block option to RunWithLocks
Thomas Thrainer [Wed, 16 Apr 2014 15:06:19 +0000 (17:06 +0200)]
Add an expected block option to RunWithLocks

To compensate for the cases where a QA test is supposed to block when
a lock is present, add an additional option showing whether blocking is
supposed to happen or not.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

(cherry picked from commit 57efdaf53a4d40a39befaa7e9a5ce9ff72063523)

Conflicts:
qa/qa_rapi.py (didn't backport changes to this file)

10 years agoTrack if a QA test was blocked by locks
Thomas Thrainer [Wed, 16 Apr 2014 15:05:46 +0000 (17:05 +0200)]
Track if a QA test was blocked by locks

This patch adds threading to the RunWithTests function, allowing one
thread to execute the QA test, and the other to monitor if it is being
blocked by locks set up during the test. If it is, terminate the
blocking job, and let the QA continue, reporting the test failure at
the very end.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

(cherry picked from commit 34c5ec6c78aa164eebb4ad6cfc14b38e81aad8ec)

10 years agoAdd a RunWithLocks QA utility function
Thomas Thrainer [Wed, 16 Apr 2014 15:04:54 +0000 (17:04 +0200)]
Add a RunWithLocks QA utility function

This patch adds a QA utility function that acquires a set of locks, and
attempts to run a given function with the locks in place. Should the
given function block, this function does not detect this - later
patches will address the issue.

An example of its use is provided by having the move-instance test
modified to use it.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

(cherry picked from commit 343c9ed28a48e0056cade771046fdc6b046aed7d)

Conflicts:
qa/qa_rapi.py (didn't backport changes to this file)

10 years agoMerge branch 'stable-2.9' into stable-2.10
Klaus Aehlig [Tue, 15 Apr 2014 16:11:35 +0000 (18:11 +0200)]
Merge branch 'stable-2.9' into stable-2.10

* stable-2.9
  Set exclusion tags correctly in requested instance
  Export extractExTags and updateExclTags
  Document spindles in the hbal man page
  Sample logrotate conf breaks permissions with split users

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>

10 years agoSet exclusion tags correctly in requested instance
Klaus Aehlig [Tue, 15 Apr 2014 14:49:51 +0000 (16:49 +0200)]
Set exclusion tags correctly in requested instance

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>

10 years agoExport extractExTags and updateExclTags
Klaus Aehlig [Tue, 15 Apr 2014 14:00:22 +0000 (16:00 +0200)]
Export extractExTags and updateExclTags

...from the htools Loader. These functions are needed when
parsing the requested instance of an allocator request.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>

10 years agoFix 'gnt-cluster' and 'gnt-node list-storage' outputs
Jose A. Lopes [Tue, 15 Apr 2014 11:13:45 +0000 (13:13 +0200)]
Fix 'gnt-cluster' and 'gnt-node list-storage' outputs

* Update table for 'gnt-node list-storage'
* Add newline between description and the actual command in 'gnt-cluster version'

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoDocument spindles in the hbal man page
Klaus Aehlig [Mon, 14 Apr 2014 15:26:59 +0000 (17:26 +0200)]
Document spindles in the hbal man page

When spindles were introduced as a resource, they were also
used in the computation of the cluster metric. Document this.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>

10 years agoPostpone 2.10.3 release to Wednesday, 16th
Thomas Thrainer [Mon, 14 Apr 2014 13:19:19 +0000 (15:19 +0200)]
Postpone 2.10.3 release to Wednesday, 16th

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

10 years agoSample logrotate conf breaks permissions with split users
Jose A. Lopes [Mon, 14 Apr 2014 12:52:34 +0000 (14:52 +0200)]
Sample logrotate conf breaks permissions with split users

The sample logrotate configuration file
(doc/examples/ganeti.logrotate) contains the following line

  create 640 root root

which is fine if Ganeti if configured without split users.  However,
this will change permissions and ownership of log files if Ganeti is
configured with split users enabled.  By removing this line, logrotate
will preserve the permissions of the logfiles when rotating the logs.

This fixes issue 789.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

10 years agoRevision bump for 2.10.3
Thomas Thrainer [Thu, 10 Apr 2014 08:54:26 +0000 (10:54 +0200)]
Revision bump for 2.10.3

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

10 years agoUpdate NEWS file for 2.10.3
Thomas Thrainer [Thu, 10 Apr 2014 08:53:19 +0000 (10:53 +0200)]
Update NEWS file for 2.10.3

Set the release date to Monday, April 14th.
Mention changes made since 2.10.2.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

10 years agoWarn in UPGRADE about not tar'ing exported insts
Thomas Thrainer [Thu, 10 Apr 2014 10:35:59 +0000 (12:35 +0200)]
Warn in UPGRADE about not tar'ing exported insts

The /var/lib/ganeti directory contains per default also the export
directory, which holds exported instances. Warn in UPGRADE in the backup
step about (potentially) excluding those exports from the backup.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoFix non-running test and remove custom_nicparams rename
Hrvoje Ribicic [Wed, 9 Apr 2014 16:15:06 +0000 (16:15 +0000)]
Fix non-running test and remove custom_nicparams rename

Due to a missing base class, the test that was supposed to check if
RAPI instance parameter renames during modifications are working did
not execute. As the instances are not covered by the QA tests, the
tests failed to show that custom nicparams cannot actually be set
through RAPI at the time. Given that the instance interface is
asymmetric beyond simple repairs, this is fine in 2.10. This patch
sets the test to execute, removes the setting of custom_nicparams in
the test, and removes the renaming of the param in the RAPI request.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoAccount for NODE_RES lock in opportunistic locking
Hrvoje Ribicic [Tue, 8 Apr 2014 11:33:53 +0000 (11:33 +0000)]
Account for NODE_RES lock in opportunistic locking

This patch extends the opportunistic locking to take both the
NODE_RES and NODE locks into account when selecting nodes to be used
by the iallocator.

Signed-off-by: Gerard Oskamp <gjo@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

10 years agoFix request flooding of noded during disk sync
Thomas Thrainer [Tue, 8 Apr 2014 08:15:36 +0000 (10:15 +0200)]
Fix request flooding of noded during disk sync

If a user manually pauses the DRBD sync, Ganeti started to poll the node
daemon without any waiting between request. This caused heavy load on
the node. This patch fixes this by waiting at least 5 secondes between
two polls if no sensible estimate for the remaining sync time could be
made.

Fixes issue 792

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

10 years agoMerge branch 'stable-2.9' into stable-2.10
Hrvoje Ribicic [Tue, 8 Apr 2014 10:54:54 +0000 (12:54 +0200)]
Merge branch 'stable-2.9' into stable-2.10

* stable-2.9
  Allow QA asserts to produce more messages
  Add messages about skipped QA disk template tests
  Fix list-drbd QA test
  Update installation guide wrt to DRBD version
  Update NEWS for 2.9.6
  Revision bump for 2.9.6

Conflicts:
NEWS - Combined both news files
configure.ac - Took the 2.10 version numbers

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoRevision bump for 2.9.6
Klaus Aehlig [Mon, 7 Apr 2014 10:48:01 +0000 (12:48 +0200)]
Revision bump for 2.9.6

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

10 years agoUpdate NEWS for 2.9.6
Klaus Aehlig [Mon, 7 Apr 2014 10:47:44 +0000 (12:47 +0200)]
Update NEWS for 2.9.6

Describe all the changes to Ganeti made since the
2.9.5 release. Also set the release date.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

10 years agoUpdate installation guide wrt to DRBD version
Helga Velroyen [Fri, 4 Apr 2014 10:58:57 +0000 (12:58 +0200)]
Update installation guide wrt to DRBD version

This patch updates the supported DRBD version number to
8.4.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

10 years agoFix list-drbd QA test
Hrvoje Ribicic [Sun, 30 Mar 2014 17:08:07 +0000 (19:08 +0200)]
Fix list-drbd QA test

The list-drbd QA test assumed falsely that no instance has more than
one disk. This can happen, and this patch accounts for it.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoAdd messages about skipped QA disk template tests
Hrvoje Ribicic [Thu, 3 Apr 2014 11:14:27 +0000 (11:14 +0000)]
Add messages about skipped QA disk template tests

When disk templates were ignored in the QA, no messages were emitted,
in contrast to pretty much all tests. To make it easier to see why
a test was not executed, this patch performs a minor refactoring and
adds some output for the templates.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoAllow QA asserts to produce more messages
Hrvoje Ribicic [Thu, 3 Apr 2014 11:11:56 +0000 (11:11 +0000)]
Allow QA asserts to produce more messages

This patch adds a tiny helper function that allows error messages
output by the QA asserts to be prefixed with whatever the user
supplies.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoKVM: use running HVPs to calc blockdev options
Apollon Oikonomopoulos [Fri, 28 Mar 2014 16:07:53 +0000 (18:07 +0200)]
KVM: use running HVPs to calc blockdev options

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: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoKVM: reserve a PCI slot for the SCSI controller
Apollon Oikonomopoulos [Fri, 28 Mar 2014 18:29:17 +0000 (20:29 +0200)]
KVM: reserve a PCI slot for the SCSI controller

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: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoCheck for LVM-based verification results only when enabled
Helga Velroyen [Tue, 1 Apr 2014 08:47:34 +0000 (10:47 +0200)]
Check for LVM-based verification results only when enabled

This patch fixes a little glitch in 'gnt-cluster verify'.
If LVM-based storage was disabled, it would still check
LVM-related verification results and print a confusing
error message.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoFix "existing" typos
Helga Velroyen [Tue, 1 Apr 2014 08:28:14 +0000 (10:28 +0200)]
Fix "existing" typos

This patch fixes the wording of a couple of messages,
including two typos of the word 'existing'.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

10 years agoFix output of gnt-instance info after migration
Thomas Thrainer [Tue, 1 Apr 2014 07:41:43 +0000 (09:41 +0200)]
Fix output of gnt-instance info after migration

After migrating a DRBD based instance, the output of gnt-instance info
was wrong wrt. DRBD minors. This patch fixes the output in such cases.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

10 years agoVerify configuration version number before parsing
Klaus Aehlig [Mon, 31 Mar 2014 12:11:04 +0000 (14:11 +0200)]
Verify configuration version number before parsing

As the attempt to convert the dict used as json representation
of the configuration into a configuration object already makes
assumptions about the internal representation, verify the version
before such an attempt. Fixes issue 783.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

10 years agoMerge branch 'stable-2.9' into stable-2.10
Hrvoje Ribicic [Thu, 27 Mar 2014 16:19:45 +0000 (16:19 +0000)]
Merge branch 'stable-2.9' into stable-2.10

* stable-2.9
  Fix failing gnt-node list-drbd command

* stable-2.8
  Add reason parameter to RAPI client functions

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

Conflicts:
lib/rapi/client.py: Add both parameters

10 years agoMerge branch 'stable-2.8' into stable-2.9
Hrvoje Ribicic [Thu, 27 Mar 2014 16:01:42 +0000 (17:01 +0100)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8
  Add reason parameter to RAPI client functions

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoFix failing gnt-node list-drbd command
Hrvoje Ribicic [Thu, 27 Mar 2014 11:37:36 +0000 (11:37 +0000)]
Fix failing gnt-node list-drbd command

The UUID/name switch avoided this particular bit of code, and as a
result the list-drbd command failed as it tried to compare UUIDs and
names. This patch fixes the retrieval, converts the newly returned
UUIDs to names, and modifies the QA to the results and not only the
invocation are checked.

Signed-off-by: Gerard Oskamp <gjo@google.com>
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

10 years agoFix specification of TIDiskParams
Klaus Aehlig [Mon, 3 Feb 2014 16:50:11 +0000 (17:50 +0100)]
Fix specification of TIDiskParams

Commit 580b1fdd incorrectly assumes that disk parameters are
just the standard ones, whereas the man page explicitly states
that additional parameters can be passed as well, if they make
sense for the chosen storage type. Fix this.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

Cherry-picked from b26a275a0. Fixes issue 779.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

10 years agoAdd unittests for instance modify parameter renaming
Hrvoje Ribicic [Wed, 26 Mar 2014 10:43:59 +0000 (10:43 +0000)]
Add unittests for instance modify parameter renaming

The get/put QA test could be used for instances as well, but unlike
other objects, instances have a very large number of discrepancies and
missing fields. To avoid enumerating every discrepancy and testing
almost nothing, only a unit test is used to verify the last patch.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoAdd renaming of instance custom params
Hrvoje Ribicic [Tue, 25 Mar 2014 14:28:44 +0000 (14:28 +0000)]
Add renaming of instance custom params

Much like the groups before, this patch allows custom_* params to be
submitted under the same name they can be retrieved as in the info
call.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoAdd RAPI symmetry tests for groups
Hrvoje Ribicic [Mon, 24 Mar 2014 19:57:05 +0000 (19:57 +0000)]
Add RAPI symmetry tests for groups

This patch invokes the RAPI symmetry tests for groups.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoExtend RAPI symmetry tests with RAPI-only aliases
Hrvoje Ribicic [Mon, 24 Mar 2014 19:53:36 +0000 (19:53 +0000)]
Extend RAPI symmetry tests with RAPI-only aliases

This patch allows users to specify specific parameter aliases enabled
by RAPI, and test whether their value can be retrieved and set.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoAdd test for group custom parameter renaming
Hrvoje Ribicic [Tue, 25 Mar 2014 15:19:32 +0000 (15:19 +0000)]
Add test for group custom parameter renaming

This patch introduces a simple test checking if a custom_* parameter is
renamed and passed to the opcode correctly.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoAdd renaming of group custom ndparams, ipolicy, diskparams
Hrvoje Ribicic [Mon, 24 Mar 2014 19:49:37 +0000 (19:49 +0000)]
Add renaming of group custom ndparams, ipolicy, diskparams

This patch adds the ability to set the group-specific parameters in the
same way they are described when returned by the info command - with
the "custom_" prefix.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoAdd the RAPI symmetry test for nodes
Hrvoje Ribicic [Mon, 24 Mar 2014 16:23:02 +0000 (16:23 +0000)]
Add the RAPI symmetry test for nodes

This patch adds the RAPI symmetry test for nodes.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoAdd aliases for nodes
Hrvoje Ribicic [Mon, 24 Mar 2014 16:21:35 +0000 (16:21 +0000)]
Add aliases for nodes

This patch adds a single alias for the secondary_ip property of the
node.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoAllow choice of HTTP method for modification
Hrvoje Ribicic [Mon, 24 Mar 2014 16:15:50 +0000 (17:15 +0100)]
Allow choice of HTTP method for modification

The original design of the RAPI symmetry test assumed that all RAPI
calls that modify parameters use the PUT method. This is not true in
the case of the node parameter modification method, and while that
itself should be addressed or at least examined, the test method has
to change to accomodate both PUT and POST requests.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoAdd cluster RAPI symmetry test
Hrvoje Ribicic [Mon, 24 Mar 2014 11:57:53 +0000 (11:57 +0000)]
Add cluster RAPI symmetry test

This patch adds the test for RAPI symmetry at the cluster level. There
are some fields that have not been exposed yet, and their absence was
noted.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoFix failing cluster query test
Hrvoje Ribicic [Tue, 25 Mar 2014 12:14:51 +0000 (12:14 +0000)]
Fix failing cluster query test

This patch makes a mock use a dictionary instead of an object, allowing
alias finding to work on it.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoAdd aliases for cluster parameters
Hrvoje Ribicic [Mon, 24 Mar 2014 15:15:42 +0000 (15:15 +0000)]
Add aliases for cluster parameters

This patch adds aliases for two cluster parameters.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoAdd support for value aliases to RAPI
Hrvoje Ribicic [Tue, 25 Mar 2014 17:46:41 +0000 (17:46 +0000)]
Add support for value aliases to RAPI

This patch extends the metaclass used to generate RAPI handlers to
allow creating aliases of certain values returned by GET methods.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoProvide tests for GET/PUT symmetry
Hrvoje Ribicic [Mon, 24 Mar 2014 10:06:32 +0000 (11:06 +0100)]
Provide tests for GET/PUT symmetry

The RAPI should allow all the parameters of objects to be gotten and
set under the same names. This patch adds a test that checks if this is
the case by using the underlying opcode arguments.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoSort imports
Hrvoje Ribicic [Mon, 24 Mar 2014 10:26:36 +0000 (10:26 +0000)]
Sort imports

This patch does some housecleaning and sorts imports.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoAdd reason parameter to RAPI client functions
Michele Tartara [Wed, 26 Mar 2014 13:20:28 +0000 (14:20 +0100)]
Add reason parameter to RAPI client functions

Only the functions for starting, stopping and rebooting a VM had a reason
parameter. Now, all the RAPI client functions generating opcodes do.

Also, one test is expanded to verify that a RAPI request with both body and
query supports the reason parameter properly.

Fixes Issue 776.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

10 years agoAlso consider filter fields for deciding if using live data
Klaus Aehlig [Tue, 7 Jan 2014 17:27:37 +0000 (18:27 +0100)]
Also consider filter fields for deciding if using live data

If the query fields don't require live data, we use the shortcut
and don't request live data. However, we cannot take this shortcut
if the fields the filter depends on requires live data.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

Cherry-picked from a8551d9c.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

10 years agoDocument the python-fdsend dependency
Apollon Oikonomopoulos [Wed, 26 Mar 2014 09:26:25 +0000 (11:26 +0200)]
Document the python-fdsend dependency

KVM NIC hotplugging requires python-fdsend to be installed, but this
is only reported in the hotplug design document. We add mentions in
INSTALL and NEWS.

Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoMerge branch 'stable-2.9' into stable-2.10
Klaus Aehlig [Mon, 24 Mar 2014 13:28:38 +0000 (14:28 +0100)]
Merge branch 'stable-2.9' into stable-2.10

* stable-2.9
  Make watcher submit queries low priority

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoMake watcher submit queries low priority
Klaus Aehlig [Mon, 24 Mar 2014 12:37:41 +0000 (13:37 +0100)]
Make watcher submit queries low priority

Make the watcher collect its data using low-priority jobs,
to avoid blocking user/admin jobs. Note that repair jobs are
still submitted normal priority. Fixes issue 772.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

10 years agoBump version to 2.10.2
Thomas Thrainer [Thu, 20 Mar 2014 09:28:19 +0000 (10:28 +0100)]
Bump version to 2.10.2

Change the release version to 2.10.2 in configure.ac.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoPrepare NEWS file for 2.10.2
Thomas Thrainer [Thu, 20 Mar 2014 09:26:47 +0000 (10:26 +0100)]
Prepare NEWS file for 2.10.2

Mention all relevant changes / fixes which go into this release.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoAllow releases scheduled 5 days in advance
Thomas Thrainer [Thu, 20 Mar 2014 09:24:32 +0000 (10:24 +0100)]
Allow releases scheduled 5 days in advance

With the really slow QA's it makes sense to schedule releases more than
3 days in advance, like in this case where the release on Monday is
scheduled on Thursday.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoMerge branch 'stable-2.9' into stable-2.10
Thomas Thrainer [Thu, 20 Mar 2014 09:01:48 +0000 (10:01 +0100)]
Merge branch 'stable-2.9' into stable-2.10

* stable-2.8
  Include qa/patch in Makefile
  Handle empty patches better
  Move message formatting functions to separate file
  Add optional ordering of QA patch files
  Allow multiple QA patches
  Refactor current patching code

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoMerge branch 'stable-2.8' into stable-2.9
Thomas Thrainer [Thu, 20 Mar 2014 08:35:52 +0000 (09:35 +0100)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8
  Include qa/patch in Makefile
  Handle empty patches better
  Move message formatting functions to separate file
  Add optional ordering of QA patch files
  Allow multiple QA patches
  Refactor current patching code

Conflicts:
Makefile.am (include all added files)
qa/qa_cluster.py (trivial)

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoInclude qa/patch in Makefile
Thomas Thrainer [Thu, 20 Mar 2014 07:54:02 +0000 (08:54 +0100)]
Include qa/patch in Makefile

Fix the build by including the qa/patch directory in Makefile.am.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoHandle empty patches better
Hrvoje Ribicic [Wed, 19 Mar 2014 11:40:43 +0000 (11:40 +0000)]
Handle empty patches better

The previous patch loading utilities omitted empty patches, as they
were thought to be of no significance, and when no patches were used,
the import and therefore dependency should not be used. If a user has
added an empty patch file, and made an entry in the order file, the QA
would treat this as an error as it had no means of differentiating
between a patch not present and an empty patch.

This patch fixes the solution by better handling empty patches, and
logging warnings when they are encountered.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoMove message formatting functions to separate file
Hrvoje Ribicic [Wed, 19 Mar 2014 11:37:29 +0000 (11:37 +0000)]
Move message formatting functions to separate file

The formatting functions in qa_utils.py cannot be used by modules
imported there, such as qa_config. This patch factors the function
calls into a separate file. Also reorders imports in touched files.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>