Add possibility to compress to OpInstanceMove
OpInstanceMove now supports the 'compress' option. It allows to enablecompression for intra-cluster instance moves.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Remove trailing whitespace
Remove trailing whitespace from OpCodes.hs and OpParams.hs.
Add hsqueeze planning for compression
Add a new htool, hsqueeze, for dynamic power management. Thiscommit only implements the first useful part: plan (but notexecuting) taking nodes offline nodes still keeping within theresource limit.
Signed-off-by: Klaus Aehlig <aehlig@google.com>...
Provide --target-resources option
Add a new option, to be used by hsqueeze, to specify thetarget free resources on each node. It is given as a multipleof the standard allocation, as specified in the instance policy.
If a configuration file can't be loaded, show which one
So far the error message only says it can't be loaded, but not what fileit is.
Signed-off-by: Petr Pudlak <pudlak@google.com>Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Refactor `getAllConsoleParams` to be more readable
Instead of creating a lot of lists and then zipping them, just workon every item one at a time. It makes the code much more readable.This changes the ordering of "effects", but the "effects" here are just...
Merge branch 'stable-2.10' into master
Merge branch 'stable-2.9' into stable-2.10
Merge branch 'stable-2.8' into stable-2.9
Fix 'hvVncTls' key in 'hvsParameterTypes'
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Hrvoje Ribicic <riba@google.com>
Optimize instance query speed
The instance queries have a field called console which requires anextra RPC call. This commit allows extra parameters to be passed onto the query logic, which allows us to determine when to make theextra call.
Signed-off-by: Hrvoje Ribicic <riba@google.com>...
Tests for InstanceInfo retrieval added
As the retrieval of instance information is a tricky operation whichaffects the way the instance status is calculated, a few tests havebeen added to ensure its behaviour remains constant.
Add the console field
This patch adds the final console field, using the RPC calls of theprevious commit.
As this requires another RPC call, the live data retrieval functionsof the instance queries are modified and refactored slightly.
Haskell RPCs can now differ in parameters
The Haskell interface allowed multi-node RPCs to be executed inparallel, but with the same parameters every time. This restrictionis now lifted by providing a function call accepting pairs of nodesand parameters....
Add a console information RPC call
As the instance queries need console information, and the informationis retrieved through python classes that should not be ported yet, anRPC call supplying the information has been added. Some tests as well.
Add the last leftover fields
A few fields were missing from earlier work. The timestamp fields,the pnode.group.uuid field, and the custom nic parameters.Just the console remains.
Signed-off-by: Hrvoje Ribicic <riba@google.com>Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Add aliases of existing instance fields
For legacy reasons, some instance fields are aliased. The aliases havethe same definition but appear under different names. Support for suchfields has been added to Query/Common.hsAs aliases can cause somewhat harder to find bugs, a new test was...
Rename Fillable fields to Indexed fields
The naming used in the previous commits did not reflect the use ofthe fields well, and clashed with the concept of fillable parameters.Thus some renaming was done, with slight documentation improvements.
Add instance network fields
This commit adds the instance network fields. Some of these fields arealso present for every NIC, requiring the reuse of functions from theprevious disk instance fields commit.
Add instance disk fields
The instance disk fields have been added. As these are the firstfields to be duplicated, some helper functions are present to supporteasier specification of fields which have to be duplicated for everyentry in an array of configuration objects, and numbered accordingly....
Add instance parameter fields
This patch adds instance parameter fields to the Haskell instancequeries. The fields retrieve maps of parameters related to e.g.hypervisors, or operating systems.Every instance can have parameters different from the defaults,...
Add further fields to instance queries
This commit adds some more fields that are simple to retrieve, asthey are properties of instances recorded in the configuration.
Add the first instance query live fields
This patch adds live fields which can be implemented with the existingRPC calls. Some fields require additional call types and will be addedlater. Most of them can be added at this point.The status field is especially interesting, as it depends not on the...
Add a new field type - FieldConfigRuntime
In the instance queries, some fields require both config and runtimeinformation. This patch adds a new field type for this purpose.
Move hypervisor fetches from Node.hs to Common.hs
As patches that follow will need the functionality inGaneti.Query.Node, this patch moves it to the common query file.
Enable 'AllInstancesInfo' RPC call in Haskell
The AllInstancesInfo call appears to have been implemented but neverused. The commit makes it usable by modifying the parameter type andserialization.
Unify all live calls which return no data
With the (current) instance query, there are three queries which do notrequire live data: instance, network, and group queries.The collectors and runtime types for these have been unified.
Initial changes for adding instance queries
Add basic instance querying capabilities to the Haskell codebase.Several fields are present, more to come.
Document the generic query function
The way the generic query works was not documented anywhere. Forgreater readability, add a short explanation to the genericQueryfunction.
Fix path for serial file
It is actually located inside the queue directory.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Make 'gnt-node list-storage' use default storage type
Currently, when no explicit storage type is given, the'gnt-node list-storage' command defaults to file storagewhether or not file storage is enabled on the clusteror not. This patch fixes it by defaulting to the default...
Fix several search path configure options
Fix several search path configure options to properly handleseparators.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Correct properties of the cluster's file storage dir
This patch does:- Rename the haskell opcode parameter 'pGlobalFileStorageDir' and 'pGlobalSharedfileStorageDir' to 'pClusterFileStorageDir' and 'pClusterSharedfileStorageDir', respectively, because...
Merge branch 'stable-2.9' into master
Make information about GNU ln available to programs
Propagate the information on whether we have the GNU version of lnto all programs by making it available as a constant.
Hs2Py constants: hail, opcode, and SSH
Add hail, opcode, and SSH related constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Hs2Py constants: node daemon setup
Add node daemon setup related constants to the Haskell to Python constant generation.
Hs2Py constants: opcodes
Add opcode related constants to the Haskell to Python constant generation.
Hs2Py constants: improve auto repair
Fix auto repair related constants to use the Haskell type 'AutoRepairResult' instead of simple 'String' values.
Fix import order
Fix import order to be alphabetically sorted.
Fix 'AutoConf' import
Fix 'AutoConf' import to be qualified.
Hs2Py constants: dynamic devices
Add dynamic devices related constants to the Haskell to Python constant generation.
Hs2Py constants: SSCONF
Add SSCONF related constants to the Haskell to Python constant generation.
Hs2Py constants: 'defaultEnabledHypervisor'
Add 'defaultEnabledHypervisor' to the Haskell to Python constant generation.
Hs2Py constants: 'hvcGlobals' and 'ndcGlobals'
Add 'hvcGlobals' and 'ndcGlobals' to the Haskell to Python constant generation.
Hs2Py constants: 'ispecsMinmaxDefaults'
Add 'ispecsMinmaxDefaults' to the Haskell to Python constant generation.
Hs2Py constants: assorted constants
Add some assorted constants to the Haskell to Python constant generation.
Hs2Py constants: 'maxUdpDataSize'
Add 'maxUdpDataSize' constant to the Haskell to Python constant generation.
Hs2Py constants: UID pool
Add UID pool related constants to the Haskell to Python constant generation.
Add assorted constants to the Haskell to Python constant generation.
Hs2Py constants: HVST and disk state
Add HVST and disk state related constants to the Haskell to Pythonconstant generation.
Hs2Py constants: backend and logical disks
Add backend and logical disks related constants to the Haskell toPython constant generation.
Hs2Py constant: DRBD and dynamic disk
Add DRBD and dynamic disk parameter constants to the Haskell to Pythonconstant generation.
Hs2Py constants: nics
Add nics related constants to the Haskell to Python constantgeneration.
Hs2Py constants: assorted, idisk, and inic
Add assorted, idisk, and inic related constants to the Haskell toPython constant generation.
Hs2Py constants: node verify
Add node verify constants to the Haskell to Python constant generation.
Hs2Py constants: SSL, job queue, and locks
Add SSL, job queue, and locks related constants to the Haskell to Python constant generation.
Hs2Py constants: VNC
Add VNC related constants to the Haskell to Python constant generation.
Hs2Py constants: '/etc/hosts' and job queue
Add '/etc/hosts' and job queue related constants to the Haskell to Python constant generation.
Hs2py constants: query resources
Add query resources related constants to the Haskell to Python constant generation.
Hs2Py constants: HT related constants
Add HT related constants to the Haskell to Python constant generation.
Hs2Py constants: add import/export config
Add import/export config constants to the Haskell to Python constant generation.
Hs2Py constants: network related
Add network related constants to the Haskell to Python constant generation.
Hs2Py constants: 'diskTransferConnectTimeout'
Add 'diskTransferConnectTimeout' constant to the Haskell to Python constant generation.
Hs2Py constants: 'jobIdsKey', 'runparts' and 'rpc'
Add several groups of constants to the Haskell to Python constant generation.
Hs2Py constants: move 'ipCommandPath'
Move constant 'ipCommandPath' to the appropriate place according to'lib/constants.py'.
Hs2Py constants: scripts and actions
Add script and action related constants to the Haskell to Pythonconstant generation.
Hs2Py constants: reboot behaviour
Add reboot behaviour constants to the Haskell to Python constant generation.
Hs2Py constants: move reboot types
Move constants 'instanceReboot*' to correct place according to'lib/constants.py'.
Hs2Py constants: assorted and HVS
Add asserted and HVS related constants to the Haskell to Python constant generation.
Hs2Py constants: add network mirrored disk templates
Add network mirrored disk template constants to the Haskell to Pythonconstant generation.
Hs2Py constants: add SSH key files
Add SSH key file constants to the Haskell to Python constantgeneration.
Move VTypes to the appropriate place
Move 'VType' related constants to the appropriate place to matchPython's constants module.
Hs2Py constants: add export versions
Add export version constants to the Haskell to Python constantgeneration.
Hs2Py constants: add CPU pinning
Add CPU pinning constants to the Haskell to Python constantgeneration.
Hs2Py constants: add 2 more constants
Add 2 more constants to the Haskell to Python constant generation.
Hs2Py constants: add several groups of constants
Add several groups of constants, namely, console types, security, I/Ocompression, import/export, hooks, and hkr related, to the Haskell toPython constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>...
Hs2Py constants: storage related groups
Add several groups of storage related constants to the Haskell to Python constant generation.
Hs2Py constants: add DRBD and RBD
Add DRBD and RBD related constants to the Haskell to Python constant generation.
Hs2Py constants: add 'RIE' related
Add remote import/export related constants to the Haskell to Python constant generation.
Fix indentation
Fix indentation in 'Ganeti.OpCodes'.
Hs2Py constants: add 'osApiVersions'
Add constant 'osApiVersions' to the Haskell to Python constantgeneration. This patch fixes the type of this constant, by changingfrom 'List' to 'Set', therefore, 'Ganeti.Query.Server' is updatedaccordingly.
Hs2Py constants: add 'ReplaceDisksMode' related constants
Add constants related to the Haskell type 'ReplaceDisksMode'. Thedata type declaration for 'ReplaceDisksMode' is also moved from'Ganeti.OpParams' to 'Ganeti.Types' because it used to be used only by...
Hs2Py constants: add RPC timeout constants
Add RPC timeout related constants to the Haskell to Python constantgeneration. The Haskell data type 'RpcTimeout' is moved from'Ganeti.Rpc' to 'Ganeti.Types' so it can be used by'Ganeti.HsConstants' without causing circularity problems with...
Hs2Py constants: add node parameter related constants
Add node parameter related constants to the Haskell to Python constantgeneration. This patch also fixes a type inconsistency betweenHaskell and Python, namely, 'ndsParameterTypes' and'ndsParameterTitles' become 'Map's instead of 'Tuple's, which allows...
Hs2Py constants: constants related to 'Ganeti.Htools.Types'
Add constants related to the Haskell types defined in'Ganeti.Htools.Types' to the Haskell to Python constant generation.
Hs2Py constants: add local disk status
Add constants related to local disk status to the Haskell to Pythonconstant generation. A new Haskell type 'LocalDiskStatus' is addedsimilarly to the constants that have been added previously in otherHs2Py patches....
Hs2Py constants: add 'fileDriver'
Add constant 'fileDriver' to the Haskell to Python constantgeneration. The constant 'FILE_DRIVER' is also moved to theappropriate place in 'lib/constants.py'.
Hs2Py constants: add Luxi constants
Add Luxi related constants to the Haskell to Python constantgeneration. A new Haskell type is added 'Ganeti.Types.PythonChar' towrap the Python character type.
Fix documentation comment
Fix documentation comment in 'Ganeti.ConstantUtils'.
Fix typo in documentation
Fix typo in documentation in 'Ganeti.JSON'.
Hs2Py constants: add more constants
Add more constants to the Haskell to Python constant generation.
Hs2Py constants: add 'Ganeti.Confd' types
Hs2Py constants: add 'Ganeti.Confd' types.
Hs2Py constants: add confd requests
Add confd request related constants to the Haskell to Python constantgeneration.
Update reference to proper module
Update reference to constant 'confdMagicFourcc' to fetch its valuefrom 'Ganeti.Constants' instead of the re-export from module'Ganeti.Confd.Types'.
Add 'declareILADT' to declare integer literal datatypes
Add 'declareILADT' to declare integer literal datatypes.
Move confd request constants to 'Ganeti.ConstantUtils'
Provide the DIRVERSION as a constant
Depending on configure options, the version string used in the nameof the version specific directory differs. Provide this string alsoas a constant, as it is needed for the upgrade procedure, in order tobe able to roll back....
Provide time constants related to upgrades
During upgrades, gnt-cluster needs to wait for all jobsin the queue to finish. Provide constants for timeout andpolling interval.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Jose Lopes <jabolopes@google.com>
Provide means of submitting jobs to a drained queue
During an upgrade, the job queue needs to be drained in order to avoidnew jobs coming to the cluster. Nevertheless, the upgrade processneeds to carry out some maintenance, like redistributing the new...