Revision 2237687b
b/doc/design-2.1.rst | ||
---|---|---|
780 | 780 |
staggered way. In 2.1, we will simply add an “uuid” attribute to each |
781 | 781 |
of the instances, nodes and cluster itself. This will be reported on |
782 | 782 |
instance creation for nodes, and on node adds for the nodes. It will |
783 |
be of course avaiblable for querying via the OpQueryNodes/Instance and
|
|
783 |
be of course avaiblable for querying via the OpNodeQuery/Instance and
|
|
784 | 784 |
cluster information, and via RAPI as well. |
785 | 785 |
|
786 | 786 |
Note that Ganeti will not provide any way to change this attribute. |
b/lib/cmdlib.py | ||
---|---|---|
3598 | 3598 |
oob_support, lu.cfg.GetClusterInfo()) |
3599 | 3599 |
|
3600 | 3600 |
|
3601 |
class LUQueryNodes(NoHooksLU):
|
|
3601 |
class LUNodeQuery(NoHooksLU):
|
|
3602 | 3602 |
"""Logical unit for querying nodes. |
3603 | 3603 |
|
3604 | 3604 |
""" |
b/lib/opcodes.py | ||
---|---|---|
638 | 638 |
] |
639 | 639 |
|
640 | 640 |
|
641 |
class OpQueryNodes(OpCode):
|
|
641 |
class OpNodeQuery(OpCode):
|
|
642 | 642 |
"""Compute the list of nodes.""" |
643 | 643 |
OP_ID = "OP_NODE_QUERY" |
644 | 644 |
OP_PARAMS = [ |
b/lib/server/masterd.py | ||
---|---|---|
288 | 288 |
if use_locking: |
289 | 289 |
raise errors.OpPrereqError("Sync queries are not allowed", |
290 | 290 |
errors.ECODE_INVAL) |
291 |
op = opcodes.OpQueryNodes(names=names, output_fields=fields,
|
|
292 |
use_locking=use_locking)
|
|
291 |
op = opcodes.OpNodeQuery(names=names, output_fields=fields,
|
|
292 |
use_locking=use_locking) |
|
293 | 293 |
return self._Query(op) |
294 | 294 |
|
295 | 295 |
elif method == luxi.REQ_QUERY_GROUPS: |
b/lib/watcher/__init__.py | ||
---|---|---|
418 | 418 |
op1 = opcodes.OpInstanceQuery(output_fields=op1_fields, names=[], |
419 | 419 |
use_locking=True) |
420 | 420 |
op2_fields = ["name", "bootid", "offline"] |
421 |
op2 = opcodes.OpQueryNodes(output_fields=op2_fields, names=[],
|
|
422 |
use_locking=True)
|
|
421 |
op2 = opcodes.OpNodeQuery(output_fields=op2_fields, names=[],
|
|
422 |
use_locking=True) |
|
423 | 423 |
|
424 | 424 |
job_id = client.SubmitJob([op1, op2]) |
425 | 425 |
|
b/tools/burnin | ||
---|---|---|
502 | 502 |
else: |
503 | 503 |
names = [] |
504 | 504 |
try: |
505 |
op = opcodes.OpQueryNodes(output_fields=["name", "offline", "drained"],
|
|
506 |
names=names, use_locking=True)
|
|
505 |
op = opcodes.OpNodeQuery(output_fields=["name", "offline", "drained"],
|
|
506 |
names=names, use_locking=True) |
|
507 | 507 |
result = self.ExecOp(True, op) |
508 | 508 |
except errors.GenericError, err: |
509 | 509 |
err_code, msg = cli.FormatError(err) |
Also available in: Unified diff