Revision cfdf561d
b/NEWS | ||
---|---|---|
16 | 16 |
``Query(what=QR_LOCK, ...)`` instead. |
17 | 17 |
- The LUXI requests :pyeval:`luxi.REQ_QUERY_JOBS`, |
18 | 18 |
:pyeval:`luxi.REQ_QUERY_INSTANCES`, :pyeval:`luxi.REQ_QUERY_NODES`, |
19 |
:pyeval:`luxi.REQ_QUERY_GROUPS` and :pyeval:`luxi.REQ_QUERY_EXPORTS`
|
|
20 |
are deprecated and will be removed in a future version.
|
|
21 |
:pyeval:`luxi.REQ_QUERY` should be used instead. |
|
19 |
:pyeval:`luxi.REQ_QUERY_GROUPS`, :pyeval:`luxi.REQ_QUERY_EXPORTS` and
|
|
20 |
:pyeval:`luxi.REQ_QUERY_TAGS` are deprecated and will be removed in a
|
|
21 |
future version. :pyeval:`luxi.REQ_QUERY` should be used instead.
|
|
22 | 22 |
|
23 | 23 |
|
24 | 24 |
Version 2.5.0 |
b/lib/cmdlib.py | ||
---|---|---|
14292 | 14292 |
def ExpandNames(self): |
14293 | 14293 |
self.group_uuid = None |
14294 | 14294 |
self.needed_locks = {} |
14295 |
|
|
14295 | 14296 |
if self.op.kind == constants.TAG_NODE: |
14296 | 14297 |
self.op.name = _ExpandNodeName(self.cfg, self.op.name) |
14297 |
self.needed_locks[locking.LEVEL_NODE] = self.op.name |
|
14298 |
lock_level = locking.LEVEL_NODE |
|
14299 |
lock_name = self.op.name |
|
14298 | 14300 |
elif self.op.kind == constants.TAG_INSTANCE: |
14299 | 14301 |
self.op.name = _ExpandInstanceName(self.cfg, self.op.name) |
14300 |
self.needed_locks[locking.LEVEL_INSTANCE] = self.op.name |
|
14302 |
lock_level = locking.LEVEL_INSTANCE |
|
14303 |
lock_name = self.op.name |
|
14301 | 14304 |
elif self.op.kind == constants.TAG_NODEGROUP: |
14302 | 14305 |
self.group_uuid = self.cfg.LookupNodeGroup(self.op.name) |
14306 |
lock_level = locking.LEVEL_NODEGROUP |
|
14307 |
lock_name = self.group_uuid |
|
14308 |
else: |
|
14309 |
lock_level = None |
|
14310 |
lock_name = None |
|
14311 |
|
|
14312 |
if lock_level and getattr(self.op, "use_locking", True): |
|
14313 |
self.needed_locks[lock_level] = lock_name |
|
14303 | 14314 |
|
14304 | 14315 |
# FIXME: Acquire BGL for cluster tag operations (as of this writing it's |
14305 | 14316 |
# not possible to acquire the BGL based on opcode parameters) |
b/lib/opcodes.py | ||
---|---|---|
1737 | 1737 |
OP_DSC_FIELD = "name" |
1738 | 1738 |
OP_PARAMS = [ |
1739 | 1739 |
_PTagKind, |
1740 |
# Not using _PUseLocking as the default is different for historical reasons |
|
1741 |
("use_locking", True, ht.TBool, "Whether to use synchronization"), |
|
1740 | 1742 |
# Name is only meaningful for nodes and instances |
1741 | 1743 |
("name", ht.NoDefault, ht.TMaybeString, None), |
1742 | 1744 |
] |
b/lib/server/masterd.py | ||
---|---|---|
393 | 393 |
elif method == luxi.REQ_QUERY_TAGS: |
394 | 394 |
(kind, name) = args |
395 | 395 |
logging.info("Received tags query request") |
396 |
op = opcodes.OpTagsGet(kind=kind, name=name) |
|
396 |
op = opcodes.OpTagsGet(kind=kind, name=name, use_locking=False)
|
|
397 | 397 |
return self._Query(op) |
398 | 398 |
|
399 | 399 |
elif method == luxi.REQ_QUEUE_SET_DRAIN_FLAG: |
Also available in: Unified diff