History | View | Annotate | Download (36.7 kB)
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...
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.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
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.
Signed-off-by: René Nussbaumer <rn@google.com>...
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.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
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
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
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...
Adding ndparams to their OpCodes and LU calls
Add -s option to gnt-node modify
We can now change a nodes' secondary ip.
Add vm_capable to LUSetNodeParams
And also do some cleanup: we only run the role changed actions if thenode has actually changed roles.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Add the master/vm_capable flags in node add
Implement the master_capable flag in node modify
Support modify of prealloc_wipe_disks config value
Rename node.nodegroup to node.group
In the context of a node, its group has (at least today) only onemeaning, that is the node's node group. As such, we renamenode.nodegroup to just node.group.
Note: if we want to keep node in there, it should be at least...
gnt-instance reinstall: Allow overriding OS parameters
This allows OS installation scripts to make use of special parameters,e.g. to retain some data on reinstallation.
The RAPI resource is not updated as it takes all parameters via thequery string and encoding arbitrary data in a query string is tricky....
Add option to ignore offline node on instance start/stop
In some cases it can be useful to mark as an instance as startedor stopped while its primary node is offline. With this patch,a new option, “--ignore-offline”, is introduced to “gnt-instancestart” and “… stop”....
Merge branch 'devel-2.2'
Conflicts: lib/objects.py (trivial, strange that this one, and only this one, conflicted)
Rename the _oss cluster vars to _os
Per the mailing list discussion, rename _oss to _os, both in cluster parametersand in the rest of the code.
This is just an s/_oss/_os, with the exception of a small bit of cleanuparound the helper_os function in cmdlib.py....
Allow gnt-os modify to change the new OS params
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
jqueue: Change model from per-job to per-opcode processing
In order to support priorities, the processing of jobs needs to bechanged. Instead of processing jobs as a whole, the code is changed toprocess one opcode at a time and then return to the queue. See the...
opcode summary: improve display for list summaries
Currently, opcodes like NODE_EVAC_STRATEGY look bad:
89684 error NODE_EVAC_STRATEGY([u'node3'])
With this patch, we try to render list arguments a little bit better:
89684 error NODE_EVAC_STRATEGY(node3)...
Add nodegroup option to AddNode
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>