ganeti-github.git
4 years agoImprove RAPI section on security
Hrvoje Ribicic [Thu, 10 Dec 2015 13:22:01 +0000 (14:22 +0100)]
Improve RAPI section on security

The RAPI section on security has been improved with new information
related on how users can lock RAPI down as they see fit, and what are
the risks involved with default settings.

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

5 years agoQA: Ensure the DRBD secret is not retrievable via RAPI
Hrvoje Ribicic [Fri, 27 Nov 2015 17:32:42 +0000 (17:32 +0000)]
QA: Ensure the DRBD secret is not retrievable via RAPI

The best way to ensure that the DRBD secret does not inadvertently leak
is to introduce a QA test examining the output of the interface in
which the leak was originally introduced.

The test added determines the DRBD secret and makes RAPI requests,
examining them for its presence and failing if a match is found.

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

5 years agoRedact the DRBD secret in instance queries
Hrvoje Ribicic [Fri, 27 Nov 2015 15:58:13 +0000 (15:58 +0000)]
Redact the DRBD secret in instance queries

As the DRBD secret should be used only by Ganeti internals, replacing
the actual secret with None does not hamper Ganeti's work, while
preventing the secret from being leaked.

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

5 years agoDo not attempt to use the DRBD secret in gnt-instance info
Hrvoje Ribicic [Fri, 21 Aug 2015 19:46:18 +0000 (19:46 +0000)]
Do not attempt to use the DRBD secret in gnt-instance info

... so just redact what is output.

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

5 years agoUpdate harep's man page to notify users of its limitations
Petr Pudlak [Tue, 29 Sep 2015 12:04:11 +0000 (14:04 +0200)]
Update harep's man page to notify users of its limitations

In particular that it works only for 'drbd' and 'plain', and that it
doesn't perform hardware failure detection, which are both common user
expectations.

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

5 years agoDocument quoting of special values in key-value parameters
Klaus Aehlig [Tue, 1 Sep 2015 13:23:41 +0000 (15:23 +0200)]
Document quoting of special values in key-value parameters

Since the early days of Ganeti, it is possible to pass in key-value
parameters also some special non-string values (the two boolean values
True and False and the special value None). However, the syntax for
entering them was never properly documented confusing people who had
to pass one of those values. So document it now.

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

5 years agoreplace-disks: fix --ignore-ipolicy
Apollon Oikonomopoulos [Mon, 31 Aug 2015 14:20:36 +0000 (17:20 +0300)]
replace-disks: fix --ignore-ipolicy

CheckTargetNodeIPolicy was expecting an LU, but got a Tasklet instead.
This caused gnt-instance replace-disks --ignore-ipolicy to fail with a
"'TLReplaceDisks' object has no attribute 'LogWarning'" message in the
presence policy-related warnings. We fix this by passing the calling LU
to CheckTargetNodeIPolicy.

Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

5 years agoStop MonD when removing a node from a cluster
Petr Pudlak [Thu, 26 Feb 2015 14:24:28 +0000 (15:24 +0100)]
Stop MonD when removing a node from a cluster

Currently if we remove a node from a cluster, or destroy a cluster, the
daemon is still running.

The non-master daemons are stopped in 'LeaveCluster', so add stopping
MonD there as well.

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

5 years agoFix file descriptor leak in Confd Client
Klaus Aehlig [Thu, 12 Feb 2015 13:40:37 +0000 (14:40 +0100)]
Fix file descriptor leak in Confd Client

The queryOneServer function opens a UDP socket to connect
to the specified confd server. However, it would never
close it. Fix this and do so in a bracket construction
to make sure it also gets cleaned up in case of errors.

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

5 years agoFix hlint warnings found by hlint 1.9.11
Niklas Hambuechen [Fri, 7 Nov 2014 23:09:23 +0000 (00:09 +0100)]
Fix hlint warnings found by hlint 1.9.11

Our current hlint version cannot find them yet.

Signed-off-by: Niklas Hambuechen <niklash@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

Cherry-picked-from: d05f1c86fcca10d2a52cfdcf538e8bfaf517f655

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

6 years agoGaneti.Daemon: always install SIGHUP handler github/stable-2.9
Apollon Oikonomopoulos [Mon, 29 Sep 2014 14:41:38 +0000 (17:41 +0300)]
Ganeti.Daemon: always install SIGHUP handler

Install the SIGHUP handler regardless of the daemonization status. This
fixes issue #755.

Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

6 years agoMake ganeti-cleaner switch to a save working directory
Klaus Aehlig [Tue, 15 Jul 2014 09:40:52 +0000 (11:40 +0200)]
Make ganeti-cleaner switch to a save working directory

For some reason, find does stat the current working directory,
which, when invoked via cron, may or may not be readable by the
process (issue 880). Therefore, first change to a directory that
is definitely accessible to the process; the directory it logs
into is such a safe place.

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

6 years agoPush return out of genericResult
Klaus Aehlig [Mon, 7 Jul 2014 13:38:42 +0000 (15:38 +0200)]
Push return out of genericResult

...and merge with '<-' to get a pure computation
outside the monad.

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

6 years agoMake htools tolerate missing "spfree" on luxi
Klaus Aehlig [Mon, 7 Jul 2014 12:58:44 +0000 (14:58 +0200)]
Make htools tolerate missing "spfree" on luxi

If a cluster allows sharedfile as only disk template, the
amount of free spindles might not be available. This is
perfectly normal, hence the luxi backend of htools should
handle this case gracefully and just report 0 available spindles.

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

6 years agoMove the design for query splitting to the implemented list
Petr Pudlak [Fri, 4 Jul 2014 13:14:13 +0000 (15:14 +0200)]
Move the design for query splitting to the implemented list

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

6 years agoAdd tests for DRBD setups with empty first resource
Apollon Oikonomopoulos [Fri, 4 Jul 2014 09:38:26 +0000 (12:38 +0300)]
Add tests for DRBD setups with empty first resource

Add a DRBD 8.4 configuration with the first resource empty, together
with the relevant Haskell and Python tests.

Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

6 years agoMerge branch 'stable-2.8' into stable-2.9
Klaus Aehlig [Fri, 4 Jul 2014 10:55:29 +0000 (12:55 +0200)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8
  DRBD parser: consume initial empty resource lines

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

6 years agoDRBD parser: consume initial empty resource lines stable-2.8 github/stable-2.8
Apollon Oikonomopoulos [Fri, 4 Jul 2014 09:20:17 +0000 (12:20 +0300)]
DRBD parser: consume initial empty resource lines

When a DRBD resource is taken down, its minor number is freed and its
place in /proc/drbd is taken by an empty line. Currently the parser is
able to consume any empty lines appearing inside the resource stanza,
but cannot handle the first resource being empty.

We fix this by consuming all EOL characters appearing before the device
number. A test for this case should also be added.

This fixes issue #869.

Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

6 years agoMerge branch 'stable-2.8' into stable-2.9
Hrvoje Ribicic [Tue, 3 Jun 2014 15:42:51 +0000 (15:42 +0000)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8:
  Fix QA patching functionality

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

6 years agoFix QA patching functionality
Hrvoje Ribicic [Tue, 3 Jun 2014 11:54:48 +0000 (13:54 +0200)]
Fix QA patching functionality

This patch clarifies the code a bit and fixes a bug preventing QA
patches from working.

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

6 years agoImprove haskell style
Klaus Aehlig [Tue, 20 May 2014 13:41:49 +0000 (15:41 +0200)]
Improve haskell style

...by fixing lint warnings found by HLint v1.8.57. In particular,
make sure 'make hlint' passes for this version of hlint.

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

6 years agocheck-man-warnings: use C.UTF-8 and set LC_ALL
Apollon Oikonomopoulos [Fri, 16 May 2014 16:08:20 +0000 (19:08 +0300)]
check-man-warnings: use C.UTF-8 and set LC_ALL

check-man-warnings currently partially forces the en_US.UTF-8 locale by
setting LANG. This implicitly assumes that the locale exists, which
might not be the case when building e.g. in chroot environments. If the
locale does not exist, then check-man-warnings fails with the following
message:

 col: Invalid or incomplete multibyte or wide character
 man: command exited with status 1: col -b -p -x

Some distributions (at least Debian and derivatives) ship an embedded
C.UTF-8 locale with full unicode support. We prefer using C.UTF-8 if it
is available and fall back to en_US.UTF-8 otherwise. We also set LC_ALL
to the same locale, because if they remain unset (i.e. "C"), the same
behavior happens.

Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

6 years agoFix passing of ispecs in cluster init during QA
Thomas Thrainer [Wed, 14 May 2014 12:48:46 +0000 (14:48 +0200)]
Fix passing of ispecs in cluster init during QA

The ispecs were previously passed as multiple parameters to gnt-cluster
init, which did not yield the desired result. This patch changes this
behavior and passes the min/std/max values in one parameter.

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

(cherry picked from commit 6383059dd5afabe5445b12ba5d8609d0f13ba1b7)

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

6 years agoOn expanding jobs, extend reason trail
Klaus Aehlig [Wed, 14 May 2014 10:38:55 +0000 (12:38 +0200)]
On expanding jobs, extend reason trail

Certain op-codes expand to a set of jobs. For
those new jobs, extend their reason trail with
the reasons of the job that expanded to them.
In this way, also for indirectly genreated jobs
a complete trace back to the initiator can be
established.

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

6 years agoAdd LC_ALL=en_US.UTF-8 before running check-man-warnings
Yuto KAWAMURA(kawamuray) [Mon, 12 May 2014 15:34:38 +0000 (00:34 +0900)]
Add LC_ALL=en_US.UTF-8 before running check-man-warnings

It will be fail if LC_ALL was set to non-utf8 locale(e.g, 'C') by
following error.

    col: Invalid or incomplete multibyte or wide character
    man: command exited with status 1: col -b -p -x

Signed-off-by: Yuto KAWAMURA(kawamuray) <kawamuray.dadada@gmail.com>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

6 years agoKVM: set IFF_ONE_QUEUE on created tap interfaces
Apollon Oikonomopoulos [Tue, 6 May 2014 12:28:46 +0000 (15:28 +0300)]
KVM: set IFF_ONE_QUEUE on created tap interfaces

The IFF_ONE_QUEUE flag directs the kernel to only queue tap packets once
(as opposed to queueing them twice, once for the device, and once for the
qdisc), possibly avoiding interface stalls when one of the queues overruns.

This is the default behaviour of the kernel tun/tap driver in Linux
>= 3.8. Also, qemu >= 1.5.0 sets this flag when opening the tap device
itself (but not for tap interfaces inherited via fds), according to this
commit:

  commit d26e445c80fddcc7483b83f3115e5067fef28fe6
  Author: Peter Lieven <pl@dlhnet.de>
  Date:   Mon Feb 25 10:17:08 2013 +0100

      tap: set IFF_ONE_QUEUE per default

      historically the kernel queues packets two times. once
      at the device and second in qdisc. this is believed to cause
      interface stalls if one of these queues overruns.

      setting IFF_ONE_QUEUE is the default in kernels >= 3.8. the
      flag is ignored since then. see kernel commit
      5d097109257c03a71845729f8db6b5770c4bbedc

Signed-off-by: Peter Lieven <pl@kamp.de>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>

Since we handle tap creation ourselves, we duplicate this behavior in
_OpenTap. IFF_ONE_QUEUE has been there as far back as the kernel's git
history goes (2.6.12), so it is safe to add the flag unconditionally.
Also the flag is invisible to the guest and will not break migrations of
already running instances.

Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

6 years agoAdd configure option to pass GHC flags
Hrvoje Ribicic [Thu, 8 May 2014 10:32:15 +0000 (12:32 +0200)]
Add configure option to pass GHC flags

Adding the HEXTRA option to make might not be practical for a change
that should be always applied, e.g., hiding a certain package. This
patch allows the flags to be specified at the configure level.

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

6 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>

6 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>

6 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>

6 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>

6 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>

6 years agoRevision bump for 2.9.6 v2.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>

6 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>

6 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>

6 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>

6 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>

6 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>

6 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>

6 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>

6 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>

6 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>

6 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>

6 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>

6 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>

6 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>

6 years agoAdd optional ordering of QA patch files
Hrvoje Ribicic [Tue, 18 Mar 2014 20:46:06 +0000 (20:46 +0000)]
Add optional ordering of QA patch files

To explicitly specify the order of patches executed, the QA provides an
"order" file. It can contain names of patches that will be executed
first, and in the order listed, before all the other patches that still
follow an alphabetical order.

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

6 years agoAllow multiple QA patches
Hrvoje Ribicic [Tue, 18 Mar 2014 20:25:18 +0000 (20:25 +0000)]
Allow multiple QA patches

This patch allows support for multiple patches placed in the "patch"
directory, which are executed in alphabetical order.

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

6 years agoRefactor current patching code
Hrvoje Ribicic [Tue, 18 Mar 2014 19:57:46 +0000 (19:57 +0000)]
Refactor current patching code

* Refactors the current patch code to allow for multiple patches that
  can be applied, yet leaves only one for now.

* Rewords the message shown to the user in case the modules needed for
  patching are missing.

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

6 years agoFix error introduced during merge
Michele Tartara [Fri, 7 Mar 2014 17:26:44 +0000 (17:26 +0000)]
Fix error introduced during merge

A parameter was lost while resolving a conflict in the signature of a function.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

6 years agognt-cluster copyfile: accept relative paths
Klaus Aehlig [Fri, 7 Mar 2014 17:11:28 +0000 (18:11 +0100)]
gnt-cluster copyfile: accept relative paths

If, on the command line, the argument to gnt-cluster copyfile is
a relative path, consider this a shorthand for the corresponding
absolute path.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

6 years agoMerge branch 'origin/stable-2.8' into stable-2.9
Michele Tartara [Fri, 7 Mar 2014 15:28:54 +0000 (15:28 +0000)]
Merge branch 'origin/stable-2.8' into stable-2.9

* stable-2.8
  Improve RAPI detection of the watcher
  Add patching QA configuration files on buildbots
  Enable a timeout for instance shutdown
  Allow KVM commands to have a timeout
  Allow xen commands to have a timeout
  Fix wrong docstring

Conflicts:
lib/hypervisor/hv_xen.py
test/py/ganeti.hypervisor.hv_xen_unittest.py

Resolution:
  The conflicts were due to a new mandatory parameter hvparams being added
  (in 2.9) to the same functions that received the optional timeout parameter
  (in 2.8). They were resolved by keeping the hvparams in its place, and
  enqueuing the timeout parameter after it.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

6 years agoImprove RAPI detection of the watcher
Michele Tartara [Fri, 7 Mar 2014 13:59:49 +0000 (13:59 +0000)]
Improve RAPI detection of the watcher

If the watcher is not allowed to access RAPI, it doesn't mean that it is dead
and needs to be restarted.

Fixes Issue 752.

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

6 years agoAdd patching QA configuration files on buildbots
Petr Pudlak [Thu, 21 Nov 2013 14:06:41 +0000 (15:06 +0100)]
Add patching QA configuration files on buildbots

In order to work, it is necessary:
* Write a JSON Patch to file "qa/qa-patch.json" in a source repository.
  (And be careful not to commit it!) The file must conform to RFC6902
  and describes what changes should be done to the QA JSON
  configuration. This is simple as
   [
     { "op": "add",
       "path": "default",
       "value": false },
     { "op": "add",
       "path": "/tests/instance-add-file",
       "value": true }
   ]

* Install "jsonpatch" and "jsonpointer" modules on the machines QA is
  running on. Either using "easy_install" or as Debian packages using
  "pypi-install".

QA only loads the modules if the patch file is present and non-empty.
Therefore no changes to buildbots are needed, if the feature is not
used.

It's advisable to add a git pre-commit hook for the main repository to
prevent changes to "qa/patch.json", keeping it to "[]". Suggestion for
such a hook:

  # Exit code 1 if the patch file isn't just "[]":
  python -c 'import json, sys; \
    exit(0 if json.load(open("qa/qa-patch.json", "r")) == [] else 1)'

Locally it's possible to tell git not to track changes to the file at
all (see https://help.github.com/articles/ignoring-files):

  git update-index --assume-unchanged qa/qa-patch.json

Cherry-pick of e5398c3afde43e9165e96ab5cc8e0426519ad8ad from stable-2.11.

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

6 years agoEnable a timeout for instance shutdown
Michele Tartara [Fri, 7 Mar 2014 09:50:33 +0000 (10:50 +0100)]
Enable a timeout for instance shutdown

Add the timeout parameter to the StopInstance function of the hypervisor base
class and to all its implementations.

Also, change the tests as required by this change.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

6 years agoAllow KVM commands to have a timeout
Michele Tartara [Fri, 7 Mar 2014 09:47:38 +0000 (10:47 +0100)]
Allow KVM commands to have a timeout

Modify the function that sends commands to the KVM monitor so that it is
possible to specify an optional timeout after which the command is killed.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

6 years agoAllow xen commands to have a timeout
Michele Tartara [Fri, 7 Mar 2014 09:46:02 +0000 (10:46 +0100)]
Allow xen commands to have a timeout

Modify the function that runs Xen commands so that it is possible to specify an
optional timeout after which the command is killed.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

6 years agoFix wrong docstring
Michele Tartara [Fri, 7 Mar 2014 09:22:29 +0000 (10:22 +0100)]
Fix wrong docstring

Fields must be the final elements in an epytext string.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

6 years agoMake gnt-debug locks display fake job locks properly
Hrvoje Ribicic [Tue, 25 Feb 2014 16:28:59 +0000 (16:28 +0000)]
Make gnt-debug locks display fake job locks properly

When a job is dependent on other jobs, a fake lock is created whose
pending entry contains a list of job ids waiting on the job. gnt-debug
locks did not expect the job ids to be ints, crashing when encountering
them. This patch fixes the situation by forcing a string cast.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>

6 years agoMake NiceSort treat integers well
Hrvoje Ribicic [Tue, 25 Feb 2014 16:25:29 +0000 (16:25 +0000)]
Make NiceSort treat integers well

NiceSort is invoked on arrays that may contain strings, but in other
situations can contain ints as well. As this surprisingly makes sense,
add a tiny modification to make NiceSort work in these conditions.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>

6 years agoRevision bump for 2.9.5 v2.9.5
Klaus Aehlig [Tue, 25 Feb 2014 12:50:25 +0000 (13:50 +0100)]
Revision bump for 2.9.5

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

6 years agoSet release date for 2.9.5
Klaus Aehlig [Tue, 25 Feb 2014 12:50:08 +0000 (13:50 +0100)]
Set release date for 2.9.5

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

6 years agoAdd NEWS entry for 2.9.5
Klaus Aehlig [Mon, 24 Feb 2014 14:09:32 +0000 (15:09 +0100)]
Add NEWS entry for 2.9.5

Describe the changes since 2.9.4 for the soon-to-be-released
version 2.9.5.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

6 years agoMerge branch 'stable-2.8' into stable-2.9
Klaus Aehlig [Mon, 24 Feb 2014 13:42:49 +0000 (14:42 +0100)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8
  Fix expression describing optional parameters

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

6 years agoFix expression describing optional parameters
Klaus Aehlig [Mon, 24 Feb 2014 13:29:15 +0000 (14:29 +0100)]
Fix expression describing optional parameters

The NIC's network and vlan are also newly added, hence need to be
considered optional to remain backwards compatible.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

6 years agoFix net-common script in case of routed mode
Dimitris Aragiorgis [Fri, 22 Nov 2013 19:59:42 +0000 (21:59 +0200)]
Fix net-common script in case of routed mode

setup_route should run in case or routed mode and not
openvswitch.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

Cherry-picked from 49c60905e75519c6380af97275b7ff8198eb4660.

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

6 years agoDocument hspace's SPN parameters
Klaus Aehlig [Mon, 24 Feb 2014 10:05:12 +0000 (11:05 +0100)]
Document hspace's SPN parameters

With the introduction of spindles as resources, the machine-readable
output of hspace(1) has been extended. Document the additional parameters.

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

6 years agoDocument spindles in TSPEC
Klaus Aehlig [Mon, 24 Feb 2014 09:51:03 +0000 (10:51 +0100)]
Document spindles in TSPEC

As spindles are now considered a resource, they are also output in
the TSPEC parameter of hspace --machine-readable. Document this
interface change.

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

6 years agoman: Update the manual page of gnt-node FAILOVER
Petr Pudlak [Mon, 24 Feb 2014 09:05:44 +0000 (10:05 +0100)]
man: Update the manual page of gnt-node FAILOVER

In particular explicitly note that a node failover causes all instances
to be stopped and later restarted (issue #724).

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

6 years agoMerge branch 'stable-2.8' into stable-2.9
Klaus Aehlig [Thu, 20 Feb 2014 16:14:30 +0000 (17:14 +0100)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8
  Improve job status assert affected by race condition
  Export and import Disk/NIC name
  Fix backup import in case NIC is inside a network
  Override get() method of ConfigParser

Conflicts:
lib/cmdlib/instance.py: manually apply 0973f9ed on
  the stable-2.9 version

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

6 years agoImprove job status assert affected by race condition
Hrvoje Ribicic [Thu, 20 Feb 2014 14:11:32 +0000 (15:11 +0100)]
Improve job status assert affected by race condition

In the sliver of time between choosing a waiting job to be executed and
trying to acquire locks for its execution, the status of the job can be
changed to canceling. An assert checking the job status neglected to
take this into account, and raised an error that managed to perpetually
lock the job in the canceling state. This patch resolves the issue by
making the assert accept the canceling state as well, and exiting if
the job was cancelled.

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

6 years agoExport and import Disk/NIC name
Dimitris Aragiorgis [Thu, 13 Feb 2014 14:47:01 +0000 (16:47 +0200)]
Export and import Disk/NIC name

Name of Disk/NIC were not exported during backup until now.
Use the exported info during gnt-backup import.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

6 years agoFix backup import in case NIC is inside a network
Dimitris Aragiorgis [Thu, 13 Feb 2014 14:47:00 +0000 (16:47 +0200)]
Fix backup import in case NIC is inside a network

Network UUID is written in .ini file during backup export
but is not used by _ReadExportParams(). This patch fixes it.

Please note that in case a network is given, link and mode should
not be included in NIC options.

This fixes issue 716.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

6 years agoOverride get() method of ConfigParser
Dimitris Aragiorgis [Thu, 13 Feb 2014 14:46:59 +0000 (16:46 +0200)]
Override get() method of ConfigParser

During backup import/export SafeConfigParser() is used to
save/restore instance's configuration. There is a possibility if an
export is done with a different Ganeti version, a specific value not
to be saved during export (e.g. the NIC/Disk name) but still
requested during import.

With this patch we override the get() method of SafeConfigParser()
and catch NoOptionError if raised and return None. Additionally we
translate "None" values read from .ini file into None.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

6 years agoMake hbal deal with no-LVM storage space properly
Helga Velroyen [Wed, 19 Feb 2014 13:18:05 +0000 (14:18 +0100)]
Make hbal deal with no-LVM storage space properly

Since 2.6, hbal crashes when used on a cluster where no
LVM storage is enabled at all. The problem is that it
always queries for fields that only sometimes make
sense for certain types of storage. This patch will
make it fall-back to a default value if those fields
are not returned by a query. This way it will simply
disregard the space information in its calculation
which is the best we can do in this situation, because
not all storage types support space reporting.

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

6 years agoMerge branch 'stable-2.8' into stable-2.9
Klaus Aehlig [Thu, 13 Feb 2014 16:04:09 +0000 (17:04 +0100)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8
  Fix integer overflow problem in hbal
  Add missing space

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

6 years agoFix integer overflow problem in hbal
Michele Tartara [Thu, 13 Feb 2014 12:39:38 +0000 (13:39 +0100)]
Fix integer overflow problem in hbal

waitForJobs in src/Ganeti/Jobs.hs has an integer overflow that (at least on
amd64) causes it to break after waiting for ~10 minutes. This results in hbal
sleeping forever (when compiled with squeeze's ghc 6.12.1) or crashing (when
compiled with precise's ghc 7.4.1) whenever it has to wait ~10 minutes for a
jobset to complete.

Thanks to gjo@google.com for finding the bug and suggesting the fix.

Fixes Issue 717.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

6 years agoAdd missing space
Michele Tartara [Thu, 13 Feb 2014 12:23:36 +0000 (12:23 +0000)]
Add missing space

Also, refactor the line to keep it under 80 chars.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

6 years agoRevision bump for 2.9.4 v2.9.4
Klaus Aehlig [Mon, 10 Feb 2014 12:26:45 +0000 (13:26 +0100)]
Revision bump for 2.9.4

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

6 years agoSet release date for 2.9.4
Klaus Aehlig [Mon, 10 Feb 2014 12:26:10 +0000 (13:26 +0100)]
Set release date for 2.9.4

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

6 years agoNote UUID identification change in NEWS file
Hrvoje Ribicic [Fri, 7 Feb 2014 12:31:08 +0000 (13:31 +0100)]
Note UUID identification change in NEWS file

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

6 years agoAllow classic queries to use either names or UUIDs
Hrvoje Ribicic [Thu, 6 Feb 2014 09:28:48 +0000 (09:28 +0000)]
Allow classic queries to use either names or UUIDs

When UUIDs are used in CLI commands, such addressing of objects fails
or succeeds inconsistently across object types. Worse yet, some calls
do not fail, but simply return no result. This is due to the way the
classical queries are handled in the Haskell code - a filter is built,
checking if the names match. If the names do not match, but the object
can still be retrieved through UUID, the query is successful, but there
is nothing to return.

This patch remedies the situation by extending the filter into an or
clause checking for either name or uuid. For objects that have no uuid
field, the name is reused, making the filter equivalent to the old one.

Works towards resolving issue 703.

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

6 years agoDocument the change of noded's group in NEWS
Klaus Aehlig [Thu, 6 Feb 2014 10:14:25 +0000 (11:14 +0100)]
Document the change of noded's group in NEWS

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

6 years agoMerge branch 'stable-2.8' into stable-2.9
Klaus Aehlig [Wed, 5 Feb 2014 17:54:15 +0000 (18:54 +0100)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8
  Fix execution group of NodeD

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

6 years agoFix execution group of NodeD
Michele Tartara [Wed, 5 Feb 2014 17:46:32 +0000 (17:46 +0000)]
Fix execution group of NodeD

The Node deamon was executed with the wrong gid (gnt-daemons) instead of the one
assigned to it by configure.ac.

Fixes Issue 707.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

6 years agoMake the LUInstanceCreate return node names, not UUIDs
Hrvoje Ribicic [Mon, 3 Feb 2014 10:43:53 +0000 (10:43 +0000)]
Make the LUInstanceCreate return node names, not UUIDs

The LUInstanceCreate returned names instead of UUIDs in 2.6. Along the
way, the names were internally replaced with UUIDs, and the abstraction
leaked. This patch fixes the issue.

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

6 years agoDocument new handling of degraded instances in NEWS
Klaus Aehlig [Thu, 30 Jan 2014 15:34:27 +0000 (16:34 +0100)]
Document new handling of degraded instances in NEWS

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

6 years agoGracefully handle degraded instances in verification
Klaus Aehlig [Thu, 30 Jan 2014 15:30:00 +0000 (16:30 +0100)]
Gracefully handle degraded instances in verification

The current code assumes that every instance either is of type
diskless or has at least one disk. However, with the option to
remove individual disk degraded 0-disk non-diskless instances
can occur. While such instances usually are not useful, Ganeti
still should be operational in their presence.

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

6 years agoBe aware of the degraded case when cleaning up an instance
Klaus Aehlig [Thu, 30 Jan 2014 15:08:06 +0000 (16:08 +0100)]
Be aware of the degraded case when cleaning up an instance

In the case of a degraded file-based instance, the file storage directory
for that instance cannot be obtained by looking at the first disk. Use
the standard location, computed from first principles, in this case.

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

6 years agoDocument changes to file-based disks in NEWS
Klaus Aehlig [Thu, 30 Jan 2014 11:54:14 +0000 (12:54 +0100)]
Document changes to file-based disks in NEWS

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

6 years agoPreserve disk basename on instance rename
Klaus Aehlig [Thu, 30 Jan 2014 11:46:03 +0000 (12:46 +0100)]
Preserve disk basename on instance rename

For file-based instances, upon rename, the directory containing
the instance disks is moved. Therefore, the basename needs to
be preserved in this case. Fix this. Note that so far, this
worked by accident as before 94e252a3 file names used to be
"disk" followed by the index.

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

6 years agoUpdate NEWS file
Hrvoje Ribicic [Tue, 28 Jan 2014 19:21:37 +0000 (19:21 +0000)]
Update NEWS file

This patch updates the NEWS file with NEWS of the bugfix, adding the
new 2.9.4 version in progress.

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

6 years agoModify test to reflect RAPI operation changes
Hrvoje Ribicic [Wed, 29 Jan 2014 13:04:57 +0000 (14:04 +0100)]
Modify test to reflect RAPI operation changes

A rlib2 unittest tested for the wrong behaviour, and this patch changes
the inputs and expected values to account for this.

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

6 years agoAdd QA tests for RAPI multi-instance allocation
Hrvoje Ribicic [Tue, 28 Jan 2014 18:04:44 +0000 (18:04 +0000)]
Add QA tests for RAPI multi-instance allocation

The instance multi-allocation had no tests to detect its breakage, and
this patch fixes that.

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

6 years agoFix multi-allocation RAPI method
Hrvoje Ribicic [Tue, 28 Jan 2014 15:26:32 +0000 (15:26 +0000)]
Fix multi-allocation RAPI method

The OpInstanceMultiAlloc that the instances-multi-alloc RAPI method
uses accepts a list of OpInstanceCreate opcodes rather than a list of
dictionaries as provided by the method. This patch correctly constructs
the opcodes, allowing the RAPI call to work as expected.

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

6 years agoAssign unique filenames to filebased disks
Ilias Tsitsimpis [Tue, 28 Jan 2014 15:23:46 +0000 (17:23 +0200)]
Assign unique filenames to filebased disks

With the new format for cmdline arguments, the user is able to add a
disk to an instance at a specific index. But filebased disks' filenames
have the form "{0}/disk{1}" where '{0}' is the file_storage_dir and
'{1}' is the index of the disk. So if an instance has 3 disks and we
try to create a new one at index 1, the operation will fail because the
filename "{0}/disk1" already exists.

This patch fixes the above problem and also makes the naming of file and
shared disks uniform with other templates.

Signed-off-by: Ilias Tsitsimpis <iliastsi@grnet.gr>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

6 years agoRevision bump for 2.9.3 v2.9.3
Klaus Aehlig [Fri, 24 Jan 2014 10:42:08 +0000 (11:42 +0100)]
Revision bump for 2.9.3

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

6 years agoSchedule 2.9.3 release
Klaus Aehlig [Fri, 24 Jan 2014 10:41:44 +0000 (11:41 +0100)]
Schedule 2.9.3 release

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

6 years agoDocument fix of issue 691 in NEWS
Klaus Aehlig [Fri, 24 Jan 2014 10:32:59 +0000 (11:32 +0100)]
Document fix of issue 691 in NEWS

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

6 years agoNEWS: fix typo in 2.8.4 release
Guido Trotter [Thu, 23 Jan 2014 16:07:25 +0000 (17:07 +0100)]
NEWS: fix typo in 2.8.4 release

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Petr Pudl├ík <pudlak@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>