History | View | Annotate | Download (45.1 kB)
opcodes: Add function for compact summary
Depending on the opcode and its parameters, the existing “Summary”function can give a rater long summary. For displaying the summary inlogs and in the lock monitor, it should be shorter. Hence this newfunction is added to just use the opcode ID with common prefixes...
opcodes: Change parameter type definition for query filter
The old definition wouldn't accept integers.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Merge branch 'devel-2.4'
LUInstanceQueryData: Don't acquire locks unless requested
Until now LUInstanceQueryData always acquired locks for the instance(s)and nodes involved. In combination with long-running operations thisprevented the use of “gnt-instance info”, even with the “--static”...
TLMigrateInstance: Merge failover code, allow fallback
As the code for failover for checking is almost identical it's an easytask to switch it over to the TLMigrateInstance. This allows us tofallback to failover if migrate fails prereq check for some reason....
Implement submitting jobs from logical units
The design details can be seen in the design document(doc/design-lu-generated-jobs.rst).
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
constants: Rename QR_OP_*, add QR_VIA_RAPI
Commit 28b71a76 added a list of resources which can be queried usingLUXI. Unfortunately the variable was named “QR_OP_LUXI”, which can beconfusing. This patch renames “QR_OP_QUERY” to “QR_VIA_OP”, “QR_OP_LUXI”...
opcodes: Document OpQueryFields' parameters
OpOobCommand: Adding power on delay
This delays the invocation of the power on of the next node. So if youpower on a bunch of nodes it will not blow the fuse.
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
OpOobCommand: Document all fields
Migration and failover: add iallocator and target_node slots
Add iallocator and target_node slots to OpMigrateInstance andOpFailoverInstance to facilitate shared-storage-backed instance mobility. Addiallocator slot to OpMigrateNode (no explicit target_node in this case)....
Core shared file storage support
This patch introduces core file storage support, consisting of the following:
A configure-time switch for enabling/disabling shared file storagesupport and controlling the shared file storage location:--with-shared-file-storage-dir=. Shared file storage configuration is then...
Remove force_master support from LUOobCommand
As per discussion on the man-page1 update, this functionality should beremoved and replaced by just give the command to run if the user insistsof power cycle/power off the master and refuse to operate.
[1] http://groups.google.com/group/ganeti-devel/browse_thread/thread/95d4879a747cc295...
Make OpGroupRename consistent with OpInstanceRename
OpInstanceRename uses “instance_name” (like almost all other OpInstance*opcodes), not “old_name”, to specify the original name. OpGroupRename ismade consistent by renaming “old_name” to “group_name”....
RAPI: Clean up instance creation, use generated docs
- Use FillOpCode and unify parameter names between RAPI and opcode- Generate parameter documentation- Improve opcode parameter documentation
Add opcode parameter descriptions
These will be used in automatically generated parts of the RAPIdocumentation. Not all opcodes are documented so far, but each addedopcode's parameters need to be fully documented (verified by anassertion).
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
ht: Add descriptive text representations
This patch adds text descriptions to all T* checks. Converting to astring (e.g. str(ht.TNone)) will produce a user-readable text. Thiswill be used for Opcode parameter documentation.
opcodes: Prepare addition of parameter descriptions
For now they're all set to None, but a following patch will set descriptions.
Add two new opcode options to LUOobCommand
This patch adds ignore_status to ignore the offline flag of nodesand also adds a force_master option to force operations on master nodeif they will make the master unavailable (for some time).
Signed-off-by: René Nussbaumer <rn@google.com>...
Deactivate disks: allow skipping hypervisor checks
In some cases (e.g. the hypervisor not running at all), we might wantto force disk deactivation, skipping the hypervisor checks. I believethis is not a good thing to do all the time, so this patch adds the...
ht: Add TMaybeDict check
This replaces a number of equal “ht.TOr(ht.TDict, ht.TNone)” checks.
Modify LUOobCommand to support multiple nodes
This will change the result of this LU to a query like result. A list oftuples with information about the state of the data.
It also includes the modification to the commands calling this opcode.
Rename OpGetTags and LUGetTags
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Rename OpSearchTags and LUSearchTags
Rename OpAddTags and LUAddTags
Rename OpTestJobqueue and LUTestJobqueue
Check consistency of the class names and OP_ID
As the class names should be now consistent with the OP_IDs, we add acheck for wrongly-defined OP_IDs.
However, the future removal of the hand-coded OP_IDs will render thisobsolete, so this check is introduced just to make sure that the...
Remove hard-coded OP_ID definitions
The removal requires adding a few pylint ignores, as it cannot know thatOP_ID will be defined at runtime.
Also switch the asserts to check for non-declaration.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Rename OpStartupInstance and LUStartupInstance
Rename OpAddNode and LUAddNode
Rename OpNodeEvacuationStrategy and LUNodeEvacuationStrategy
Rename OpMigrateNode and LUMigrateNode
Rename OpModifyNodeStorage and LUModifyNodeStorage
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Rename OpPowercycleNode and LUPowercycleNode
Rename OpQueryNodes and LUQueryNodes
Rename OpQueryNodeVolumes and LUQueryNodeVolumes
Rename OpQueryNodeStorage and LUQueryNodeStorage
Rename OpRemoveNode and LURemoveNode
Rename OpSetNodeParams and LUSetNodeParams
Rename OpDiagnoseOS and LUDiagnoseOS
Rename OpDelTags and LUDelTags
Rename OpMigrateInstance and LUMigrateInstance
Rename OpMoveInstance and LUMoveInstance
Rename OpQueryInstances and LUQueryInstances
Rename OpQueryInstanceData and LUQueryInstanceData
Rename OpRebootInstance and LURebootInstance
Rename OpRecreateInstanceDisks and LURecreateInstanceDisks
Rename OpReinstallInstance and LUReinstallInstance
Rename OpRemoveInstance and LURemoveInstance
Rename OpRenameInstance and LURenameInstance
Rename OpReplaceDisks and LUReplaceDisks
Rename OpSetInstanceParams and LUSetInstanceParams
Rename OpShutdownInstance and LUShutdownInstance
Rename OpVerifyDisks and LUVerifyDisks
Rename OpAddGroup and LUAddGroup
Rename OpAssignGroupNodes and LUAssignGroupNodes
Rename OpQueryGroups and LUQueryGroups
Rename OpRemoveGroup and LURemoveGroup
Rename OpRenameGroup and LURenameGroup
Rename OpSetGroupParams and LUSetGroupParams
Rename OpActivateInstanceDisks and LUActivateInstanceDisks
Rename OpConnectConsole and LUConnectConsole
Rename OpCreateInstance and LUCreateInstance
Rename OpDeactivateInstanceDisks and LUDeactivateInstanceDisks
Rename OpFailoverInstance and LUFailoverInstance
Rename OpGrowDisk and LUGrowDisk
Rename OpPrepareExport and LUPrepareExport
Rename OpQueryExports and LUQueryExports
Rename OpRemoveExport and LURemoveExport
Rename OpQueryConfigValues and LUQueryConfigValues
Rename OpDestroyCluster and LUDestroyCluster
Rename OpPostInitCluster and LUPostInitCluster
Rename OpQueryClusterInfo and LUQueryClusterInfo
Rename OpRedistributeConfig and LURedistributeConfig
Rename OpRenameCluster and LURenameCluster
Rename OpRepairDiskSizes and LURepairDiskSizes
Rename OpSetClusterParams and LUSetClusterParams
Rename OpVerifyCluster and LUVerifyCluster
Fix the OP_ID of OpAssignGroupNodes
Commit 96276ae added the above opcode, but forgot to update the OP_IDper our previous mailing list discussions. This patch makes the OP_IDbe consistent with the other IDs (OP_$object_$action).
Signed-off-by: Iustin Pop <iustin@google.com>...
Rename OpExportInstance and LUExportInstance
Add OpAssignGroupNodes and LUAssignGroupNodes
This operation allows to assign nodes to a group, verifying whetherthe change would leave any mirrored instance split between differentnode groups.
Signed-off-by: Adeodato Simo <dato@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Generalize the OpCode-should-be-in-mcpu test
Currently, the unittest TestDispatchTable in mcpu unittest does ahard-coded approach to test whether an opcode should be included ornot in the mcpu.Processor dispatch table. This is not flexible, so wereplace it with two changes:...
Fix OpSetInstanceParams.disk_template check
When moving the opcode parameters I moved two or three checks from anopcode's CheckArguments function to the type checks. This was one ofthem and unfortunately I didn't notice the parameter can be None.
Migrate code verifying opcode parameters to base class
This allows the function to be used in other places as well.An optional parameter is added to control whether defaultvalues should be set. Unittests are added, providing fullcoverage.
Improve tests for OP_ID
… by detecting duplicates.
opcodes: Add opcode parameter definitions
This is the first step for migrating them from cmdlib. A metaclass isused to define “__slots__” upon class creation time (not instantiation).
LUSetNodeParams: Add support for powered state
Rename (Op|LU)OutOfBand to (Op|LU)OobCommand
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Add the "alloc_policy" attribute to node groups
This can be set at group creation time and via OpSetGroupParams. The defaultis "preferred", and existing node groups from previous Ganeti version willget the attribute set to this value.
Signed-off-by: Adeodato Simo <dato@google.com>...
Add modification of node groups (OpCode/LU/CLI)
With this commit, only modification of the "ndparams" attribute issupported.
Signed-off-by: Adeodato Simo <dato@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Introduce OpAddGroup.ndparams and expose in CLI
Add gnt-cluster modify --master-netdev
Although this might be a dangerous operation, it's still better to allowit rather than requiring a hand-edit of the config file, should it benecessary.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Group operations: OpCode and LU for renaming a group
Group operations: OpCode and LU for removing a group
Group operations: OpCode and LU for adding a group
Adding new OpCode for OOB
Register OpCode and Logical Unit in mcpu.py
opcodes: document OP_DSC_FIELD in OpCode and OpCode.Summary()
Signed-off-by: Adeodato Simo <dato@google.com>Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Querying node groups: LU/Opcode
This adds opcodes.OpQueryGroups and cmdlib.LUQueryGroups.
Signed-off-by: Adeodato Simo <dato@google.com>Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Add OpQuery opcode
Increase timeout for connection on remote import
The source cluster has to shut down an instance before it can beexported. Doing so can take a while, but the default connection timeoutis only 60 seconds. Adding the shutdown timeout on the receiving cluster...