« Previous | Next » 

Revision ec79568d

IDec79568d7878474ce8c75500f2aa535ac6b9bab7
Parent 00ad5362
Child 81a49123

Added by Iustin Pop almost 13 years ago

Implement lockless query operations

This patch adds the framework for, and enables lockless OpQueryInstances. This
means that instances will be shown in ERROR_up or ERROR_down state, even though
this is not an error (but just an in-progress job).

The framework is implemented as follows:
- the OpQueryInstances, OpQueryNodes and OpQueryExports opcodes take
an additional “use_locking” flag which will denote whether to lock
or not; this patch only implements this for LUQueryInstances
- the luxi query functions take an additional argument use_locking
which is passed to the master daemon, and then passed to the above
opcodes
- cli.py export a new SYNC_OPT command line options which implement
setting this flag to true
- except for gnt-instance list, which uses this option, and for
name-only queries (e.g. QueryNodes(fields=["names"])), all other
callers are setting this flag to True
- RAPI also sets the flag to True

The patch was tested with a continuous (0.2s sleep in-between)
gnt-instance list during a burnin, and no problems were observed.

Reviewed-by: ultrotter

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences