(b64) Use base64 encoding in networks' bitarrays
This is needed for GRNET'S production environment.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
(snap) LUInstanceSnapshot for the ext disk template
Add support for snapshotting disks of an instance. This willonly work for the ext disk template. Example:
gnt-instance snapshot --disk <ident>:snapshot_name=snap inst1
This will take a snapshot of the disk identified by <ident> (e.g...
Revert "Fix query mechanism wrt networks and vlans"
Synnefo 0.15.2 still expects only mode and link and not vlanin group_list field of the GetNetwork() query response.
Until it gets fixed we do not return the vlan netparam.
This reverts commit b6afa809538b9f6dd80953362e99a129147bf634.
(2.13) Let drbd disks resync during cluster verify
Commit 9b0e86e issues an error during cluster verify if the statusof DRBD is degraded and if the local disk is not UpToDate.
Still in case of a newly created instance or a newly attached disk with--no-wait-for-sync, if a cluster verify runs it will report errors...
(2.13) Support Snapshot() for the ExtStorage interface
The `snapshot` script is added to the interface and the new variablesVOL_SNAPSHOT_NAME and VOL_SNAPSHOT_SIZE are exported to theenvironment.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>Reviewed-by: Hrvoje Ribicic <riba@google.com>
(2.13) Pass the access parameter to ExtStorage template
Add the ExtStorage template to the set of templates that accept the'access' parameter. The default 'access' of the node-group forExtStorage devices will be 'kernelspace'.
Update the man page for gnt-instance to state that ExtStorage templates...
(2.13) Make 'access' an optional disk parameter
This patch makes 'access' an optional disk parameter just likespindles, mode, name, vg and metavg. This option can only be set to'kernelspace' or 'userspace'. When 'userspace' is used, the instancewill access this disk directly without going through a block device....
(2.12) Add support for KVM multiqueue virtio-net
This patch adds support for multiqueue virtio-net1 which sets a number ofqueues (file descriptors) from virtio_net_queues parameter for tap deviceto parallelize packets sending or receiving. Tap devices will be created with...
(2.12) Add DiskParams to Disk object
The 'DiskParams' slot was missing from Haskell's Disk objects.Since Wconfd is now responsible for writting the config file this wascausing the 'params' slot to not be written in the config file.
Signed-off-by: Ilias Tsitsimpis <iliastsi@grnet.gr>...
(2.12) Rename DiskParams to GroupDiskParams
DiskParams was used for the cluster/group disk parameters type. Thispatch renames it to GroupDiskParams and uses the DiskParams type forthe parameters of one single Disk object.
(2.12) kvm: Add migration capabilities as an hvparam
Latest QEMU versions support various migration capabilities. Eachcan be enabled/disabled with 'migrate_set_capability' monitorcommand.
Version 1.7.0 defines x-rdma-pin-all, auto-converge, zero-blocks,...
(2.11) Add andRestArguments to IDiskParams
In this way, we cann pass through the opaque parametersrequired for disk creation and modification in the case ofexternal storage.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Petr Pudlak <pudlak@google.com>...
(2.11) Add function providing the canonical andRestArguments
The field catching the remaining fields will always be of the sameshape, so add a function for this to make usage simple.
(2.11) Add additional constructor AndRestArguments to OptionalType
A field of this type will capture all the remaining fieldsof an object as JSValues. Obviously, the intended use isto have precisely one such field. This mechanism will allowto pass opaque values trough, as it is, e.g., required for...
(2.11) Add 'provider' to IDiskParams
IDISK_PROVIDER was included in python's IDISK_PARAMS, so itshould also be included in the Haskell code.
Now that luxid creates and enqueues jobs, without this patch theExtStorage interface is broken as the user can not pass the disk...
Fix hlint warnings found by hlint 1.9.11
Our current hlint version cannot find them yet.
Signed-off-by: Niklas Hambuechen <niklash@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Cherry-picked from: d05f1c86fcca
Conflicts: src/Ganeti/Utils.hs (trivial)...
Merge branch 'stable-2.9' into stable-2.10
Signed-off-by: Petr Pudlak <pudlak@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Ganeti.Daemon: always install SIGHUP handler
Install the SIGHUP handler regardless of the daemonization status. Thisfixes issue #755.
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>Signed-off-by: Petr Pudlak <pudlak@google.com>Reviewed-by: Petr Pudlak <pudlak@google.com>
Renaming NV_VMNODES to NV_NONVMNODES
This patch renames the constant 'NV_VMNODES' to'NV_NONVMNODES' as it is actually used to storea list of non vm-capable nodes.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Hrvoje Ribicic <riba@google.com>
Update the license statement
It was decided that Ganeti is relicensed under the 2-clauseBSD license. Update the license statements accordingly (issue #936).
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Petr Pudlak <pudlak@google.com>
Make gnt-cluster upgrade honor backup-dir
Make gnt-cluster upgrade honor the --with-backup-dir configure option.In this way, at configure time, it can be decided in which directorythe configuration backup tar balls are put.
Signed-off-by: Klaus Aehlig <aehlig@google.com>...
Push return out of genericResult
...and merge with '<-' to get a pure computationoutside the monad.
Make htools tolerate missing "spfree" on luxi
If a cluster allows sharedfile as only disk template, theamount of free spindles might not be available. This isperfectly normal, hence the luxi backend of htools shouldhandle this case gracefully and just report 0 available spindles....
Merge branch 'stable-2.8' into stable-2.9
DRBD parser: consume initial empty resource lines
When a DRBD resource is taken down, its minor number is freed and itsplace in /proc/drbd is taken by an empty line. Currently the parser isable to consume any empty lines appearing inside the resource stanza,...
Make network_vlan an optional OpParam
Make network_vlan OpParam of OpNetworkConnect default to the emptystring and thus make it optional (see defaultField definition). Thisway we keep backwards compatibility with old RAPI.
Additionally bypass a sphinx warning related to the generated html...
hspace: support --accept-existing-errors
Make hspace honor the option --accept-existing-errors. Ifthis option is given, hspace will try to allocate on allN+1 happy nodes even though this might lead to overfullgroups.
Add an option to accept existing N+1 violations
This option will be used to tell hspace to ignoreexisting N+1 violations and allocate on all non-affectednodes as usual.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Hrvoje Ribicic <riba@google.com>
Make hspace support --independent-groups
If this option is given, relax the check for a previousnot N+1 happy cluster to ignore the affected group, butstill consider allocations in other groups.
Add an option --independent-groups
This option will make hspace consider node groups asindependent; in particular it will tell hspace notto consider an N+1 violation in one group a reasonnot to allocate in a different group.
Add a modifier for a group's allocation policy
In this way, algorithms doing allocation, like hspace,can conveniently specify that they want to ignore thisgroup.
hspace: optionally print allocatable nodes
...when verbosity level is high enough.
Fix gnt-network client to accept vlan info
Until now gnt-network connect expected the network,mode, link, and optionally groups as positional arguments.
To be able to pass vlan info too, use the `--nic-parameters`option, just like gnt-cluster client to pass the desired...
Fix query mechanism wrt networks and vlans
Let query mechanism (both python and haskell) be aware of thevlan info included in a network's netparams.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Use more efficient statistics for the standard deviation
Instead of using the full sample as statistics providingenough information to compute the standard deviation, usea slightly more elaborate one. It contains the standardstatistics count, sum, and sum of squares, which can also...
Use statistics updates when allocating on pairs
When considering the various ways of positioning an instanceon a pair of nodes, make use of the fact that the statisticsare extremely similar (only two nodes changed) and obtain thenew statistics by updating the old one, rather than by recomputing...
Factor score computation through abstract statistics
Logically separate the computation of the cluster score intotwo steps: the computation of the abstract statistics and itsevaluation. In this way, we obtain an abstract value which wecan update instead of recomputing it when considering different...
Add data type for abstract statistics
Our cluster score is a weighted sum of certain sums andstandard deviations of node characteristics. When placinga single instance, the cluster score of a big number ofquite similar clusters are computed: that of the original...
Fix QueryNetworks wrt instances
QueryNetworks tries to find which instances are connected to whichnetworks. The query mechanism in Haskell was written back when NICsreferred to a network via its name and not its UUID. Fix luxi tocomply with the current implementation (network slot of NIC object...
tiered allocation: try canonical search path first
In tiered allocation, instances are put on the cluster, while theyfit---and once no more instances of the given size can be fit, smallerinstances are tried next. There is obviously some heuristics involved...
Conflicts: src/Ganeti/Monitoring/Server.hs: trivial
Improve haskell style
...by fixing lint warnings found by HLint v1.8.57. In particular,make sure 'make hlint' passes for this version of hlint.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Add --no-locks option to gnt-debug delay
Add the possibility to don't acquire locks during `gnt-debug delay`.This allows to run many delay jobs in parallel instead of havingthem run sequentially.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>...
Extend OpGroupEvacuate by a ForceFailover paramter
Add a parameter to OpGroupEvacuate to force failovers to beused instead of migrations. This can be useful, if a groupis evacuated to another with different hardware.
Extend OpGroupEvacuate by a sequential paramter
...telling it to run all the evacuation jobs sequentially.This might be useful to avoid too much load that otherwisemight occur.
Support restricted migration
Make hbal support an option to disallow ReplacePrimary movesand restrict ReplaceAndFailover to instances where the primarynode is drained. If used in evacuation mode, the only migrationmoves will be off the drained nodes....
Add an option for restricted migration
This option will allow node evacuation with migrations onlyoff the nodes to be evacuated.
Set exclusion tags correctly in requested instance
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Jose Lopes <jabolopes@google.com>
Export extractExTags and updateExclTags
...from the htools Loader. These functions are needed whenparsing the requested instance of an allocator request.
Signed-off-by: Hrvoje Ribicic <riba@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>...
Fix failing gnt-node list-drbd command
The UUID/name switch avoided this particular bit of code, and as aresult the list-drbd command failed as it tried to compare UUIDs andnames. This patch fixes the retrieval, converts the newly returnedUUIDs to names, and modifies the QA to the results and not only the...
Also consider filter fields for deciding if using live data
If the query fields don't require live data, we use the shortcutand don't request live data. However, we cannot take this shortcutif the fields the filter depends on requires live data.
Make hbal deal with no-LVM storage space properly
Since 2.6, hbal crashes when used on a cluster where noLVM storage is enabled at all. The problem is that italways queries for fields that only sometimes makesense for certain types of storage. This patch will...
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Fix integer overflow problem in hbal
waitForJobs in src/Ganeti/Jobs.hs has an integer overflow that (at least onamd64) causes it to break after waiting for ~10 minutes. This results in hbalsleeping forever (when compiled with squeeze's ghc 6.12.1) or crashing (when...
Add missing space
Also, refactor the line to keep it under 80 chars.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Fix 'JobIdListOnly' type from 'List' to 'Map'
Allow classic queries to use either names or UUIDs
When UUIDs are used in CLI commands, such addressing of objects failsor succeeds inconsistently across object types. Worse yet, some callsdo not fail, but simply return no result. This is due to the way the...
Enable network tags in Haskell code
Prior to the creation of the 2.10 branch, network tags were broken, andthe Haskell code introduced there mistakenly accepted this as thedesired functionality. This patch fixes this in a very simple way.
Signed-off-by: Hrvoje Ribicic <riba@google.com>...
luxid: fix detection of master node in node query
Ganeti.Config.getNodeRole would rely on clusterMasterNode returning themaster node name, however clusterMasterNode returns the master node'sUUID. We fix this and a similar issue in Ganeti.Query.Node.nodeFields....
Fix gnt-network list-tags
Define network tags in haskell part.
This fixes issue 641.
Avoid lines longer than 80 chars
...as they're a lint error.
Fix evacuation out of drained node
Refactor reading live data in htools
This simplifies different handling of individual items.
Cherry-picked from 8c72f7119f50a11661aacba2a1abffdfdc6f7cfa.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
eta-reduce isIpV6
This is not only better style, but also fixes a lint error.Also use the infix form of `elem` to increase readability.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Ganeti.Rpc: use brackets for ipv6 addresses
We detect an IPv6 vs V4 address based on columns, rather than passingthe family from the cluster object to be more future proof (in casewe'll ever support mixed clusters).
Unfortunately quite a bit more code is required to test this: we need an...
Introduce --hotplug-if-possible option
This will be useful for an external entity using RAPI thatwants to modify devices of instances.
The common use case for that is:"I want to add a NIC/disk to an instance. If it is runningthen try to hotplug the device. If not, then just add it to config."...
Fix socket permissions after master-failover
When using gnt-cluster master-failover, on the soon-to-be-master theluxi daemon is started by the node daemon. This makes the luxidaemon inherit the node daemon's umask 077, making the communicationsocket unreadable to group members. When using Ganeti with non-root...
Don't allow optional node parameters
Ganeti does not support optional fields in parameters(hypervisor-params, disk-params, etc.). OpenVSwitch related nodeparameters were the exception to this rule, which caused numerousproblems related to import/export and (de-)serialization....
Merge 'hs2py-constants' into 'hs2py'
Merge code of 'hs2py-constants' into 'hs2py', which requires addingflag '--constants', and merge target 'src/hs2py-constants' into'src/hs2py' in 'Makefile.am', also updating dependencies andvariables.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>...
Add flag '--opcodes' to 'hs2py'
This is a transitional step before merging 'hs2py-constants' and'hs2py'.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Move Haskell constants to proper module
Move Haskell constants from module 'Ganeti.HsConstants', which was atransitional module part of the Haskell to Python constant generationinfrastructure, to module 'Ganeti.Constants'.
Tear down Py2Hs constant infrastructure
Tear down Python to Haskell constant conversion infrastructure, whichincludes eliminating the autotool 'convert-constants' and the Haskellmodule, namely 'Ganeti.PyConstants', which held the convertedcontants.
Hs2Py constants: additional module jstore
Add constants from additional modules ('ganeti.jstore') to the Haskellto Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hs2Py constants: additional module errors
Add constants from module 'ganeti.errors' to the Haskell to Pythonconstant generation.
Hs2Py constants: additional module qlang
Add constants from additional modules ('ganeti.qlang') to the Haskellto Python constant generation.
Hs2Py constants: additional module luxi
Add constants from additional modules ('ganeti.luxi') to the Haskellto Python constant generation.
Fix reference to vcs version in query server
Fix reference to vcs version in query server to take its value fromthe Haskell constant in 'Ganeti.Version' instead of using the constantgenerated from Python.
Use configure constants instead of generated
Replace uses of the generated 'AF_INET*' constants with the constantsin Haskell's 'AutoConf'.
Hs2Py constants: add 'UUID_REGEX'
Add constant 'UUID_REGEX' to the Haskell to Python constantgeneration.
Add 'AF_INET*' constants to Haskell's 'AutoConf'
Add 'AF_INET*' constants to the Haskell 'AutoConf' module, whichrequires extending the 'm4' invocation with additional substitutions,in the 'Makefile' target for 'src/AutoConf.hs'.
When loading configuration fails, include the reason
Before the message why a failure happened (like a parsing error) was lost.
Signed-off-by: Petr Pudlak <pudlak@google.com>Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Fix documentation
Fix documentation in constants containing values in seconds.
Hs2Py constants: 'hvsParameterTypes' and 'hvsParameters'
Add constants 'hvsParameters' and 'hvsParameterTypes' to the Haskellto Python constant generation.
SimpleRetry on BlockDev.Remove()
Sometimes, upon disk removal, corresponding file descriptorsare kept briefly open by various processes (hypervisor, blkid, etc.).With this patch, we retry several times before raising the appropriateerror, thus making disk removal more robust against those corner cases....
Hs2Py constants: add 'hvcDefaults'
Add 'hvcDefaults' to the Haskell to Python constant generation.
Hs2Py constants: add 'diskDtDefaults'
Hs2Py constants: add 'value*' and 'niccDefaults'