Revision 77921a95

b/daemons/ganeti-masterd
247 247
    elif method == luxi.REQ_QUERY_INSTANCES:
248 248
      (names, fields, use_locking) = args
249 249
      logging.info("Received instance query request for %s", names)
250
      if use_locking:
251
        raise errors.OpPrereqError("Sync queries are not allowed")
250 252
      op = opcodes.OpQueryInstances(names=names, output_fields=fields,
251 253
                                    use_locking=use_locking)
252 254
      return self._Query(op)
......
254 256
    elif method == luxi.REQ_QUERY_NODES:
255 257
      (names, fields, use_locking) = args
256 258
      logging.info("Received node query request for %s", names)
259
      if use_locking:
260
        raise errors.OpPrereqError("Sync queries are not allowed")
257 261
      op = opcodes.OpQueryNodes(names=names, output_fields=fields,
258 262
                                use_locking=use_locking)
259 263
      return self._Query(op)
260 264

  
261 265
    elif method == luxi.REQ_QUERY_EXPORTS:
262 266
      nodes, use_locking = args
267
      if use_locking:
268
        raise errors.OpPrereqError("Sync queries are not allowed")
263 269
      logging.info("Received exports query request")
264 270
      op = opcodes.OpQueryExports(nodes=nodes, use_locking=use_locking)
265 271
      return self._Query(op)
b/scripts/gnt-backup
45 45
  @return: the desired exit code
46 46

  
47 47
  """
48
  exports = GetClient().QueryExports(opts.nodes, True)
48
  exports = GetClient().QueryExports(opts.nodes, False)
49 49
  retcode = 0
50 50
  for node in exports:
51 51
    ToStdout("Node: %s", node)
b/scripts/gnt-instance
90 90
    if not names:
91 91
      raise errors.OpPrereqError("No node names passed")
92 92
    ndata = client.QueryNodes(names, ["name", "pinst_list", "sinst_list"],
93
                              True)
93
                              False)
94 94
    ipri = [row[1] for row in ndata]
95 95
    pri_names = list(itertools.chain(*ipri))
96 96
    isec = [row[2] for row in ndata]
b/scripts/gnt-node
77 77

  
78 78
  try:
79 79
    output = cl.QueryNodes(names=[node], fields=['name', 'sip'],
80
                           use_locking=True)
80
                           use_locking=False)
81 81
    node_exists, sip = output[0]
82 82
  except (errors.OpPrereqError, errors.OpExecError):
83 83
    node_exists = ""
......
206 206
  src_node = args[0]
207 207

  
208 208
  result = cl.QueryNodes(names=[src_node], fields=selected_fields,
209
                         use_locking=True)
209
                         use_locking=False)
210 210
  src_node, sinst = result[0]
211 211

  
212 212
  if not sinst:
......
214 214
    return constants.EXIT_SUCCESS
215 215

  
216 216
  if dst_node is not None:
217
    result = cl.QueryNodes(names=[dst_node], fields=["name"], use_locking=True)
217
    result = cl.QueryNodes(names=[dst_node], fields=["name"],
218
                           use_locking=False)
218 219
    dst_node = result[0][0]
219 220

  
220 221
    if src_node == dst_node:
......
263 264
  # these fields are static data anyway, so it doesn't matter, but
264 265
  # locking=True should be safer
265 266
  result = cl.QueryNodes(names=args, fields=selected_fields,
266
                         use_locking=True)
267
                         use_locking=False)
267 268
  node, pinst = result[0]
268 269

  
269 270
  if not pinst:
......
301 302
  force = opts.force
302 303
  selected_fields = ["name", "pinst_list"]
303 304

  
304
  result = cl.QueryNodes(names=args, fields=selected_fields, use_locking=True)
305
  result = cl.QueryNodes(names=args, fields=selected_fields, use_locking=False)
305 306
  node, pinst = result[0]
306 307

  
307 308
  if not pinst:
......
348 349
  result = cl.QueryNodes(fields=["name", "pip", "sip",
349 350
                                 "pinst_list", "sinst_list",
350 351
                                 "master_candidate", "drained", "offline"],
351
                         names=args, use_locking=True)
352
                         names=args, use_locking=False)
352 353

  
353 354
  for (name, primary_ip, secondary_ip, pinst, sinst,
354 355
       is_mc, drained, offline) in result:

Also available in: Unified diff