- May 31, 2011
-
-
Iustin Pop authored
Currently, we only ht-check the result value from the iallocator, and we send whatever we happen to check manually in the LUs that call the iallocator. This is not good, as we have to duplicate checks in many places, and still we might miss checks. So we add add ht information to the per-request variables. As the cluster data is built in one place, the iallocator code itself (and is more consistent), I didn't add checks to that too. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently, the iallocator in 'allocate' requires mem_size on input but serialises that as 'memory'. This inconsistency makes it hard to automatically validate the parameters, hence this patch renames mem_size. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Per the design doc, the target_groups request key "if present, it must either be the empty list, or contain a list of group UUIDs". Currently it defaults to None/null, which is not valid. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
In 'allocate' mode, the documentation specifies that we export the hypervisor value (“Allocation needs, in addition: … hypervisor, the hypervisor of this instance”) and we need that on input, however we don't actually export it. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Commit fdbe29ee changed the iallocator modes from 'r'/'w' to 'ro'/'rw', but forgot one check in LUTestAllocator. This patch just completes the replacements. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- May 30, 2011
-
-
Michael Hanselmann authored
Until now LUNodeMigrate used multiple tasklets to evacuate all primary instances on a node. In some cases it would acquire all node locks, which isn't good on big clusters. With upcoming improvements to the LUs for instance failover and migration, switching to separate jobs looks like a better option. This patch changes LUNodeMigrate to use LU-generated jobs. While working on this patch, I identified a race condition in LUNodeMigrate.ExpandNames. A node's instances were retrieved without a lock and no verification was done. For RAPI, a new feature string is added and can be used to detect clusters which support more parameters for node migration. The client is updated. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> Signed-off-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
This fixes a unittest failure on 32 bit systems. A recently added unittest for ht.TJobId uses a rather large number (2347625220). On 64 bit systems it is stored as “int”. On 32 bit systems however, Python uses “long”. The two types can be intermixed in Python as the interpreter will take care of conversions. If one processed too many jobs (2**31) on a 32 bit system, ht would no longer accept the job IDs. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- May 28, 2011
-
-
Tsachy Shacham authored
Signed-off-by:
Tsachy Shacham <tsachy@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- May 27, 2011
-
-
Michael Hanselmann authored
The check for container items is useful for tuples and/or lists with non-uniform values. The “anything” check can be used when any value should be accepted for an item. The job ID check, which uses the regexp check, will be used for expressing opcode dependencies on other jobs. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- May 26, 2011
-
-
Michael Hanselmann authored
* devel-2.4: TLReplaceDisks: Move assertion checking locks Conflicts: lib/cmdlib.py: Trivial Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Commit 1bee66f3 added assertions for ensuring only the necessary locks are kept while replacing disks. One of them makes sure locks have been released during the operation. Unfortunately the commit added the check as part of a “finally” branch, which is also run when an exception is thrown (in which case the locks may not have been released yet). Errors could be masked by the assertion error. Moving the check out of the “finally” branch fixes the issue. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- May 25, 2011
-
-
Michael Hanselmann authored
With LU-generated jobs only the ID is known. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
If “SubmitPending” were mixed with calls to “QueueJob”, jobs in the internal structures will get duplicate indices. With this change each queued job is assigned a unique index, which will be used for sorting the results. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Commit aac4511a added CheckArguments to LUNodeMigrate with a call to _CheckIAllocatorOrNode. When no default iallocator is defined, evacuating a node would always fail: $ gnt-node migrate node123 Migrate instance(s) '...'? y/[n]/?: y Failure: prerequisites not met for this operation: No iallocator or node given and no cluster-wide default iallocator found; please specify either an iallocator or a node, or set a cluster-wide default iallocator This patch adds a new parameter to specify a target node. This doesn't solve all issues, but will make the most important cases work again in the meantime. This opcode will receive more work for node group support. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This will be used for locking during node evacuation. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
It seems that abs_top_srcdir is not a good option, so I tested again with just using the same as in doc/examples/bash_completion. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- May 24, 2011
-
-
Iustin Pop authored
Sorry, I already had PYTHONPATH exported in my env, and as I said I wasn't able to test this on buildbot. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
* devel-2.4: node evac: don't call IAllocator if no instances Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Currently we generate an empty list only for the '-n node' invocation, but for iallocator we still call the iallocator (which needs an RPC call, etc.). By moving the computation of instances outside of the if block, we can return early from the LU. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
* devel-2.4: RPC/Backend: Make UploadFile uid and gid agnostic Resolve uid/gid upon mainloop run GetEntResolver: Make it possible to resolve uid/gid to name utils.algo: Add InvertDict to invert a dict autotools: Add noded group Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
I'm always confused by this strange difference, so let's rename the command to match what it tests. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
With the merge of the repositories, we can now auto-generate the code for Haskell constants from the Python code. Currently this only handles the basic types (strings and integers). Handling containers such as lists and dictionaries is only possible if we would use a parser such that we recognise the element names. We could extend the convert-constants script if that becomes necessary, right now I'm looking at just the simple constants such as Iallocator modes, instance states, etc. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- May 20, 2011
-
-
Michael Hanselmann authored
Also check for the opcode ID. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Also update NEWS on this change. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Adeodato Simo authored
This will trigger a ClusterVerifyGroup operation only on the specified group, skipping other groups as well as cluster-wide verifications. Signed-off-by:
Adeodato Simo <dato@google.com> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Adeodato Simo authored
Previously, all nodes and instances would *always* be visited/verified. By driving the verification by node group now, we will miss nodes and instances that can't be reached from existing node groups, should that rare and bogus circumstance ever occur. We safeguard against that by checking for unreachable nodes and instances explicitly. (These will not be further verified.) Signed-off-by:
Adeodato Simo <dato@google.com> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Adeodato Simo authored
When sharding by group, if a mirrored instance is split (primary and secondary) between two groups, its volumes will not be properly checked: the group of the primary will warn about a missing volume in the secondary, and the group of the secondary about an unknown volume (in the secondary as well). To solve the "missing volumes" bit, we will detect this case and perform an extra RPC verify call to these split secondaries (querying only for NV_LVLIST), and introduce the results in the node images appropriately. We do this detection early in ExpandNames/CheckPrereq, as to properly lock the extra nodes. As for the "unknown volumes" warning in the secondary, we update the volume mapping with split instances before checking for orphaned volumes. Finally, we mark nodes as "ghost" only if they really don't exist in the cluster configuration, which avoid spurious "instance lives in ghost node" warnings. Signed-off-by:
Adeodato Simo <dato@google.com> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Adeodato Simo authored
To cope with increasing cluster sizes, we now make nodes try to contact all other nodes in their group, and one node from every other group. Signed-off-by:
Adeodato Simo <dato@google.com> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Adeodato Simo authored
The list of all hypervisor parameters has to be computed in LUClusterVerifyGroup, since it needs to be passed to nodes as NV_HVPARAMS. However, it is better only to verify said parameters once, out of LUClusterVerifyConfig. For this, we refactor the code that constructs the list of parameters to a module-level _GetAllHypervisorParameters() function that both LUs can use. Signed-off-by:
Adeodato Simo <dato@google.com> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-