Revision f2af0bec
b/NEWS | ||
---|---|---|
167 | 167 |
- Ignore failures while shutting down instances during failover from |
168 | 168 |
offline node |
169 | 169 |
- Exit daemon's bootstrap process only once daemon is ready |
170 |
- Export more information via ``LUQueryInstances``/remote API
|
|
170 |
- Export more information via ``LUInstanceQuery``/remote API
|
|
171 | 171 |
- Improved documentation, QA and unittests |
172 | 172 |
- RAPI daemon now watches ``rapi_users`` all the time and doesn't need a |
173 | 173 |
restart if the file was created or changed |
b/doc/design-2.0.rst | ||
---|---|---|
964 | 964 |
- ``OpInstanceCreate``, where the new hv and be parameters will be sent |
965 | 965 |
as dictionaries; note that all hv and be parameters are now optional, |
966 | 966 |
as the values can be instead taken from the cluster |
967 |
- ``OpQueryInstances``, where we have to be able to query these new
|
|
967 |
- ``OpInstanceQuery``, where we have to be able to query these new
|
|
968 | 968 |
parameters; the syntax for names will be ``hvparam/$NAME`` and |
969 | 969 |
``beparam/$NAME`` for querying an individual parameter out of one |
970 | 970 |
dictionary, and ``hvparams``, respectively ``beparams``, for the whole |
b/lib/client/gnt_instance.py | ||
---|---|---|
195 | 195 |
@raise errors.OpPrereqError: in case any instance is missing |
196 | 196 |
|
197 | 197 |
""" |
198 |
# TODO: change LUQueryInstances to that it actually returns None
|
|
198 |
# TODO: change LUInstanceQuery to that it actually returns None
|
|
199 | 199 |
# instead of raising an exception, or devise a better mechanism |
200 | 200 |
result = client.QueryInstances(names, ["name"], False) |
201 | 201 |
for orig_name, row in zip(names, result): |
b/lib/cmdlib.py | ||
---|---|---|
5520 | 5520 |
lu.remove_locks[locking.LEVEL_INSTANCE] = instance.name |
5521 | 5521 |
|
5522 | 5522 |
|
5523 |
class LUQueryInstances(NoHooksLU):
|
|
5523 |
class LUInstanceQuery(NoHooksLU):
|
|
5524 | 5524 |
"""Logical unit for querying instances. |
5525 | 5525 |
|
5526 | 5526 |
""" |
b/lib/opcodes.py | ||
---|---|---|
963 | 963 |
] |
964 | 964 |
|
965 | 965 |
|
966 |
class OpQueryInstances(OpCode):
|
|
966 |
class OpInstanceQuery(OpCode):
|
|
967 | 967 |
"""Compute the list of instances.""" |
968 | 968 |
OP_ID = "OP_INSTANCE_QUERY" |
969 | 969 |
OP_PARAMS = [ |
b/lib/server/masterd.py | ||
---|---|---|
1 | 1 |
# |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2006, 2007, 2010 Google Inc. |
|
4 |
# Copyright (C) 2006, 2007, 2010, 2011 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
278 | 278 |
if use_locking: |
279 | 279 |
raise errors.OpPrereqError("Sync queries are not allowed", |
280 | 280 |
errors.ECODE_INVAL) |
281 |
op = opcodes.OpQueryInstances(names=names, output_fields=fields,
|
|
282 |
use_locking=use_locking)
|
|
281 |
op = opcodes.OpInstanceQuery(names=names, output_fields=fields,
|
|
282 |
use_locking=use_locking) |
|
283 | 283 |
return self._Query(op) |
284 | 284 |
|
285 | 285 |
elif method == luxi.REQ_QUERY_NODES: |
b/lib/watcher/__init__.py | ||
---|---|---|
1 | 1 |
# |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2006, 2007, 2008, 2009, 2010 Google Inc. |
|
4 |
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
415 | 415 |
|
416 | 416 |
""" |
417 | 417 |
op1_fields = ["name", "status", "admin_state", "snodes"] |
418 |
op1 = opcodes.OpQueryInstances(output_fields=op1_fields, names=[],
|
|
419 |
use_locking=True)
|
|
418 |
op1 = opcodes.OpInstanceQuery(output_fields=op1_fields, names=[],
|
|
419 |
use_locking=True) |
|
420 | 420 |
op2_fields = ["name", "bootid", "offline"] |
421 | 421 |
op2 = opcodes.OpQueryNodes(output_fields=op2_fields, names=[], |
422 | 422 |
use_locking=True) |
b/tools/burnin | ||
---|---|---|
694 | 694 |
for pnode, snode, enode, instance in mytor: |
695 | 695 |
Log("instance %s", instance, indent=1) |
696 | 696 |
# read the full name of the instance |
697 |
nam_op = opcodes.OpQueryInstances(output_fields=["name"],
|
|
698 |
names=[instance], use_locking=True)
|
|
697 |
nam_op = opcodes.OpInstanceQuery(output_fields=["name"],
|
|
698 |
names=[instance], use_locking=True) |
|
699 | 699 |
full_name = self.ExecOp(False, nam_op)[0][0] |
700 | 700 |
|
701 | 701 |
if self.opts.iallocator: |
Also available in: Unified diff