Remove extra whitespace
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Fix KeyErrors with network mode and vlan
This patch fixes some KeyErrors that were introduced by the vlan implementationand showed up when certain parameters were missing:gnt-cluster init without network modegnt-isntance add without vlan
Signed-off-by: Sebastian Gebhard <sege@fs.ei.tum.de>...
Design document for cmdlib unit tests
This design document describes the plan to create a test framework andactual unit tests for the cmdlib module.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Update the lists of users and groups for LuxiD
After adding LuxiD, the list of daemons has to be updated in the tests aswell.
Cluster upgrade for 2.10 must be run against 2.9
Add a 2.9 configuration file and modify the test to use it.
Upgrade minimal cluster configuration
The minimal cluster config has changed, but the sample in the tests had notbeen updated yet.
Merge branch 'stable-2.9' into master
Update Gluster Ganeti Support doc
Update the document as agreed on the mailing list: the projectshould be realized in two parts: one is for supporting Xen VMs(similarly to the sharedfile template) and the other one forQEMU/KVM VMs.
Signed-off-by: Weiwei Jia <harryxiyou@gmail.com>...
Merge branch 'stable-2.8' into stable-2.9
Conflicts: src/Ganeti/Utils.hs (trivial)trivial
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Let ReqNodeInstances work with node UUIDs
The "primaryNode" and "secondaryNode" fields of "Instance" entities in thecluster configuration where changed to use UUIDs instead of names. TheReqNodeInstances query inside Confd was not upgraded yet, and was thus...
Add documentation line to getNodeInstances
Add debug logging to Confd
Knowing the replies actually sent helps tracking down problems much moreefficiently.
Set default OVS in cluster init
This commit adds functionality to gnt_cluster to set the defaultmaster-netdev for openvswitch, when openvswitch mode is configured,instead of DEFAULT_BRIDGE.
Signed-off-by: Sebastian Gebhard <sege@fs.ei.tum.de>Signed-off-by: Klaus Aehlig <aehlig@google.com>...
Adopt cfgupgrade to support vlan parameter
This patch updates cfgupgrade to support vlans.Downgrade will remove the vlan information and give a warning.
Add VLAN functionality to gnt-instance man page
This patch adds the description of OpenvSwitch VLAN functionalityto the man page of gnt-instance.
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>
Support VLAN parameter during instance creation
If VLAN parameter is present, check its format:either .<id>[:id], :id[:id...], or just id.
Add VLAN-capabilities for Xen Hypervisor
This implementation depends on vif-openvswitch provided by Xen 4.3and provides Xen with switch name and vlan as "link".
Extending nicparams to support vlan parameter
This parameter is used to store the vlans each nic is connected to.It is only used if the network is in openvswitch mode.
Improvement of design-openvswitch.rst
Some improvements / fixes that came up during implementation.
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 permissionof the socket instead of changing the permission the confd process is run...
Add hs function to easily change file ownership
The Haskell library functions only allow to change file ownership usinguid/gid. A function for doing that with explicit names is added by thiscommit.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Rename queryd to luxid
As queryd will, in the future, handle all LUXI request, queue jobs andmost likely perform various other tasks, it is renamed to luxid already.This will safe some headache when upgrading Ganeti installations, as wedon't have to deal with a daemon rename....
Fix deprecation warning about exception
This fixes a deprecation warning regarding the retrievalof the error message from an exception.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Move bdev unit tests to filestorage unit tests
Some code was moved from bdev to file storage inprevious patches, but the related unit tests wereaccidentally left in bdev. Moving and adjustingthem now.
Signed-off-by: Helga Velroyen <helgav@google.com>...
Fix iallocator unit tests
This fixes the unit test for the iallocator. The fixis necessary, because a renamed functions was not properlyrenamed in the tests as well.
GenerateDiskTemplate: Proper check for valid disk templates
This patch makes an FileStorageError to be risen with aproper error message instead of just an assertion in casethe given disk template is not a valid disk template atall.
Document the rapi client not to have a QueryNetworks method
While there is a luxi query QueryNetworks, the rapi client does notprovide such a method. Document this by declaring it in theKNOWN_UNUSED_LUXI calls.
Signed-off-by: Klaus Aehlig <aehlig@google.com>...
Enable unit tests again
A while ago, the execution of python unit tests wasaccidentally disabled for distcheck. This patchenables them again. This will lead to a couple oftests failing, but we decided to submit this firstand then fix the broken tests in separate patches....
Document ganeti-queryd
Add a man page for ganeti-queryd and update the documentation forganeti-confd in various places.
Add ganeti-queryd to QA env test
Test for the newly introduces ganeti-queryd in the environment test ofQA.
Add queryd daemon (split from confd)
queryd is added as a new daemon which handles configuration queries overLUXI. This functionality was removed from confd, which now only queriesover the network.
The queryd user is added to the master group such that it can access...
Extract ConfigReader from Confd/Server.hs
Confd's functionality to watch the Ganeti configuration file isextracted to the ConfigReader module. No functional changes areintroduced.
This extraction makes will enable us to split queryd from confd, asqueryd will have to use the same functionality....
Design Doc for HugePages Support
Add design document for the "HugePages support" GSoC project.
Signed-off-by: Izhar ul Hassan <ezhaar@gmail.com>Reviewed-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Add unit test for drbdsetup show parsing
This unit test checks for proper parsing of the output from `drbdsetupshow` when re-attaching the local disk. In this case, disk parametersare not (yet) set, so the corresponding dict is empty.
Signed-off-by: Thomas Thrainer <thomasth@google.com>...
Revert "Disable failing QA test"
This reverts commit b2525349f0da75c74432f2dd85abbcad56e56fed.
Issue 516 was fixed, so now the QA test can be re-enabled again.
Fix parsing of drbdsetup show output for DRBD 8.4
DRBD 8.4 contains two `disk` entries under the `volume` section. In somecircumstances, the parsing code could wrongly use the empty one whichcauses DRBD8Dev._SlowAssemble() to fail. This fixes issue 516....
Reset cfgupgrade --downgrade to be a no-op
In version 2.10 cfgupgrade --downgrade is supposed to downgradethe configuration to version 2.9 which, at the moment, is stillthe same as 2.10.
Improve debugging output of DRBD8 status
Signed-off-by: Brian Candler <b.candler@pobox.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Add timestamps to haskell network query fields
Add timestamp fields to the list of available network query fields inthe Haskell code.
Signed-off-by: Christos Stavrakakis <cstavr@grnet.gr>Reviewed-by: Helga Velroyen <helgav@google.com>
Bump version number after forking off 2.9
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Fix conflicts check in LUNetworkDisconnect
The function _NetworkConflictCheck expects a list of instances aslast 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>...
Merge branch 'stable-2.8' into master
Merge branch 'stable-2.7' into stable-2.8
Conflicts:...
Change method dispatch in ClientOps to enforce luxi.REQ_ALL
ClientOps' handle_request dispatches on the luxi request received. Changethis to first verify if the request is luxi.REQ_ALL. In this way, we catchprogramming errors introducing "secret" luxi requests earlier. This is relevant,...
Update documentation and NEWS wrt to file storage dir
This patch updates the 'gnt-cluster' man page and the NEWSfile regarding the changes related to the file storageen/disabling and the configuration of the file storagedirectory.
Verify file storage path
This patch adds two verification steps to 'gnt-clusterverify':- 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....
Prepare verification code for new file path verification
This patch prepares the verification code for addinga 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...
Remove file storage path from autoconf
This patch removes the option to configure the filestorage path at configure time, because it is nowreplaced by a runtime option for gnt-cluster init.
QA: Adjust QA for file storage
This improves the QA code wrt to file storage in thefollowing 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...
storage utils: read file storage dir from cluster config
This patch make the storage utils read the file storagedirectory from the cluster config instead of the constants.
Remove ENABLE_FILE_STORAGE completely
This patch removes the ENABLE_FILE_STORAGE completelyfrom the remaining files, such as Makefile, configure,constants, pathutils and objects.
cluster-merge: remove usage of 'ENABLE_FILE_STORAGE'
This patch adjusts the cluster-merge tool so that it doesno longer check the constant 'ENABLE_FILE_STORAGE' butthe clusters' configurations.
QA: Adjust test whether file storage is enabled
This patch fixes the node storage QA, which checked whetherfile storage is enabled by looking at the constant'ENABLE_FILE_STORAGE'. QA should rather retrieve thisinformation from the QA config.
Opcodes: move storage type checks to cmdlib
So far, there was a static check whether or not a givenstorage type of an opcode was enabled. This check isno longer possibe at this layer, because the informationwhether or not file/shared file storage is enabled must...
cmdlib: remove usage of ENABLE_FILE_STORAGE
This patch removes all usages of the constant'ENABLE_FILE_STORAGE' from the cmdlib code andreplaces them by checking the cluster's configuration.
backend: remove ENABLE_FILE_STORAGE
This patch removes the usage of the ENABLE_FILE_STORAGEconstant in the backend code. To avoid having to passit through various RPC calls, we instead move the checkto cmdlib.
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 somerefactoring, add unit tests and add a FIXME for a forgottentest regarding the file storage location....
cluster verify: adjust path verification
This patch adjusts the verification of file storage pathsby checking the list of enabled disk templates insteadof the 'ENABLE_FILE_STORAGE' constant.
Utility functions to check if a disk template is enabed
This patch adds some helper functions to the config andstorage utils which check whether a disk template isenabled or not. The functions themselves are quite smallbut they will be used quite often and therefore should...
Add default file storage path to path utils
This patch adds the default storage path to the pathutilsfor now. At the end of this patch series, it will no longerbe determined at configure time and therefore be removedfrom the configure.ac file.
Allow modify_etc_hosts to be changed
The modify_etc_hosts options, enabling the cluster to modify the /etc/hostsfiles of nodes, and to keep them in sync, could only be set at cluster inittime.
With this commit it can now be changed through modify_etc_hosts as well....
Add --modify-etc-hosts option for CLI tools
The option will be used by gnt-cluster modify in the following commit.
Add luxiReqQueryNetworks to LuxiOp
When the QueryNetwork was introduced as a method, apparentlyit was forgotten in the Haskell world. Add it here as well.
Log received message at debug level
At debug level, we can well afford to have a detailed entryfor each message received by a server.
Set the correct group for confd
Starting confd as a member of the daemons group allows the RAPI daemon to accessthe LUXI socket.
Fixes Issue 477.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Log RPC errors from inside executeRpcCall
executeRpcCall is the function to be used for executing RPCs, so it makes senseto use it as the single point for logging all thte RPC call errors.
Fixes Issue 293.
Signed-off-by: Michele Tartara <mtartara@google.com>...
Factor out the logRpcErrors function
This function can be useful to multiple RPC calls, therefore it is movedto the file containing the common RPC functions.
Also, it is made more generic by changing its signature.
Expose bulk parameter for GetJobs in RAPI client
This patch exposes the bulk argument of the jobs resource onthe RAPI python wrapper, making it possible to retrieve statusinformation about all jobs with a single call.
Signed-off-by: Leon Handreke <lhandreke@google.com>...
Add git send-email to the chroot
"git send-email" is used as part of the official workflow but it was notinstalled in the chroot.
This patch adds it.
Add tests for CanRead
Verify that the CanRead function is actually able to check whether a file hasthe proper permissions.
Fix RAPI to include missing network fields
Fix RAPI interface to include missing network fields. Specifically, fixinstance queries to include the network name for instance NICs. Also fixnetwork queries to include missing common fields, like uuid and serial....
Add support for querying network timestamps
Add creation and modified timestamps when creating a new network, andextend the available query fields for networks with these fields,namely 'ctime' and 'mtime'.
Signed-off-by: Christos Stavrakakis <cstavr@grnet.gr>...
Factor out check for storage params
This patch factors out the sanity checks for storageparameters in its own function. Unit tests included.
Tighten sanity checks for '_GetLvmVgSpaceInfo'
This patch tightens the sanity checks for the input of'_GetLvmVgSpaceInfo' and provides unit tests for it.
More sanity checks for spindle space reporting
This patch adds a wrapper around the space reportingfor spindles which includes more sanity checks forthe input. Unit tests provided.
Unit tests for _GetVgSpindlesInfo
This patch provides unit tests for _GetVgSpindlesInfo.In order to mock the used function for the 'bdev' moduleI made the low-level storage function an optional parameterof _GetVgSpindlesInfo. I also found out that mocked...
Fix module functions overridden by mocks
This patch fixes remaining occurrences of module functionsthat were overridden by mock functions. They need to beset back to their original functions after the test caseends.
Unit tests for _GetVgInfo
This patch provides unit tests for the backend's_GetVgInfo function. In order to mock the underlyingbackend function, it was necessary to make it anoptional parameter of the function.
Unittesting for instance_storage._CheckNodesFreeDiskOnVG
This patch refactors the '_CheckNodesFreeDiskOnVG' ofcmdlib.instance_storage to make it at least a littlemore testible and provides the unit tests for it.
Add design for mond's CPU load collector
This commit extends monitoring agent's design document, with thedesign of a new data collector that will provide CPU load statistics.It also extends the monitoring agent's design to include:
Fix single-execution of Haskell tests and shelltests
Add Makefile.am target hs-test-% for single-execution of Haskelltests.
Add Makefile.am target hs-shell-% for single-execution of Haskellshelltests.
Update documentation on running individual tests....
Only generate node lists with nodes having different names
genNodeList is used in testing to generate list of nodesthat could come up in cluster configurations. Since namesare used to assign indices to nodes, they have to be unique;this is also the case in all real clusters....
Add missing newline to the NEWS file
ConfD-related NEWS file update
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.
Add function for checking file access permissions
The CanRead function checks whether a user of the local machine (specifiedby name) can access a given file.
IsUserInGroup is a helper function for CanRead, but might also be usedindependently, so its name does not begin with an underscore....
Cluster verify checks server.pem permissions
Currently, ConfD must be able to access server.pem (though this is likely tochange 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...
More details on vlan support in openvswitch
This design doc give a more detailed design about the implementationof openvswitch in regareds of VLANs.
Prevent silent failure in case of connection problems
While running "gnt-node list", if a query to ConfD fails (especiallybecause of permission problems) it used to just fail silently, with gnt-nodeshowing question marks instead of data.
With this patch, ConfD records the error in its log file, together with a...
Fix type error in the call of _NetworkConflictCheck
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
In the crontab example, look for the correct binary
When ganeti-master-cleaner was merged back into ganeti-cleaner in 46118ed2,the binary to test for should have also been updated. Do this now.
Fix apt-get invocation in chroot_builder
Use the macro containing all the required parameters, instead of just using"apt-get install".
Fix wrong numbering in UPGRADE documentation
Conflicts: NEWS: trivial configure.ac: trivial
Add documentation for the LV collector
Documentation added in the mon-collector man page.
Include "instance" information in LV data collector
This commit enables the logical volume data collector to get information aboutthe instances and to link it to the information about logical volumes.
The list of parameters accepted by the collector is expanded to allow proper...
Add "includeLogicalId" function for Disks
This function checks whether a disk contains a given Lvm logical ID,directly or through its children.
Unit tests are added as well.
Add option for loading serialized instances
Monitoring CLI tools might have to load serialized lists of instances(mainly for testing reasons). This patch adds an option to allow that.