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.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Design doc for openvswitch support
This patch includes the design document for openvswitch support
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>
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.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>...
Update design document for hroller
The requirement to be able to plan full node evacuation came up afterthe initial design. So add a section describing the algorithm, iffull evacuation is requested.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
iallocator: storage processing accepts space_info structure
This is a small refactoring to make the processing ofthe storage space information not accept a node inforesult, but the more specific space info structure instead.
Signed-off-by: Helga Velroyen <helgav@google.com>...
iallocator: get rid of MakeLegacyNodeInfo
So far, the iallocator makes a node info call, convertsthe result into a legacy node info structure and thenretrieves various values from it. This patch removesthe call to MakeLegacyNodeInfo completely, by letting the...
iallocator: factor out instance memory summation
The iallocator adjusts the free memory by a calculationof how much memory is actually currently used by instanceson the node. This calculation is rather complicated anddeserves its own function to increase testability. No...
iallocator: extract storage info directly from node info
So far, the iallocator made a node info RPC call, convertedthe result into a legacy node info format and then extractedthe storage information from that. This patch removes themiddle step of this procedure, skipping the legacy node info...
Make NodeInfo (hs) accept arbitrary storage types
So far, the Haskell implementation of NodeInfo justrequests storage information about volume groups.With this patch, storage info for abitrary storagetypes can be requested.
Storage utility functions for Haskell
In order to extend the Haskell version of the NodeInfoquery, we need some utility functions to deal withdisk templates and storage types.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
iallocator: computation of storage data
This patch extracts the processing of the storage-relateddata from the RPC call 'node_info' in a separate functionto increase testability. In addition, this patch containsunit tests for this function.
rpc.py: override default storage type in node info
This patch changes the semantics of dealing with the resultof the RPC call "node_info" when converting them into aLegacyNodeInfo. A legacy node info, can only hold storageinformation about one storage type, which so far was always...
iallocator: factor out 'get_attr' method
This patch extracts an inline 'get_attr' method to extractdata from the result of the RPC call 'node_info'. It was sofar an inline function in the middle of a bigger method, which madethe code hard to read.
iallocator: prepare RPC call 'node_info'
This patch does a small refactoring in the allocator. It extractsthe preparation and actual call of the 'node_info' call into aseparate function. This is done for better testability. No functionalchanges otherwise....
Typo in iallocator design doc
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Fix lint error
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Unset LV name if no LVM disk templates are enabled
If there are no LVM based disk templates enabled in QA, reset the LVname after the corresponding gnt-cluster modify tests. Otherwisegnt-cluster verify would complain about the missing volume group.
Also make sure that no disk templates requiring LVM are ever enabled...
Skip drbd-usermode-helper test if DRBD is disabled
Changing the drbd usermode helper in gnt-cluster modify fails if DRBD isnot installed on the nodes. Thus skip this test if DRBD is not in theset of enabled disk templates.
Signed-off-by: Thomas Thrainer <thomasth@google.com>...
Add route to VCluster network in vcluster-setup
This route is required on the Fedora test machine, as otherwise fpingwould not work and hang forever.
Replace tempfile by mktemp in QA code
The tempfile command only exists in Debian. In order to run the VClusterQA also on Fedora, replace its use by mktemp.
Merge branch 'stable-2.8' into master
Merge branch 'stable-2.7' into stable-2.8
Provide the right fix for the kvm_extra parameter
With the previous adjustment the arguments were boxed into one extraarray. This actually makes the parameter work (with the same caveats).
The manpage is also updated with the limitations.
Signed-off-by: Guido Trotter <ultrotter@google.com>...
kvm: don't pass whole extra as a single argument
If extra is longer than a single word passing it the way it was passedwon't work. Of course this solution is also only partial, as won't takeinto account any form of quoting. :/
NEWS and version updates for 2.7.0~rc3
Time for a new release.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
For node queries allow short forms of host names
For node queries use the host-name filter instead of the simpleequality-based one.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Provide a special filter for host names
For host names, usually short forms are used, e.g., node1 or node1.subinstead of the full qualified node1.sub.example.com. Therefore comparingnode names only by equality is too restrictive. This patch provides an...
gnt-cluster info (py): add enabled disk templates
This fixes issue 485. In the python implementation ofthe cluster config info, the enabled_disk_templateswere missing.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Fix node modify QA tests for large cluster
If the node count in a cluster exceeds the master candidate pool size(which is 10 by default), it's no longer possible to remove the mastercandidate role from a node without passing --auto-promote (even with--force). This behavior is perfectly fine, but the TestModifyNode QA...
Version bump to 2.8.0~beta1
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Change version numbers in documentation
Some of the documents have the version number of Ganeti. This commit updatesit in preparation for the 2.8 version bump.
Doc for GlusterFS Ganeti Support
This patch adds a design document for introducing GlusterFS Support in Ganeti.
Signed-off-by: Weiwei Jia <harryxiyou@gmail.com>Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Fix issue with python coverage tests
The recently introduced check for python libraries required only for testing(commit 27df5b736ef72b3b12c07f32d64dbac95fe7a5ba) was not correct. Thispatch fixes the issue.
Signed-off-by: Michele Tartara <mtartara@google.com>...
grow disk: call SetDiskID before blockdev_getsize
Missing this call caused blockdev_getsize to be called on the wrongphysical device, and fail.
This fixes Issue 497.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Catch DeviceCreationError unhandled exceptions
_CreateBlockDevInner is called twice in TLReplaceDisks. While thisshould be fixed, right now this leaves the DeviceCreationError exceptionunhandled, which causes a problem due to the fact that this exception...
Fix daemon QA tests
TestInstanceConsecutiveFailures now leaves the test instance in the samestate it got it.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Disable python test if required libraries are missing
Some python libraries are only needed for the tests, but not for runningGaneti. If those libraries are missing, just disable the Python tests.
Better specify what packages to install
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Improve install guide
Add command for updating the list of cabal packages, before startinginstalling them.
Fix typo in the documentation index
Fix typos in the documentation index
This patch fixes some typos in the documentation index.
Update security document wrt confd access to SSL cert
The fact that confd has been given access to the server.pem certificateneeds to be described in the security document.
Fix permissions of the queue archive dir
The permissions were set to 0740, but of course being a directory thecorrect permissions are 0750.
Add a warning about the restriction of gnt-node evacuate
Even though gnt-node evacuate should be able to evacuate all instancesat once, this currently is not the case. Add a warning about this deficitfor the time being.
Signed-off-by: Klaus Aehlig <aehlig@google.com>...
Add gnt-node migrate to QA
Make it possible to optionally run gnt-node migrate during QA.
Convert instance indices to UUIDs in configuration
cfgupgrade replaces the occurences of instance names (where they areused as index) with the instance UUID.
It also supports the inverse replacement, so downgrades aresupported too.
Index instances by their UUID
No longer index instances by their name but by their UUID in the clusterconfig. This change changes large parts of the code, as the followingadjustments were necessary: * Change the index key to UUID in the configuration and the...
Node-UUID related cleanup
Some variables which hold node UUID's are renamed to reflect theirindent better.Use cfg.GetNodeName(uuid) instead of cfg.GetNodeInfo(uuid).name whereappropriate.
Add tools for building deb packages to build_chroot
The chroot only had tools for building and testing Ganeti, but not forbuilding its Debian packages. They are added by this commit.
Fix wrong assert
An assert wrongly verified that the node name instead of the node UUIDis in the set of locked nodes. This patch fixes this.
Improve the final message of build_chroot
Give more precise instructions on the next steps to actually run thechroot.
Make build_chroot self-contained
The configuration file are included in build_chroot, and areautomatically created by the script if it is not able to find themalready in the directory pointed by $DATA_DIR.
Note that the configuration file directory is cleaned if it's temporary,...
Fix testGetHvDefaults testcase
The introduction of the migration_mode parameter to the fake hypervisorbroke the testGetHvDefaults. This patch fixes this by taking the defaultparameters of the fake hypervisor into account.
Fix instance add for missing node specs
Don't pass None to cfg.GetNodeNames. Instead, only resolve the nodenames if it's sure that the UUID list is valid.
This fixes issue 495.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Skip Xen monitoring QA for non-Xen clusters
Instead of asserting that the Xen instance status collector fails fornon-Xen clusters just skip the test completely.Otherwise QA would fail for non-Xen hypervisors if Xen happens to beinstalled on the cluster as well....
Add support to migration_mode in fake HV
The fake hypervisor pretends to support migration, but did not supportthe migration_mode parameter yet. As this parameter is required duringinstance migrations, support for it is added in this patch.
Adapt VCluster script to current situation
vcluster-setup is adapted to the current Ganeti command line arguments.Also, a bug for diskless instances in qa_instance is fixed.
Check DRBD status in cluster verify
If the status of DRBD disks is degraded or in a faulty state, issue anerror in cluster verify.
Add confd user to masterd group
The server.pem file is 0440 (materd_uid, masterd_gid) and cannot beaccessed by confd.
This patch contains a workaround for 2.8.0~beta1 (adding conf to themasterd group in the user setup tool, and remembering the users to...
In tiered allocation, cut non-promising shrinking tries
The heuristics for tiered allocation has been improved in that itchooses to shrink such a resource next where by shrinking only thisresource a valid allocation can be made, if such a resource exists....
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Version bump to 2.9.0~alpha1
Bump the version number to 2.9.0~alpha1.
This also requires updating version numbers in cfgupgrade tool.
Furthermore, a data file for test representing a 2.8 configuration had theversion number set to 2.7 in order to prevent tests failing while the current...
Fix reference to NodeInfo.name
This fixes a bug introduced during the move from node names to nodeUUIDs as indexes.
Also, a typo is corrected.
Merge branch 'stable-2.8' into 'master'
More agressively line break man pages
Newer versions of pandoc (as, e.g., shipped with Ubuntu 13.04)more agressively quote, in particular minus signs. That sometimesleads to unintended line breaks, which are a problem, if the newline starts with a dot....
Version bump to 2.8.0~alpha1
Now that alpha versions are supported, we can bump the version numberfor branch stable-2.8 to 2.8.
This also requires updating the cfgupgrade tool.
Thanks to the previous patches, all the other documents can be upgradedduring the alpha lifetime, before switching to beta (that will enable...
Revert "Storage utility functions for Haskell"
This reverts commit88d27b8aa8adc2e5ced773909f1d40812c5a6ea7.
Revert "Make NodeInfo (hs) accept arbitrary storage types"
This reverts commite89525a859b2e841c08fce506c0b68b97c7efe61.
Make cfgupgrade idempotent
One of the unit tests checks whether cfgupgrade's downgrade option isidempotent. It is, but a version number check made it impossible toactually downgrade multiple times.
With this change, both the current-version version number and the...
Update config version number when downgrading
The downgrade option of the cfgupgrade tool was not changing the versionnumber in the configuration file of the cluster while performing thedowngrade.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Rename directory 'Block' to 'Storage'
This patch renames the 'Block' directory to 'Storage' inthe Haskell code base. The same rename was done in thepython code base earlier this quarter. We generalize thename, because we needed a place for general storage...
Add test for shrink heuristics over different resources
In this example, memory prevents adding more than one instance onthe first node. Yet, on the other nodes, 2 instances can be placedeach, if disks are shrunk appropriately. This, however, requiresto courageous decision to shrink disks next, even though more nodes...
Improve hspace shrinking strategy
In tired allocation, hspace shrinks that resource of the instancenext, that causes failure on most nodes. While, this is not a badstrategy in general, it can lead hspace into a dead end if for a largenumber of nodes a particular resource blocks any further allocation of...
Convenience function for iterating while the result is Ok
For a function f :: a -> GenericResult a, iterate it (in the sense of themonad), until the result is Bad; return the list of values occurred.
Provide witness for the sum-type structure of GenericResult
GenericResult, while rightfully a type of its own, is isomorphicto Either. So, also provide the case analysis function (i.e., theuniversal arrow out of the sum).
Disable more version checks for alpha versions
Alpha versions should not check for version numbers in READMEsand documentation.
Allow alpha versions not to have an entry in the NEWS file
Alpha versions are still under heavy development, and can therefore not have anentry in the NEWS file yet. The entry will have to be added before switching tothe first beta version.
Partially fixes Issue 448...
Add tests for check-news
Unit tests verifying the behaviour of the check-news script are added.
This required adding a new make target, "autotools-check" directly called from"commit-check", because the usual tests are executed in the build directory,whereas these, being relative to the autotools, cannot be executed there because...
Introduce support for alpha versions
An alpha version can be used to name a release while a previous one is stillbeing developed.
E.g. 2.9.0~alpha1 can be out while 2.8.0~rc1 is being worked on.
When a version is marked as alpha, it is allowed to have unreleased versions...
Improve docstring
Fix bug in Makefile.am
There was a typo in the name of the script for launching offline tests.
Refactor NodeInfo RPC regarding storage reporting
The NodeInfo RPC call is refactored to handle now more thanjust storage reporting for volume groups.
Since NodeInfo now returns storage space information notnecessarily for volume groups, but also for other storage...
Utility functions for storage types
Handling various storage types for the free space reportingrequires some utility functions. They will be invoked inlater patches. Unit tests are included.
Integrate free space reporting for file storage
This patch integrates the free space reporting for filestorage. So far, it is only called, when the defaultdisk template is a file-based disk template ("file" or"sharedfile").
Unit tests for ApplyStorageSpaceFunction
So far, the function 'ApplyStorageSpaceFunction' was notcovered by unit tests. Before the integration of spacereporting for file storage, we add those missing tests.
Renamining space reporting for file storage
Before being integrated, the function for space reportingfor file storage is renamed to a more expressive name.
Add storage type to NodeInfo result
So far, the storage information returned from RPC callNodeInfo contained only information about volume groups.In order to extend the storage reporting to other storagetype, we include another field "type" in the result of...
Use cluster's hvparams in LUInstSetParams
Since the instance does not have hvparams at that point,we have to use the cluster's hvparams here. This fixesa crash when using 'gnt-instance modify'.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Conflicts: (trival, take union of added files/tests) Makefile.am test/hs/shelltests/htools-hspace.test...
Add a test for hspace to respect instance policy
In this example, the instance policy for disks prevents allocationof more than one instance per node. The test verifies that tieredallocation still respects this and doesn't attempt to place policyviolating instances on the cluster....
Make shrinkByType aware of individual disks
When shrinking an instances, you can't just get smaller disk footprintwhile leaving the individual disks as they are. Make the shrinkheuristic aware of that fact, and decrease all individual disks aswell. Fixes issue 484....
Fix lookup of xen toolstack in Haskell
There was a bug in the haskell implementation of nodequery which made the lookup of the xen toolstack xm/xlfail.