Helga Velroyen [Tue, 23 Jul 2013 13:54:51 +0000 (15:54 +0200)]
Remove obsolete autoconf variable from remaining files
This removes the obsolete autoconf variable
'ENABLE_SHARED_FILE_STORAGE' from all remaining files.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Helga Velroyen [Tue, 23 Jul 2013 13:02:34 +0000 (15:02 +0200)]
objects.py: remove fallback to autoconf
The online-update function of the cluster config so far
inspected the autoconf data to determine whether shared
file storage is enabled. This should now totally rely
on the options given at cluster initialization and thus
this legacy fallback is removed.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Helga Velroyen [Tue, 23 Jul 2013 13:01:11 +0000 (15:01 +0200)]
Cluster-merge: determine shared file storage use from config
This patch makes cluster merge read the cluster's
configuration to find out whether or not shared
file storage is enabled.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Helga Velroyen [Tue, 23 Jul 2013 13:00:07 +0000 (15:00 +0200)]
Opcodes: remove obsolete RequireSharedFileStorage function
While looking for occurences of the soon-to-be-eliminated
autoconf option 'ENABLE_SHARED_FILE_STORAGE', I discovered
that this function uses it, but is actually never used
anyware, thus we just delete it.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Helga Velroyen [Tue, 23 Jul 2013 12:54:42 +0000 (14:54 +0200)]
Bootstrap: factor out and prepare shared-file-storage
This patch makes 'gnt-cluster init' use the
'--shared-file-storage-dir' option to set the default
shared file storage dir. Additionally, it performs the
same sanity and validity checks for the path as for
the default file storage directory. For this, we tried
to re-use as much code from file storage as possible.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Helga Velroyen [Tue, 23 Jul 2013 12:37:19 +0000 (14:37 +0200)]
Move default shared file storage directory to pathutils
This patch moves the default shared-file storage directory
to the pathutils file. It will be removed from configure.ac
at the end of this patch series.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Mon, 29 Jul 2013 08:57:39 +0000 (10:57 +0200)]
Add Ganeti 2.9 design document
This document lists the designs that have been implemented
in Ganeti 2.9 that hadn't been implemented in 2.8.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Klaus Aehlig [Mon, 29 Jul 2013 08:37:58 +0000 (10:37 +0200)]
Update NEWS for version 2.9
Also for version 2.9, sort the news entries into incompatible and
compatible changes. In this way, we keep the list of items that have
to be taking into considerations before upgrading as short as possible.
Also mention that our tests now have an additional dependency.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Guido Trotter [Thu, 25 Jul 2013 13:40:32 +0000 (15:40 +0200)]
Merge branch 'stable-2.8' into stable-2.9
* stable-2.8:
Update NEWS and version for Ganeti 2.7.1
Add hvparam to disable VNET_HDR on tap devices
daemon-util: pass --oknodo at rotate_logs
Add logrotate example
daemon-util: provide rotate_logs and rotate_all_logs actions
Fix permission errors for split users
Make RAPI export device names and UUIDs
Conflicts:
lib/constants.py: trivial
lib/rapi/rlib2.py: trivial
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Guido Trotter [Thu, 25 Jul 2013 12:38:24 +0000 (14:38 +0200)]
Merge branch 'stable-2.7' into stable-2.8
* stable-2.7:
Update NEWS and version for Ganeti 2.7.1
daemon-util: pass --oknodo at rotate_logs
Add logrotate example
daemon-util: provide rotate_logs and rotate_all_logs actions
Conflicts:
NEWS: trivial
configure.ac: trivial (keep 2.8 version)
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Guido Trotter [Thu, 25 Jul 2013 10:36:54 +0000 (12:36 +0200)]
Update NEWS and version for Ganeti 2.7.1
Release 2.7.1 with a handful of minor fixes.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Stratos Psomdakis [Wed, 24 Jul 2013 11:52:55 +0000 (14:52 +0300)]
Add hvparam to disable VNET_HDR on tap devices
IFF_VNET_HDR allows tap devices to extract a VIRTIO_NET_HDR from pkts
going through the tap iface, enabling segmentation offload for the
virtio nics.
Current (Debian) kernels (3.2 for Debian Squeeze backrports / Wheezy)
don't seem able to handle well VMs with 'broken' virtio ifaces (e.g.
FreeBSD virtio-net driver), using GSO. Broken or malicious virtio-net
drivers can cause the host kernel to flood the logs with WARNs(),
effectively live-locking the system and affecting its overall stabitlity
(eg DRBD disconnects).
The WARN() flooding has been fixed / ratelimited in Linus' tree, but it
hasn't been backported to -stable.
This patch adds the vnet_hdr hvparam for KVM, to select whether the tap
devices used for KVM virtio ifaces will get created with VNET_HDR
support (IFF_VNET_HDR), even when the underlying kernel supports it, in
order to avoid this issue.
Signed-off-by: Stratos Psomadakis <psomas@grnet.gr>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Apollon Oikonomopoulos [Wed, 24 Jul 2013 06:22:00 +0000 (09:22 +0300)]
daemon-util: pass --oknodo at rotate_logs
daemon-util's rotate_logs() did not pass --oknodo to start-stop-daemon while
HUPing the daemon processes. As a result, rotate_logs would fail for a
non-running daemon causing rotate_all_logs to exit prematurely.
We can fix this by either passing --oknodo to start-stop-daemon, or have
rotate_all_logs ignore any errors. The former is probably a safer approach - as
it doesn't mask any potential coding errors in rotate_logs - and is also
semantically correct (we only care about log rotation if a daemon is actually
running).
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Helga Velroyen [Tue, 23 Jul 2013 15:08:00 +0000 (17:08 +0200)]
Fix another missing renaming
This fixes a (due to a merge) slipped occurence of
VALID_STORAGE_TYPES which was renamed to STORAGE_TYPES.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Apollon Oikonomopoulos [Tue, 23 Jul 2013 14:22:24 +0000 (17:22 +0300)]
Add logrotate example
Add an example logrotate snippet, along with the relevant documentation.
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Apollon Oikonomopoulos [Tue, 23 Jul 2013 14:21:31 +0000 (17:21 +0300)]
daemon-util: provide rotate_logs and rotate_all_logs actions
Modify daemon-util to allow sending SIGHUP to one or all daemons. This is meant
as a utility function to be used in logrotate definitions.
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Helga Velroyen [Tue, 23 Jul 2013 14:22:42 +0000 (16:22 +0200)]
Fix usage of mapping from disk templates to storage types
This fixes the currently broken tests due to a slipped
occurrence of the mapping from disk templates to storage
types due to a merge.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Helga Velroyen [Tue, 23 Jul 2013 12:13:21 +0000 (14:13 +0200)]
Rename VALID_STORAGE_TYPES to STORAGE_TYPES
For consistency, this patch renames 'VALID_STORAGE_TYPES'
to 'STORAGE_TYPES', because the set of valid disk
templates is also just names 'DISK_TEMPLATES'.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Helga Velroyen [Tue, 23 Jul 2013 11:41:49 +0000 (13:41 +0200)]
Unit tests for constants consistency
This patch adds some unit tests to ensure the consistency
of various constants regarding disk templates.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Helga Velroyen [Tue, 23 Jul 2013 11:41:34 +0000 (13:41 +0200)]
Rename disk_template/storage_type map + cleanup
This patch renames the mapping of disk templates to storage
types to MAP_DISK_TEMPLATE_STORAGE_TYPE, which is a more
expressive name since it indicates that it is a mapping and
does not have the inconsistent usage of singular and plural
anymore.
Additionally, this patch sorts the disk templates
alphabetically in the constants file.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Helga Velroyen [Tue, 23 Jul 2013 11:19:28 +0000 (13:19 +0200)]
Move space reporting constant to constants.py
This patch moves the constant which is used to determine
whether a storage type provides storage space reporting
from the utils package to the constants. This way, we
can also use it in haskell and it fits there semantically
better anyway.
Additionally, I added unit tests that make sure that the
constant is in sync with the actual implementation in the
backend. This will make sure that when new storage types
provide space reporting, those functions are actually used
in the backend.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Klaus Aehlig [Tue, 23 Jul 2013 12:33:56 +0000 (14:33 +0200)]
Update hroller manpage
Offline nodes are properly ignored and support for online rolling
reboots is added, so this should no longer be mentioned under bugs.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Helga Velroyen [Mon, 22 Jul 2013 17:09:04 +0000 (19:09 +0200)]
Update NEWS file wrt to file storage dir
This updates the NEWS file in a way that it mentions now
that 'gnt-cluster init' got the new option
'--file-storage-dir'.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Helga Velroyen [Mon, 22 Jul 2013 16:57:23 +0000 (18:57 +0200)]
Update man page of gnt-cluster regarding file-storage-dir
This extends the description of 'gnt-cluster init' and
'gnt-cluster modify' with respect to the file storage
directory.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Helga Velroyen [Mon, 22 Jul 2013 11:06:22 +0000 (13:06 +0200)]
gnt-cluster {init, modify} --file-storage-dir
This patch implements consistent usage and behavior of
the --file-storage-dir option in 'gnt-cluster init'
and 'gnt-cluster modify'. It includes a bunch of unit
tests as well.
Additionally, it enables the previously written unit
tests for 'instance_storage', which were forgotten to
be included in the Makefile so far.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Thomas Thrainer [Mon, 22 Jul 2013 15:43:01 +0000 (17:43 +0200)]
Always return tuples in Expand*Name
ExpandNodeName and ExpandInstanceName now always return a tuple. If the
node/instance was not found, (None, None) is returned. This fixes bugs
where callers blindly assign the return value of those methods to
multiple variables without checking if it was None.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Helga Velroyen [Wed, 17 Jul 2013 09:28:06 +0000 (11:28 +0200)]
Prepare QA for shared file storage
This prepares the QA for running tests regarding
shared file storage.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Thomas Thrainer [Mon, 22 Jul 2013 10:20:25 +0000 (12:20 +0200)]
Fix permission errors for split users
Correctly set ownership and permissions for daemon log files, correct
the name of the luxid logfile and set the ownership of the query socket
correctly.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Christos Stavrakakis [Fri, 19 Jul 2013 08:19:25 +0000 (11:19 +0300)]
Make RAPI export device names and UUIDs
Add UUIDs and names of instance's disks and NICs to the list of instance
fields that are returned from RAPI.
Signed-off-by: Christos Stavrakakis <cstavr@grnet.gr>
Reviewed-by: Helga Velroyen <helgav@google.com>
Weiwei Jia [Tue, 16 Jul 2013 17:36:17 +0000 (13:36 -0400)]
Update Gluster Ganeti Support doc
Update the document as agreed on the mailing list: the project
should be realized in two parts: one is for supporting Xen VMs
(similarly to the sharedfile template) and the other one for
QEMU/KVM VMs.
Signed-off-by: Weiwei Jia <harryxiyou@gmail.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Thu, 18 Jul 2013 15:21:38 +0000 (17:21 +0200)]
Merge branch 'stable-2.8' into stable-2.9
* stable-2.8
Fix permission problem related to Issue 477
Add hs function to easily change file ownership
Conflicts:
src/Ganeti/Utils.hs (trivial)
trivial
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Michele Tartara [Thu, 18 Jul 2013 13:50:59 +0000 (13:50 +0000)]
Let ReqNodeInstances work with node UUIDs
The "primaryNode" and "secondaryNode" fields of "Instance" entities in the
cluster configuration where changed to use UUIDs instead of names. The
ReqNodeInstances query inside Confd was not upgraded yet, and was thus
not working anymore.
This commit fixes it.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Thu, 18 Jul 2013 13:54:28 +0000 (13:54 +0000)]
Add documentation line to getNodeInstances
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Thu, 18 Jul 2013 13:03:51 +0000 (13:03 +0000)]
Add debug logging to Confd
Knowing the replies actually sent helps tracking down problems much more
efficiently.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Fri, 12 Jul 2013 16:12:24 +0000 (16:12 +0000)]
Fix permission problem related to Issue 477
Commit
91525dee856951ace940c78b6254a1c7344b4803 fixed Issue 477 but broke
"gnt-cluster info".
This commit offers a solution to both problems, by changing the permission
of the socket instead of changing the permission the confd process is run
with.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Fri, 12 Jul 2013 16:10:47 +0000 (16:10 +0000)]
Add hs function to easily change file ownership
The Haskell library functions only allow to change file ownership using
uid/gid. A function for doing that with explicit names is added by this
commit.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Klaus Aehlig [Wed, 17 Jul 2013 15:09:34 +0000 (17:09 +0200)]
Merge branch 'stable-2.8' into stable-2.9
* stable-2.8
Rename queryd to luxid
Document the rapi client not to have a QueryNetworks method
Enable unit tests again
Document ganeti-queryd
Add ganeti-queryd to QA env test
Add queryd daemon (split from confd)
Extract ConfigReader from Confd/Server.hs
Add timestamps to haskell network query fields
Conflicts:
src/Ganeti/Confd/Server.hs (trivial)
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Wed, 17 Jul 2013 14:02:46 +0000 (16:02 +0200)]
Rename queryd to luxid
As queryd will, in the future, handle all LUXI request, queue jobs and
most likely perform various other tasks, it is renamed to luxid already.
This will safe some headache when upgrading Ganeti installations, as we
don't have to deal with a daemon rename.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Wed, 17 Jul 2013 13:52:25 +0000 (15:52 +0200)]
Fix deprecation warning about exception
This fixes a deprecation warning regarding the retrieval
of the error message from an exception.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Wed, 17 Jul 2013 13:47:22 +0000 (15:47 +0200)]
Move bdev unit tests to filestorage unit tests
Some code was moved from bdev to file storage in
previous patches, but the related unit tests were
accidentally left in bdev. Moving and adjusting
them now.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Wed, 17 Jul 2013 12:41:47 +0000 (14:41 +0200)]
Fix iallocator unit tests
This fixes the unit test for the iallocator. The fix
is necessary, because a renamed functions was not properly
renamed in the tests as well.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Wed, 17 Jul 2013 12:36:18 +0000 (14:36 +0200)]
GenerateDiskTemplate: Proper check for valid disk templates
This patch makes an FileStorageError to be risen with a
proper error message instead of just an assertion in case
the given disk template is not a valid disk template at
all.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Klaus Aehlig [Wed, 17 Jul 2013 13:44:29 +0000 (15:44 +0200)]
Document the rapi client not to have a QueryNetworks method
While there is a luxi query QueryNetworks, the rapi client does not
provide such a method. Document this by declaring it in the
KNOWN_UNUSED_LUXI calls.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Helga Velroyen [Wed, 17 Jul 2013 11:54:42 +0000 (13:54 +0200)]
Enable unit tests again
A while ago, the execution of python unit tests was
accidentally disabled for distcheck. This patch
enables them again. This will lead to a couple of
tests failing, but we decided to submit this first
and then fix the broken tests in separate patches.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Thomas Thrainer [Tue, 16 Jul 2013 07:34:57 +0000 (09:34 +0200)]
Document ganeti-queryd
Add a man page for ganeti-queryd and update the documentation for
ganeti-confd in various places.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Tue, 16 Jul 2013 07:17:07 +0000 (09:17 +0200)]
Add ganeti-queryd to QA env test
Test for the newly introduces ganeti-queryd in the environment test of
QA.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Thu, 4 Jul 2013 15:10:35 +0000 (17:10 +0200)]
Add queryd daemon (split from confd)
queryd is added as a new daemon which handles configuration queries over
LUXI. This functionality was removed from confd, which now only queries
over the network.
The queryd user is added to the master group such that it can access
server.pem. The confd user no longer needs to be in the master group.
This fixes issue 292.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Wed, 3 Jul 2013 14:22:58 +0000 (16:22 +0200)]
Extract ConfigReader from Confd/Server.hs
Confd's functionality to watch the Ganeti configuration file is
extracted to the ConfigReader module. No functional changes are
introduced.
This extraction makes will enable us to split queryd from confd, as
queryd will have to use the same functionality.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Wed, 17 Jul 2013 07:13:40 +0000 (09:13 +0200)]
Add unit test for drbdsetup show parsing
This unit test checks for proper parsing of the output from `drbdsetup
show` when re-attaching the local disk. In this case, disk parameters
are not (yet) set, so the corresponding dict is empty.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Tue, 16 Jul 2013 13:50:39 +0000 (15:50 +0200)]
Revert "Disable failing QA test"
This reverts commit
b2525349f0da75c74432f2dd85abbcad56e56fed.
Issue 516 was fixed, so now the QA test can be re-enabled again.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Tue, 16 Jul 2013 13:47:44 +0000 (15:47 +0200)]
Fix parsing of drbdsetup show output for DRBD 8.4
DRBD 8.4 contains two `disk` entries under the `volume` section. In some
circumstances, the parsing code could wrongly use the empty one which
causes DRBD8Dev._SlowAssemble() to fail. This fixes issue 516.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Christos Stavrakakis [Tue, 16 Jul 2013 08:07:03 +0000 (11:07 +0300)]
Add timestamps to haskell network query fields
Add timestamp fields to the list of available network query fields in
the Haskell code.
Signed-off-by: Christos Stavrakakis <cstavr@grnet.gr>
Reviewed-by: Helga Velroyen <helgav@google.com>
Dimitris Aragiorgis [Mon, 15 Jul 2013 17:25:03 +0000 (20:25 +0300)]
Fix conflicts check in LUNetworkDisconnect
The function _NetworkConflictCheck expects a list of instances as
last argument, not a list of pairs of instance names and instances.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Klaus Aehlig [Mon, 15 Jul 2013 14:30:15 +0000 (16:30 +0200)]
Merge branch 'stable-2.8' into master
* stable-2.8
Change method dispatch in ClientOps to enforce luxi.REQ_ALL
Allow modify_etc_hosts to be changed
Add --modify-etc-hosts option for CLI tools
Add luxiReqQueryNetworks to LuxiOp
Log received message at debug level
Set the correct group for confd
Log RPC errors from inside executeRpcCall
Factor out the logRpcErrors function
Expose bulk parameter for GetJobs in RAPI client
Add git send-email to the chroot
Add tests for CanRead
Only generate node lists with nodes having different names
Cluster verify checks server.pem permissions
Add function for checking file access permissions
Prevent silent failure in case of connection problems
Fix apt-get invocation in chroot_builder
* merged from stable-2.7
Fix RAPI to include missing network fields
Add support for querying network timestamps
In the crontab example, look for the correct binary
Fix wrong numbering in UPGRADE documentation
Conflicts:
devel/build_chroot
lib/client/gnt_cluster.py
Resolved by taking both additions.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Klaus Aehlig [Mon, 15 Jul 2013 14:10:58 +0000 (16:10 +0200)]
Merge branch 'stable-2.7' into stable-2.8
* stable-2.7
Fix RAPI to include missing network fields
Add support for querying network timestamps
In the crontab example, look for the correct binary
Fix wrong numbering in UPGRADE documentation
Conflicts:
src/Ganeti/Objects.hs
test/hs/Test/Ganeti/Objects.hs
Resolved by taking both additions.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Klaus Aehlig [Mon, 15 Jul 2013 09:24:28 +0000 (11:24 +0200)]
Change method dispatch in ClientOps to enforce luxi.REQ_ALL
ClientOps' handle_request dispatches on the luxi request received. Change
this to first verify if the request is luxi.REQ_ALL. In this way, we catch
programming errors introducing "secret" luxi requests earlier. This is relevant,
as our other checks for internal consistency compare against luxi.REQ_ALL.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Helga Velroyen [Thu, 11 Jul 2013 14:22:31 +0000 (16:22 +0200)]
Update documentation and NEWS wrt to file storage dir
This patch updates the 'gnt-cluster' man page and the NEWS
file regarding the changes related to the file storage
en/disabling and the configuration of the file storage
directory.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Thu, 11 Jul 2013 07:55:20 +0000 (09:55 +0200)]
Verify file storage path
This patch adds two verification steps to 'gnt-cluster
verify':
- The configured file storage directory is checked against
the allowed file storage directories file.
- We check whether the configured file storage directory
is existing and writable on each node.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Wed, 10 Jul 2013 14:24:25 +0000 (16:24 +0200)]
Prepare verification code for new file path verification
This patch prepares the verification code for adding
a new verification step for the file storage paths:
- It moves a couple of file storage helper functions from
bdev to filestorage (since they make more sense there
and bdev is too big anyway).
- They rename constants and functions related to the
verification step where the allowed file paths are
checked agains forbidden paths to a more expressive name,
because otherwise they would be confused to be related
to the verification of the file storage paths against
the allowed file storage paths.
- Use the cluster objects helper functions to check
if file storage is inabled instead of using the utils
function directly, because it simplifies the code.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Wed, 10 Jul 2013 12:29:19 +0000 (14:29 +0200)]
Remove file storage path from autoconf
This patch removes the option to configure the file
storage path at configure time, because it is now
replaced by a runtime option for gnt-cluster init.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Wed, 10 Jul 2013 12:14:26 +0000 (14:14 +0200)]
QA: Adjust QA for file storage
This improves the QA code wrt to file storage in the
following ways:
- It fixes a FIXME to make the file storage directory
customizable in the QA config. Fallback is the default
value.
- It makes QA derive the enabled storage types from
the enabled disk templates and runs the 'gnt-node
storage tests' only on the enabled ones.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Wed, 10 Jul 2013 12:06:04 +0000 (14:06 +0200)]
storage utils: read file storage dir from cluster config
This patch make the storage utils read the file storage
directory from the cluster config instead of the constants.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Tue, 9 Jul 2013 16:41:10 +0000 (18:41 +0200)]
Remove ENABLE_FILE_STORAGE completely
This patch removes the ENABLE_FILE_STORAGE completely
from the remaining files, such as Makefile, configure,
constants, pathutils and objects.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Tue, 9 Jul 2013 16:22:16 +0000 (18:22 +0200)]
cluster-merge: remove usage of 'ENABLE_FILE_STORAGE'
This patch adjusts the cluster-merge tool so that it does
no longer check the constant 'ENABLE_FILE_STORAGE' but
the clusters' configurations.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Tue, 9 Jul 2013 16:20:04 +0000 (18:20 +0200)]
QA: Adjust test whether file storage is enabled
This patch fixes the node storage QA, which checked whether
file storage is enabled by looking at the constant
'ENABLE_FILE_STORAGE'. QA should rather retrieve this
information from the QA config.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Tue, 9 Jul 2013 16:08:24 +0000 (18:08 +0200)]
Opcodes: move storage type checks to cmdlib
So far, there was a static check whether or not a given
storage type of an opcode was enabled. This check is
no longer possibe at this layer, because the information
whether or not file/shared file storage is enabled must
be retrieved from the cluster's configuration. This patch
removes the static check (which was incomplete anyway)
and adds it to the business logic of cmdlib.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Tue, 9 Jul 2013 12:57:30 +0000 (14:57 +0200)]
cmdlib: remove usage of ENABLE_FILE_STORAGE
This patch removes all usages of the constant
'ENABLE_FILE_STORAGE' from the cmdlib code and
replaces them by checking the cluster's configuration.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Tue, 9 Jul 2013 12:32:53 +0000 (14:32 +0200)]
backend: remove ENABLE_FILE_STORAGE
This patch removes the usage of the ENABLE_FILE_STORAGE
constant in the backend code. To avoid having to pass
it through various RPC calls, we instead move the check
to cmdlib.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Tue, 9 Jul 2013 11:09:26 +0000 (13:09 +0200)]
cluster init: check for enabled disk templates
The purpose of this patch is to remove the usage of the
'ENABLE_FILE_STORAGE' constant. To get there, we do some
refactoring, add unit tests and add a FIXME for a forgotten
test regarding the file storage location.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Tue, 9 Jul 2013 11:04:03 +0000 (13:04 +0200)]
cluster verify: adjust path verification
This patch adjusts the verification of file storage paths
by checking the list of enabled disk templates instead
of the 'ENABLE_FILE_STORAGE' constant.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Tue, 9 Jul 2013 10:52:20 +0000 (12:52 +0200)]
Utility functions to check if a disk template is enabed
This patch adds some helper functions to the config and
storage utils which check whether a disk template is
enabled or not. The functions themselves are quite small
but they will be used quite often and therefore should
have a designated place.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Tue, 9 Jul 2013 10:40:59 +0000 (12:40 +0200)]
Add default file storage path to path utils
This patch adds the default storage path to the pathutils
for now. At the end of this patch series, it will no longer
be determined at configure time and therefore be removed
from the configure.ac file.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Fri, 12 Jul 2013 12:15:34 +0000 (12:15 +0000)]
Allow modify_etc_hosts to be changed
The modify_etc_hosts options, enabling the cluster to modify the /etc/hosts
files of nodes, and to keep them in sync, could only be set at cluster init
time.
With this commit it can now be changed through modify_etc_hosts as well.
Fixes Issue 206.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Fri, 12 Jul 2013 09:13:48 +0000 (09:13 +0000)]
Add --modify-etc-hosts option for CLI tools
The option will be used by gnt-cluster modify in the following commit.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Klaus Aehlig [Thu, 11 Jul 2013 08:33:50 +0000 (10:33 +0200)]
Add luxiReqQueryNetworks to LuxiOp
When the QueryNetwork was introduced as a method, apparently
it was forgotten in the Haskell world. Add it here as well.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Klaus Aehlig [Wed, 10 Jul 2013 14:58:10 +0000 (16:58 +0200)]
Log received message at debug level
At debug level, we can well afford to have a detailed entry
for each message received by a server.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Thu, 11 Jul 2013 12:59:50 +0000 (12:59 +0000)]
Set the correct group for confd
Starting confd as a member of the daemons group allows the RAPI daemon to access
the LUXI socket.
Fixes Issue 477.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Wed, 10 Jul 2013 14:48:05 +0000 (14:48 +0000)]
Log RPC errors from inside executeRpcCall
executeRpcCall is the function to be used for executing RPCs, so it makes sense
to use it as the single point for logging all thte RPC call errors.
Fixes Issue 293.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Wed, 10 Jul 2013 14:39:33 +0000 (14:39 +0000)]
Factor out the logRpcErrors function
This function can be useful to multiple RPC calls, therefore it is moved
to the file containing the common RPC functions.
Also, it is made more generic by changing its signature.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Leon Handreke [Wed, 10 Jul 2013 13:46:04 +0000 (14:46 +0100)]
Expose bulk parameter for GetJobs in RAPI client
This patch exposes the bulk argument of the jobs resource on
the RAPI python wrapper, making it possible to retrieve status
information about all jobs with a single call.
Signed-off-by: Leon Handreke <lhandreke@google.com>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Wed, 10 Jul 2013 14:07:41 +0000 (16:07 +0200)]
Add git send-email to the chroot
"git send-email" is used as part of the official workflow but it was not
installed in the chroot.
This patch adds it.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Wed, 10 Jul 2013 11:32:46 +0000 (11:32 +0000)]
Add tests for CanRead
Verify that the CanRead function is actually able to check whether a file has
the proper permissions.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Christos Stavrakakis [Wed, 10 Jul 2013 10:48:21 +0000 (13:48 +0300)]
Fix RAPI to include missing network fields
Fix RAPI interface to include missing network fields. Specifically, fix
instance queries to include the network name for instance NICs. Also fix
network queries to include missing common fields, like uuid and serial.
Signed-off-by: Christos Stavrakakis <cstavr@grnet.gr>
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Christos Stavrakakis [Wed, 10 Jul 2013 10:48:20 +0000 (13:48 +0300)]
Add support for querying network timestamps
Add creation and modified timestamps when creating a new network, and
extend the available query fields for networks with these fields,
namely 'ctime' and 'mtime'.
Signed-off-by: Christos Stavrakakis <cstavr@grnet.gr>
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Helga Velroyen [Thu, 4 Jul 2013 15:32:25 +0000 (17:32 +0200)]
Unittesting for instance_storage._CheckNodesFreeDiskOnVG
This patch refactors the '_CheckNodesFreeDiskOnVG' of
cmdlib.instance_storage to make it at least a little
more testible and provides the unit tests for it.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Thu, 4 Jul 2013 15:30:17 +0000 (17:30 +0200)]
Unit tests for _GetVgInfo
This patch provides unit tests for the backend's
_GetVgInfo function. In order to mock the underlying
backend function, it was necessary to make it an
optional parameter of the function.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Thu, 4 Jul 2013 13:53:30 +0000 (15:53 +0200)]
Fix module functions overridden by mocks
This patch fixes remaining occurrences of module functions
that were overridden by mock functions. They need to be
set back to their original functions after the test case
ends.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Thu, 4 Jul 2013 13:48:32 +0000 (15:48 +0200)]
Unit tests for _GetVgSpindlesInfo
This patch provides unit tests for _GetVgSpindlesInfo.
In order to mock the used function for the 'bdev' module
I made the low-level storage function an optional parameter
of _GetVgSpindlesInfo. I also found out that mocked
module functions stay mocked even after the execution
of the text finished. Fixed this for one occurrence. More
in the next patch.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Thu, 4 Jul 2013 13:22:54 +0000 (15:22 +0200)]
More sanity checks for spindle space reporting
This patch adds a wrapper around the space reporting
for spindles which includes more sanity checks for
the input. Unit tests provided.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Thu, 4 Jul 2013 13:08:42 +0000 (15:08 +0200)]
Tighten sanity checks for '_GetLvmVgSpaceInfo'
This patch tightens the sanity checks for the input of
'_GetLvmVgSpaceInfo' and provides unit tests for it.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Thu, 4 Jul 2013 12:35:49 +0000 (14:35 +0200)]
Factor out check for storage params
This patch factors out the sanity checks for storage
parameters in its own function. Unit tests included.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Spyros Trigazis [Mon, 8 Jul 2013 15:45:02 +0000 (18:45 +0300)]
Add design for mond's CPU load collector
This commit extends monitoring agent's design document, with the
design of a new data collector that will provide CPU load statistics.
It also extends the monitoring agent's design to include:
* a new thread which triggers the collection of data
* the appropriate map to store the collected data
* a new collection function for the data collectors
Signed-off-by: Spyros Trigazis <strigazi@gmail.com>
Signed-off-by: Constantinos Venetsanopoulos <cven@grnet.gr>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Jose A. Lopes [Wed, 10 Jul 2013 10:35:11 +0000 (12:35 +0200)]
Fix single-execution of Haskell tests and shelltests
Add Makefile.am target hs-test-% for single-execution of Haskell
tests.
Add Makefile.am target hs-shell-% for single-execution of Haskell
shelltests.
Update documentation on running individual tests.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Tue, 9 Jul 2013 15:05:48 +0000 (17:05 +0200)]
Only generate node lists with nodes having different names
genNodeList is used in testing to generate list of nodes
that could come up in cluster configurations. Since names
are used to assign indices to nodes, they have to be unique;
this is also the case in all real clusters.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Iustin Pop <iusty@k1024.org>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Wed, 10 Jul 2013 09:04:40 +0000 (11:04 +0200)]
Add missing newline to the NEWS file
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Tue, 9 Jul 2013 16:55:02 +0000 (16:55 +0000)]
ConfD-related NEWS file update
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Tue, 9 Jul 2013 16:49:19 +0000 (16:49 +0000)]
Add monitoring daemon updates to the NEWS file
The "inst-status-xen", "diskstats" and "lv" data collectors have been added.
The daemon is now running as root.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Tue, 9 Jul 2013 16:05:00 +0000 (18:05 +0200)]
Cluster verify checks server.pem permissions
Currently, ConfD must be able to access server.pem (though this is likely to
change in the future). If this is not true, all sorts of weird things happen,
such as "gnt-node list" printing lots of question marks instead of actual
data, with no meaningful error.
This patch adds a check for the proper access permission to
"gnt-cluster verify".
Fixes Issue 518.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Tue, 9 Jul 2013 16:02:07 +0000 (18:02 +0200)]
Add function for checking file access permissions
The CanRead function checks whether a user of the local machine (specified
by name) can access a given file.
IsUserInGroup is a helper function for CanRead, but might also be used
independently, so its name does not begin with an underscore.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Sebastian Gebhard [Tue, 9 Jul 2013 14:18:20 +0000 (16:18 +0200)]
More details on vlan support in openvswitch
This design doc give a more detailed design about the implementation
of openvswitch in regareds of VLANs.
Signed-off-by: Sebastian Gebhard <sege@fs.ei.tum.de>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>