Dimitris Aragiorgis [Tue, 17 Dec 2013 11:11:22 +0000 (13:11 +0200)]
(debian) Bump new upstream version
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Dimitris Aragiorgis [Wed, 11 Dec 2013 15:38:28 +0000 (17:38 +0200)]
(debian) Add new debian/changelog section
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Dimitris Aragiorgis [Wed, 11 Dec 2013 14:19:00 +0000 (16:19 +0200)]
(debian) Change source package to snf-ganeti
..and make ganeti2 dummy package depend on snf-ganeti.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Dimitris Aragiorgis [Tue, 10 Dec 2013 09:27:39 +0000 (11:27 +0200)]
(debian) Remove debian patch that cannot apply
Since we run autogen.sh inside debian rules Makefile.in is not
included in original source tree and thus a debian patch that
changes this file cannot apply.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Dimitris Aragiorgis [Mon, 9 Dec 2013 13:45:34 +0000 (15:45 +0200)]
(debian) Run ./autogen.sh before configure
This is needed so that packaging can be done by using official
src tree found on git repo.
Official debian packages provide in orig tarball the files
that get generated by automake, autoconf, and aclocal:
* configure
* Makefile.in
* autotools scripts
We decide not to track those files in upstream branch (which are
already included in .gitignore), instead we generate those
files on every build.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Dimitris Aragiorgis [Tue, 15 Oct 2013 16:16:53 +0000 (19:16 +0300)]
(debian) ganeti -> snf-ganeti in debian/rules
Override dh_install init, cron, logrotate with --name option.
Additional changes:
- Let ganeti run as root
- Do not enable restricted commands and do not require specific user/group.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Dimitris Aragiorgis [Tue, 15 Oct 2013 15:44:57 +0000 (18:44 +0300)]
(debian) Rename ganeti.* debian files to snf-ganeti.*
Change genscript.py to search for those files
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Dimitris Aragiorgis [Tue, 15 Oct 2013 13:48:41 +0000 (16:48 +0300)]
(debian) ganeti -> snf-ganeti in debian/control
snf-ganeti Provides, Replaces, Conflicts ganeti
ganeti-haskell replaces snf-ganeti
- /usr/share/man/man8/ganeti-confd.8.gz
was in Ganeti 2.6 but now is provided by ganeti-haskell
ganeti still replaces deprecated ganeti2 package
Additionall changes:
- Add python-fdsend dependency needed by hotplug
- Suggest ganeti-instance-debootstrap; don't recommend it
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Dimitris Aragiorgis [Fri, 6 Dec 2013 06:18:42 +0000 (08:18 +0200)]
(debian) Remove debian patch that does not apply on 2.8
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Dimitris Aragiorgis [Fri, 6 Dec 2013 06:06:34 +0000 (08:06 +0200)]
(debian) Import debian files from wheezy-backports
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Dimitris Aragiorgis [Tue, 17 Dec 2013 11:00:44 +0000 (13:00 +0200)]
(debian) Add vcs-version file
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Michele Tartara [Thu, 23 Jan 2014 08:52:42 +0000 (08:52 +0000)]
Version bump for 2.8.4 and NEWS update
Update the version number to 2.8.4 and insert the final details for this
release in the NEWS file, including the release date.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Mon, 20 Jan 2014 16:25:02 +0000 (17:25 +0100)]
Update NEWS file with news about job cancellation bugfix
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Mon, 20 Jan 2014 16:22:23 +0000 (17:22 +0100)]
Fix QA flakiness
The newly added job QA has some flakiness with respect to its use of
gnt-job watch. Fix this by waiting until the canceling status is
replaced with the canceled status, or a timeout is reached.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Mon, 20 Jan 2014 15:30:05 +0000 (16:30 +0100)]
Linting fix: remove unused import
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Mon, 20 Jan 2014 12:06:45 +0000 (13:06 +0100)]
Add missing parameter entry to man file
The gnt-instance manual was lacking an entry for the vnc-password-file
hypervisor parameter. This patch adds one, and also some information on
the default value of the parameter.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Thu, 16 Jan 2014 10:14:08 +0000 (10:14 +0000)]
Add QA test for job cancellation
This patch introduces a QA test in which a job is cancelled while
waiting.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Thu, 16 Jan 2014 12:08:18 +0000 (12:08 +0000)]
Add correct locking of master node to gnt-debug delay
The gnt-debug delay command required locks for all nodes except the
master - this patch fixes the issue by adding master to the locks
whenever needed.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Wed, 15 Jan 2014 13:51:01 +0000 (13:51 +0000)]
Add job id type assert to jqueue.py
While the changes introduced in previous patches should stop any job
id parameters reaching the queue as strings, add an assertion here to
catch any strings making it through.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Wed, 15 Jan 2014 13:48:51 +0000 (13:48 +0000)]
Add job id transformation/check to Luxi Python client
This patch adds checks to the Luxi client, making sure that job ids
are converted from strings to ints before being passed on, or that an
error is reported.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Jose A. Lopes [Fri, 17 Jan 2014 00:43:43 +0000 (01:43 +0100)]
Start-master/stop-master always fail if confd is disabled
In 'daemons/daemon-util.in', 'start-master' and 'stop-master' always
fail if confd is disabled.
Fixes issue 685.
Signed-off-by: Jose A. Lopes <jabolopes@gmail.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Wed, 8 Jan 2014 14:01:24 +0000 (14:01 +0000)]
Improve backwards compatibility of Issue 649 fix
Commit
e6e4ff4cf8d0100f331f94f7a27aa1e03a5d0e7d fixed Issue 649 by switching the
separator for usb_devices from comma to space. That solved the problem with
the command line, but RAPI was able to work with commas too, so, for backwards
compatibility we need to keep supporting that as well.
Also, in order to avoid changing the format of the config file, the default
internal representation is brought back to being comma-based, and it is changed
at the interface level (CLI or RAPI) before being passed on.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Tue, 7 Jan 2014 16:04:48 +0000 (16:04 +0000)]
Add missing NEWS entries from stable-2.8
Some fixes where pushed to the stable-2.8 branch without a corresponding NEWS
entry. This patch adds them.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Tue, 7 Jan 2014 15:05:54 +0000 (16:05 +0100)]
Change usb_devices separator to whitespace
The usb_devices parameter was using comma as a list separator, but this cannot
work because comma is already used as the hypervisor parameter separator.
Change it to use whitespace as a separator, in accordance to what already done
for the extra parameters.
The NEWS file is updated accordingly.
Fixes Issue 649.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Fri, 13 Dec 2013 13:26:23 +0000 (13:26 +0000)]
Add support for blktap2 file-driver
Newer Xen versions use blktap2 instead of blktap. This patch adds support
for it in Ganeti.
Fixes Issue 638.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Hrvoje Ribicic [Thu, 12 Dec 2013 15:33:04 +0000 (16:33 +0100)]
Update opcodes test to include network tags
This patch adds the network tags to the list of all other tag types
that can be tried in QuickCheck tests.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Hrvoje Ribicic [Fri, 13 Dec 2013 12:47:27 +0000 (12:47 +0000)]
Make network tags searchable
This patch adds the network tags to the tags searched by gnt-cluster
search-tags, and in the process cleans up the code slightly.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Hrvoje Ribicic [Thu, 12 Dec 2013 15:36:04 +0000 (16:36 +0100)]
Add network tag tests to QA
The QA did not have a test for network tags until now, and this patch
remedies the situation.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Hrvoje Ribicic [Mon, 16 Dec 2013 13:21:04 +0000 (14:21 +0100)]
Fix RAPI network tag handling
The network tags were absent from an if check used to actually list
tags. The patch fixes the oversight, and adds a proper error message in
case the issue occurs again for a new tag type.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Dimitris Aragiorgis [Thu, 12 Dec 2013 13:04:11 +0000 (15:04 +0200)]
Fix gnt-network list-tags
Define network tags in haskell part.
This fixes issue 641.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
Michele Tartara [Mon, 9 Dec 2013 13:21:12 +0000 (14:21 +0100)]
Version bump for 2.8.3
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Mon, 9 Dec 2013 13:20:28 +0000 (14:20 +0100)]
Update NEWS for 2.8.3 release
List all the changes that happened between 2.8.2 and 2.8.3.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Dimitris Aragiorgis [Tue, 10 Dec 2013 09:14:54 +0000 (11:14 +0200)]
Support reseting arbitrary params of ext disks
If param=default and the param already exists then we remove
it from params dict. This is stolen by GetUpdatedParams() which
is used for hvparams modification/inheritance.
This means that 'default' value is not accepted for an arbitrary
param of an ext disk.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Dimitris Aragiorgis [Tue, 10 Dec 2013 16:00:55 +0000 (18:00 +0200)]
Allow modification of arbitrary params for ext
Disks of ext template are allowed to have arbitrary parameters
stored in the Disk object's params slot. Those parameters can be
passed during creation of a new disk, either in LUInstanceCreate()
or in LUInsanceSetParams(). Still those parameters can not be
changed afterwards. With this patch we override this limitation.
Currently, for the other disk templates we allow modifying only
'name' and 'mode'. Therefore, we introduce new constants
MODIFIABLE_IDISK_PARAM* to include those params. If any other
parameter is passed, _VerifyDiskModification() will raise an
exception.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Dimitris Aragiorgis [Tue, 10 Dec 2013 09:14:52 +0000 (11:14 +0200)]
Do not clear disk.params in UpgradeConfig()
Commits 5dbee5e and cce4616 fix disk upgrades concerning params
slot. Since 2.7 params slot should be empty and gets filled
any time needed.
Still ext template allows passing arbitrary params per disk.
These params should be saved in config file for future use.
For instance if we have the shared-filer provider and we
specify shared_dir param during instance create, this param
is needed when we want to attach the disk e.g., during
retrieving instance info. If it gets overridden during a daemon
restart or a config reload we fail to get the instance's info.
To avoid such a failure, we set params slot to an empty dict
only if params not found in the first place.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Dimitris Aragiorgis [Mon, 9 Dec 2013 12:00:27 +0000 (14:00 +0200)]
SetDiskID() before accepting an instance
SetDiskID() fills physical_id slot of a Disk object.
LUInstanceSetParams() does not invoke SetDiskID() upon creation of a
new disk. As a result the physical_id slot of the Disk object in
config data is missing.
In case of ext disk template, in AcceptInstance() we invoke
_GatherAndLinkBlockDevices(). This takes `instance` as an argument
which includes current disks info. So, after adding a disk,
migration of ext instances will fail because FindDevice() expects
the physical_id slot.
With this patch we invoke SetDiskID() for every disk of the instance
before accept_instance() RPC.
Fixes Issue 633.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Petr Pudlak [Thu, 28 Nov 2013 14:38:57 +0000 (15:38 +0100)]
Lock group(s) when creating instances
This is required to prevent race conditions such as removing a network
from a group and adding an instance at the same time. (See issue 621#2.)
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Hrvoje Ribicic [Thu, 5 Dec 2013 09:49:01 +0000 (10:49 +0100)]
Fix job error message after unclean master shutdown
According to commit
599ee321eb, any job-related error messages should
be encoded within a Ganeti-specific error and not passed on as a
string, to allow for easier parsing.
For jobs suffering from an undesirable status after an unclean master
daemon shutdown, the message was not encoded, as reported in issue 618.
This patch fixes the problem.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Wed, 4 Dec 2013 17:49:50 +0000 (18:49 +0100)]
Add default file_driver if missing
If the file driver of an instance with file based storage is not specified, the
default one is automatically added by the UpgradeConfig function.
Fixes Issue 571.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Jose A. Lopes [Mon, 2 Dec 2013 12:07:39 +0000 (13:07 +0100)]
Update tests
Update hypervisor unit tests.
Partial cherry-pick from
d2e4e099e4248832fef8ed7b0755d01bd4178e3a
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Jose A. Lopes [Mon, 2 Dec 2013 11:41:33 +0000 (12:41 +0100)]
Xen handle domain shutdown
Update Xen backend to properly recognize when a domain has been
shutdown by the user and to properly cleanup a shutdown domain when
Ganeti requests Xen to stop this domain.
Partial cherry-pick from
9d22cc90609e3ee8f0f2b34b793a3daced3c0e61
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Jose A. Lopes [Thu, 28 Nov 2013 10:04:25 +0000 (11:04 +0100)]
Fix evacuation out of drained node
* fix node daemon not to skip data, such as, memory and disk size,
when building the node list to send to HBal, given that these data
are important for HBal to determine whether an evacuation is
possible
* fix iallocator to properly load drained nodes from the list passed
by the node daemon, instead of zeroing all the data, such as, the
memory and disk size
* this fixes issue 615
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Bernardo Dal Seno [Tue, 4 Jun 2013 16:38:11 +0000 (18:38 +0200)]
Refactor reading live data in htools
This simplifies different handling of individual items.
Cherry-picked from
8c72f7119f50a11661aacba2a1abffdfdc6f7cfa.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Petr Pudlak [Tue, 3 Dec 2013 08:03:28 +0000 (09:03 +0100)]
master-up-setup: Ping multiple times with a shorter interval
In the case of network problems, one ping packet can possibly get lost.
Sending multiple packets is safer. The interval between packets is set
to 200ms so that the check finishes faster.
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Petr Pudlak [Mon, 2 Dec 2013 10:04:54 +0000 (11:04 +0100)]
Add a packet number limit to "fping" in master-ip-setup
This fixes issue #630. Apparently there is a bug in fping 3.5 where it
loops forever without "-c" given an unreachable host, even though
"-c 1" should be the default according to the man page.
The "-c" flag works on Squeeze. Checking the man pages on the Internet,
fping supported "-c" at least since 2007. So there should be no backward
compatibility problems.
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Dimitris Aragiorgis [Thu, 28 Nov 2013 08:19:19 +0000 (10:19 +0200)]
Fix a bug in InstanceSetParams concerning names
In case no name is passed in disk modifications we should
keep the old one. If name=none then set disk name to None.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Petr Pudlak [Thu, 28 Nov 2013 10:46:38 +0000 (11:46 +0100)]
build_chroot: hard-code the version of blaze-builder
The newest version does not build on Debian squeeze, so avoid
it being pulled in as a dependency.
This is the same issue that has been fixed in [
1e078ef3] on master.
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Jose A. Lopes [Fri, 22 Nov 2013 13:44:02 +0000 (14:44 +0100)]
Fix error printing
Fixes issue 616.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 25 Nov 2013 14:48:41 +0000 (15:48 +0100)]
Allow link local IPv6 gateways
Each host using IPv6 always has a link local address in fe80::/10. It is
common to use fe80::1 as default gateway to ease client configuration.
Ganeti prevented this usage, because it made sure that the IPv6 gateway
is in the IPv6 network the instance is connected to.
This patch also allows to specify a IPv6 gateway in the link local
network in addition to the network the instance is connected to.
This fixes issue 624.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 25 Nov 2013 10:37:06 +0000 (11:37 +0100)]
Fix NODE/NODE_RES locking in LUInstanceCreate
Both NODE and NODE_RES locks were acquired opportunistically if so
requested by the user. LUInstanceCreate requires, however, that the
actually locked elements on NODE and NODE_RES level are the same.
This patch changes the locking of NODE_RES such that those locks are not
acquired opportunistically any more. Instead, the mandatory locks are
set to the acquired NODE locks once they are actually granted.
This fixes issue 622.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Klaus Aehlig [Tue, 26 Nov 2013 19:45:39 +0000 (20:45 +0100)]
eta-reduce isIpV6
This is not only better style, but also fixes a lint error.
Also use the infix form of `elem` to increase readability.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Guido Trotter [Tue, 26 Nov 2013 15:27:17 +0000 (16:27 +0100)]
Ganeti.Rpc: use brackets for ipv6 addresses
We detect an IPv6 vs V4 address based on columns, rather than passing
the family from the cluster object to be more future proof (in case
we'll ever support mixed clusters).
Unfortunately quite a bit more code is required to test this: we need an
arbitrary node that does the right thing w.r.t. ip addresses and also
test-only exports. As such we'll do this out of the stable branch.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Hrvoje Ribicic [Fri, 15 Nov 2013 16:39:56 +0000 (16:39 +0000)]
Update NEWS file with socket permission fix info
The NEWS file now contains a 2.8.3 entry, describing the fix of the
previous patch.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Hrvoje Ribicic [Fri, 15 Nov 2013 10:44:04 +0000 (10:44 +0000)]
Fix socket permissions after master-failover
When using gnt-cluster master-failover, on the soon-to-be-master the
luxi daemon is started by the node daemon. This makes the luxi
daemon inherit the node daemon's umask 077, making the communication
socket unreadable to group members. When using Ganeti with non-root
users, this causes problems, as reported in issue 477.
To fix this, the socket permissions are set explicitly.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Michele Tartara [Wed, 6 Nov 2013 12:26:24 +0000 (12:26 +0000)]
Version bump for 2.8.2
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Michele Tartara [Wed, 6 Nov 2013 12:25:16 +0000 (12:25 +0000)]
Update NEWS file for 2.8.2 release
Add a section in the file for the new upcoming release.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Apollon Oikonomopoulos [Tue, 5 Nov 2013 14:30:45 +0000 (16:30 +0200)]
DRBD: ensure peers are UpToDate for dual-primary
DrbdAttachNet supports both, normal primary/secondary node operation, and
(during live migration) dual-primary operation. When resources are newly
attached, we poll until we find all of them in connected or syncing operation.
Although aggressive, this is enough for primary/secondary operation, because
the primary/secondary role is not changed from within DrbdAttachNet. However,
in the dual-primary ("multimaster") case, both peers are subsequently upgraded
to the primary role. If - for unspecified reasons - both disks are not
UpToDate, then a resync may be triggered after both peers have switched to
primary, causing the resource to disconnect:
kernel: [1465514.164009] block drbd2: I shall become SyncTarget, but I am
primary!
kernel: [1465514.171562] block drbd2: ASSERT( os.conn == C_WF_REPORT_PARAMS )
in /build/linux-rrsxby/linux-3.2.51/drivers/block/drbd/drbd_receiver.c:3245
This seems to be extremely racey and is possibly triggered by some underlying
network issues (e.g. high latency), but it has been observed in the wild. By
logging the DRBD resource state in the old secondary, we managed to see a
resource getting promoted to primary while it was:
WFSyncUUID Secondary/Primary Outdated/UpToDate
We fix this by explicitly waiting for "Connected" cstate and
"UpToDate/UpToDate" disks, as advised in [1]:
"For this purpose and scenario,
you only want to promote once you are Connected UpToDate/UpToDate."
[1] http://lists.linbit.com/pipermail/drbd-user/2013-July/020173.html
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Mon, 4 Nov 2013 15:20:07 +0000 (15:20 +0000)]
Improve error message for replace-disks
In some conditions, replace-disks will fail if the disks are not properly
activated. Improve the error message suggesting to run activate-disks before
executing replace-disks.
Fixes Issue 606.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Klaus Aehlig [Wed, 30 Oct 2013 10:13:48 +0000 (11:13 +0100)]
Add all dependencies for confd as test dependencies
Since our tests pull in confd as a dependency, all build dependencies
for confd are also necessary to run the tests.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Tue, 29 Oct 2013 15:09:14 +0000 (16:09 +0100)]
Add snap-server to the test-relevenat packages
While snap-server is only needed for the optional monitoring daemon,
some tests, notably those testing these optional features, still depend
on it. So, if snap-server is missing, the Haskell tests should not be
run, as they cannot even be build.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Santi Raffa [Wed, 23 Oct 2013 14:20:24 +0000 (16:20 +0200)]
Placate warnings on ganeti.outils_unittest.py
Change ovf.py from using 'if foo:' to 'if foo is not None:' checks as
suggested by the FutureWarnings the OVF library raises otherwise.
This fixes issue 557.
Signed-off-by: Santi Raffa <rsanti@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Michele Tartara [Thu, 17 Oct 2013 10:36:44 +0000 (12:36 +0200)]
Version bump for 2.8.1
Also, update the NEWS file accordingly.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Wed, 16 Oct 2013 11:11:18 +0000 (13:11 +0200)]
Verify that ConfD is running after master-failover
This patch adds additional 'gnt-node list' commands to
the testing of 'gnt-cluster master-failover' in order to
test if ConfD (or LuxiD) is still running after a
master-failover.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Apollon Oikonomopoulos [Wed, 16 Oct 2013 09:17:23 +0000 (12:17 +0300)]
daemon-util: handle luxid in {start,stop}_master()
Luxid was not handled in start_master() and stop_master() at all. As a result,
during a master-failover, luxid would be left running on the old master and
would not start on the new master, leaving the cluster without management until
luxid was manually started.
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Santi Raffa [Tue, 15 Oct 2013 08:13:28 +0000 (10:13 +0200)]
Fix typo in storage.FileStorage docstring
Signed-off-by: Santi Raffa <rsanti@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Wed, 16 Oct 2013 07:32:02 +0000 (09:32 +0200)]
Fix path for serial file
It is actually located inside the queue directory.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Thu, 10 Oct 2013 14:03:44 +0000 (14:03 +0000)]
Improve harep documentation
Add a more complete description of how the tool works.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Jose A. Lopes [Tue, 8 Oct 2013 11:26:47 +0000 (13:26 +0200)]
Fix typo in walkthrough documentation
Fix typo in walkthrough documentation, where 'instance3' should read
'instance1' in order to be consistent with the output below in the
example.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Costas Drogos [Thu, 3 Oct 2013 09:37:14 +0000 (12:37 +0300)]
Don't attemp ipv6 ssh in case of ipv4 cluster
In case of a cluster with primary-ip-version=4, there is no need
for cluster to try ipv6 ssh connections which may timeout.
So append '-4' on ssh if cluster is ipv4-only
Signed-off-by: Costas Drogos <costas.drogos@gmail.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Michele Tartara [Mon, 7 Oct 2013 07:51:30 +0000 (07:51 +0000)]
Fix outdated documentation for users-setup
The --yes-do-it parameter was not properly documented yet. Add it to the
administration guide.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Fri, 27 Sep 2013 13:02:14 +0000 (15:02 +0200)]
Fix wrong release date in the NEWS file
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Fri, 27 Sep 2013 12:32:58 +0000 (14:32 +0200)]
Version bump for 2.8.0
Also, update the NEWS file accordingly.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Tue, 6 Aug 2013 15:19:49 +0000 (15:19 +0000)]
Add daemon split design doc
This describes the future planned structure of Ganeti daemons.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Thu, 26 Sep 2013 11:32:57 +0000 (13:32 +0200)]
Merge branch 'stable-2.7' into stable-2.8
Conflicts are trivially solved.
* stable-2.7
Version bump for 2.7.2 (updated NEWS file)
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Conflicts:
NEWS
configure.ac
Michele Tartara [Thu, 26 Sep 2013 07:53:10 +0000 (09:53 +0200)]
Version bump for 2.7.2
Change the version number and the NEWS file for the 2.7.2 bugfix release.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Fri, 20 Sep 2013 11:45:47 +0000 (13:45 +0200)]
Add additional tests for utils.Retry
Also have some tests where the time the various components
(inspecting the time function, calling the function, etc) have
a non-trivial time. Also, have two tests demonstrating that
the number of retries actually depends on the amount of time
the function takes to complete.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Thu, 19 Sep 2013 15:05:29 +0000 (17:05 +0200)]
Make retry tests independent of actual time
Even in the tests, real time is used. While, generally, the assumptions
about execution time are pretty safe, in some rare circumstances, e.g.,
on machines with extremely heavy load they do not hold true, thus rendering
the tests flaky. Fix this, by mocking time.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Thu, 19 Sep 2013 16:12:21 +0000 (18:12 +0200)]
Fix corner-case in handling of remaining retry time
Consider a remaining time of 0 as already timed out. Otherwise,
there is no guarantee that calling utils.Retry with timeout 0
will call the function precisely once; it might run in time
shorter than the resolution of timer.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Michele Tartara [Wed, 18 Sep 2013 13:38:18 +0000 (15:38 +0200)]
Perform proper cleanup on termination of Haskell daemons
Haskell deamons did not perform proper cleanup at termination. There was no code
for removing the pid file, and the code in LuxiD for removing the unix socket
file was not working, because it is implemented with a "finally" statement,
which is executed only when the main loop of the daemon is exited (either
normally, or through an exception), but not when it is terminated by a SIGTERM.
This commit adds a proper handler for SIGTERM, which transforms it into a
successful termination exception. This allows both the newly added cleanup code
for pid files and the unmodified cleanup code for unix sockets to be executed.
Fixes Issue 581 and 582.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>