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
Showing
- daemons/ganeti-masterd 8 additions, 6 deletionsdaemons/ganeti-masterd
- daemons/ganeti-watcher 2 additions, 2 deletionsdaemons/ganeti-watcher
- lib/cli.py 6 additions, 1 deletionlib/cli.py
- lib/cmdlib.py 4 additions, 3 deletionslib/cmdlib.py
- lib/luxi.py 6 additions, 6 deletionslib/luxi.py
- lib/opcodes.py 3 additions, 3 deletionslib/opcodes.py
- lib/rapi/rlib2.py 4 additions, 4 deletionslib/rapi/rlib2.py
- scripts/gnt-backup 1 addition, 1 deletionscripts/gnt-backup
- scripts/gnt-instance 7 additions, 6 deletionsscripts/gnt-instance
- scripts/gnt-node 6 additions, 5 deletionsscripts/gnt-node
- tools/burnin 3 additions, 2 deletionstools/burnin
Loading
Please register or sign in to comment