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.
Signed-off-by: Helga Velroyen <helgav@google.com>...
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.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
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.
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.
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.
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 _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...
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.
Tighten sanity checks for '_GetLvmVgSpaceInfo'
This patch tightens the sanity checks for the input of'_GetLvmVgSpaceInfo' and provides unit tests for it.
Factor out check for storage params
This patch factors out the sanity checks for storageparameters in its own function. Unit tests included.
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....
Add missing newline to the NEWS file
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
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.
More details on vlan support in openvswitch
This design doc give a more detailed design about the implementationof 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>
Fix type error in the call of _NetworkConflictCheck
The function _NetworkConflictCheck expects a list of instances aslast argument, not a list of pairs of instance names and instances.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Merge branch 'stable-2.8' into master
Merge branch 'stable-2.7' into stable-2.8
Conflicts: NEWS: trivial configure.ac: trivial
Signed-off-by: Klaus Aehlig <aehlig@google.com>...
Add documentation for the LV collector
Documentation added in the mon-collector man page.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
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.
Factor out lv info gathering function
The buildJsonReport function will soon have to perform the coupling ofinstance data with LVInfo data. In preparation for that, in order to makeit more readable, the instructions for obtaining LVInfos are factored out...
Add "instance" field to LVInfo
Extend the LVInfo data structure with the field for storing the name ofthe instance it is paired with.
Update the tests accordingly.
Better specify LVInfo "instance" field
Specify that it is serialized as "null" if empty.
Factor out the getInstances function
The getInstances function can be useful in general, but is defined insidethe InstStatus data collector. This commit takes it out and adds it toa proper (newly created) library.
Signed-off-by: Michele Tartara <mtartara@google.com>...
Also remove prop_IterateAlloc_sane from test list
In f4d1bb7 that test was removed, but forgotten to remove itfrom the list of tests to be executed. Fix that.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Disable failing QA test
See issue 516 for an explanation of the problem, and why it was requiredto disable this test.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Fix documentation for prop_Alloc_sane
As discussed in the last commit, placing a new instance on the clustercan lead to a cluster that can be improved by moving previously addedinstances. For an empty cluster, however, there are no previousinstances. So add this to the test description to make obvious why...
Remove IterateAllocSane test
The test is testing for a property that just isn't true. Iteratedallocation greedily place one instance at a time taking the locallymost balanced solution. Then it is tested whether the resulting globalallocation can be improved....
Release version 2.7.0
We don't have notice of anything blocking for 2.7, and it's been inrelease candidate state long enough. Any future problems can beaddressed as bugfixes.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Disable enabled-template-test for exclusive storage
This patch disables the tests regarding enabled disktemplates for exclusive storage, because the semanticsthere are different and not covered in the test.
Fix propagation of storage parameters to/from backend
This patch fixes two problems with the storage reportingthat showed up in the QA for exclusive storage:
- The processing of storage space information for instance operations wrongly assumed that the volume group's...
Fix typo in iallocator
Fix gnt-network info
QueryNetworks() returns the uuids of the instances that areinside a network. Since QueryInstances() uses names and not uuidsfor search, we create a uuid2name dict to get each instance nameand then retrieve its nics and networks.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>...
Extraction of storage info by type
There was a bug in the node queries. It was assumed thatthe returned storage space information was in a particularorder. With the changes in the storage reporting, thisorder is not that reliable anymore, in particular, the...
Improve handling of storage info
This patch improves the processing of storage informationas result of the 'node_info' call in the following way:- It removes the override for LVM storage. This was needed in MakeLegacyNode info to be compatible to the...
Mention default disk template in NEWS file
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Add default disk template selection to man pages
This documents the newly implemented behavior of pickingthe disk template from the list of enabled disk templateson instance creation.
Mention alternative template selection in design doc
This is a small adjustment of the design doc'design-storagetypes.rst' with respect to the selectionof the default disk template.
Let instance creation fall back to default disk template
So far, the '-t' option of 'gnt-instance add' is mandatory.This patch makes it optional. In case, no disk template isspecified, the first of the list of enabled_disk_templatesis used.
LUInstanceCreate: factor out disk checks
The 'CheckArguments' method of 'LUInstanceCreate' is waytoo long and should be broken up in smaller pieces. Thispatch starts with that and factors out the disk checks.No functional changes whatsoever.
Fix "instance replace" typo in admin.rst
gnt-instance `replace` should read `replace-disks`
Clean up work around for host name filtering
These functions simply served as a work around to expresshost name matching by regular expressions, instead of usingcorrect equality filter on host names that providesthe correct matching already.
Do not handle host queries special
As, since 91c1a265, the equality used for host names alreadyis based on matching, there is no need to use a special functionfor this any more.
Document the 'protocol' disk parameter
Document the new disk parameter 'protocol' which is used to set the DRBDreplication protocol.
Make DRBD replication protocol configurable
Add a new disk parameter which allows to choose the DRBD replicationprotocol. The protocol is fixed to "C" during dual primary mode though.
Revert "QA: Make Query tests test for '?' values"
This reverts commitbfbef99b9f056638411aa894e300aa095132e931. The problem is thatin some cases it makes sense for '?' to be displayed. Thisis the case for storage reporting on clusters that have onlythe 'diskless' disk template enabled. It would be nicer,...
Add QA test for verify-disks with broken DRBD
gnt-cluster verify-disks supports automatic activation of broken DRBDdisks. This new QA test verifies that it actually finds instances withbroken DRBD disks and activates the disks of those instances.
Signed-off-by: Thomas Thrainer <thomasth@google.com>...
Check DRBD status on verify-disks
Enhance `gnt-cluster verify-disks` such that it checks the DRBD statusof all disks. If the status of at least one disk of an instance iseither StandAlone or Diskless, the instance disks are activatedautomatically.
Make names more descriptive
LUGroupVerifyDisks had some not very descriptive names which made ithard to read and understand the code. This patch renames some methodsand variables to make it more readable.
Also, the return type of MapInstanceLvsToNodes was changed to contain...
Fix typo in the install guide
QA: Make Query tests test for '?' values
When something goes wrong in the Haskell implementation ofqueries, the 'gnt-* list' command does not actually fail,but it just displays '?' as a sign of failure. We so fardo not test for that, which makes errors in the haskell...
Turn 'exclusive_storage' into storage parameter (hs)
This is the haskell implementation of my patch "Extend RPC call'node_info' by storage parameters". It turns the 'exclusivestorage' flag into a storage parameter of the LVM storage types.Besides that, this patch moves some types into the Types.hs....
noded.py: remove fallback of 'node_info'
In order to change backend and frontend code of the RPCcall 'node_info' in separate patches, we included afallback to the old implementation. Since all RPC callersare adjusted, this can be removed now.
Extend RPC call 'node_info' by storage parameters
This patch extends the actual RPC call to accept storageparameters with each storage units. It adjusts all codewhich performs this code by integrating the 'exclusivestorage' flag into the lvm storage unit....
Add general storage parameters to node info call
As described in the design doc about storage types,we plan to generalize the RPC call "node info" wrt tostorage types. This patch extends the call by acceptinga list of storage units, that is not only identified...
backend unit tests: remove unused imports and variables
This patch removes some unused imports and an unusedvariable of the backend unit test. No functional changesotherwise.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Fix error in installation instructions
Remove erroneous trailing "\"
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Prevent LV parser compile error
The LV parser is not compiled correctly by more recent versions of GHCbecause of more strict checks.
lvCommand is a surely non-empty list, but the compiler still refuses itasking for explicitly management of the empty list case....
Add htools shell test for VCPU handling
This tests that VCPUs used by both instances and node OS are correctlyaccounted in allocation.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Load CPUs used by the node OS in htools
A new field is added to the Node type, and it's used to initialize the usedCPUs field.
The signature of Node.create has been split among lines to match theparameter list.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>...
Export CPUs used by the node OS
They are exported through the LUXI, RAPI, and IAllocator interfaces.
Hypervisors report CPUs used by the node OS
The XenHypervisor's "dom0_cpus" parameter (introduced in 1d60fec6 but neverused) is renamed to "cpu_dom0" for consistency with other parameternames. The analogous information is returned for the other hypervisors....
Fix docstrings for hypervisor functions returning node info
The documentation was out-of-sync with the code.
Add LV collector to the monitoring daemon
Allow the monitoring daemon to use the LV data collector.
Add tests for the LV data collector
This commit adds a few shelltests for the logical volume data collector.
Also, it performs some cleanup of the comments already present in the file:given that the number of the tests should be changed manually, and this is...
Add LV data collector
This commit adds the LV data collector.
Also, the lvCommand function was not providing the correct value as expected bythe readProcess function, so it was fixed.
Add tests for LVs parser
Add unit tests and Quickcheck tests for the LV parser.
Also, fix the alphabetic order of some imports in htest.hs.
Add function testing parsers with QuickCheck
Parsing a string automatically generated by QuickCheck can be useful in manycases. A function for doing this is added to the common test functions.
Add function for generating arbitrary UUID
Add a function for generating arbitrary UUIDs to be used for QuickCheck tests.
Add LV parser
Add the parser for getting the information about the logical volumes in thesystem.
Add design for LV data collector
Add a section describing the logical volume data collector to the designdocument for the monitoring agent.
Minor fixes to monitoring design doc
Add a missing full stop, and fix a sentence about the storage collectors.
Fix documentation formatting issue
One line was longer than 80 characters.
Add test for the --full-evacuation option
In this example cluster, there are four pairs of nodes, each hostingtwo instances. Each node has disk capacity for an additional instance.Therefore, for normal online rolling reboots, there are two node groups,...
hroller: option --full-evacuation
Add an option to hroller, to plan for full evacuation of thenodes to be rebooted, i.e., also plan for replacement secondarynodes for all instances on the node after migrating out instanceswith this node as primary.
Extract a partition functional
Separate the partitionNonRedundant function in hroller into ageneral functional that partitions a list of nodes accordingto some clearing strategy and the specialization of movingnon-redundant instances out. In this way, we don't have to...
Extract functional for greedily clearing nodes
The method clearNodes in hroller greedily clears nodes ofnon-redundant instances by moving them to a different node. This patchseparates the greedy clearing algorithm from the specialization tonon-redundant instances; in this way, we don't have to duplicate code...
Make hroller not consider offline nodes for evacuation
When planing on where to evacuate the non-redundant instancesof the nodes to be rebooted, it doesn't make sense to consideroffline nodes. So add this restriction to hroller.
Update comments in hroller code
hroller schedules moves of instances to have rebooted nodesfree of instances with this node as primary. Update the commentsto reflect that this move planning is for non-redundant instancesonly.
Clarify meaning of --print-moves in hroller man page
When given the option --print-moves, hroller prints a list ofinstance relocations after each reboot group. This sequentialpresentation can lead to the wrong impression, that these areall the moves to be carried out. Therefore, explicitly mention...
Remove obsolete TODO
Originally, hroller started as a tool for offline maintenance only.There it made sense to warn about instances still running. By now,default planning is to migrate instance off the nodes to be rebooted,with options for other behavior (like pretending that all instances...
Allow customization of the chroot
As different users have different needs about the chroot, allowcustomization in its build script. This is achieved as follows.- The environment variable EXTRA_DEBIAN_PACKAGES is honored, and the packages named there are additionally installed in...
build_chroot: fix duplicate install
In the last change to the chroot build script, theapt-get command 'install' was moved to the APT_INSTALLmacro; however, it was forgotten to remove it outsidethe macro, causing an error, as there is no packagewith name 'install'....
build_chroot: use APT_INSTALL macro for packet installation
In this way, it is easier to change all the apt calls in the chroot.In particular, this patch fixes the missing -y option for the installationof the tools needed to build debian packages.
Don't exceed the standard PV size when growing a disk
With exclusive storage, PVs are supposed to be used only up to thestandard PV size.
Enable disk growth with exclusive storage
Disk growth is now supported also with exclusive storage, so we let theoperation continue.
Enable disk growth test in qa also with exclusive storage.
Limit the PVs used for disk growth with exclusive storage
The exclusive storage flag is passed along in the backend functions fordisk growth. LVM volumes handles the flag by reusing the same PVs, as disksare constrained by the number of their spindles....
Add exclusive_storage to blockdev_grow RPC
The flag is passed to the RPC, but it's still ignored by noded.
Design doc for openvswitch support
This patch includes the design document for openvswitch support
Make NIC setup more flexible in case of Xen
For every NIC write down a file that contains NIC'sinfo (MAC, mode, link, network details), that canbe sourced by any vif script. The file location is:/var/run/ganeti/xen-hypervisor/nic/<domname>/<nicidx>....
Refactor NIC configuration scripts
Add new script vif-ganeti that could be used instead ofdefault vif-bridge in order NIC customization can be moreflexible.
Extract common code from kvm-ifup and insert it in a newfile net-common that is being sourced by kvm-ifup and...
Document vif-ganeti usage
In order to be able to use it as vif-script one has tocreate a symbolic link inside /etc/xen/scripts pointingto /usr/lib/ganeti/vif-ganeti and then add is a hypervisorparameter.