On Wed, Sep 24, 2008 at 03:43:37PM +0200, Michael Hanselmann wrote:
>
> This can be used to retrieve certain cluster config values from
> within clients.
>
> OpDumpClusterConfig was not used anywhere, hence I'm just reusing
> it. The way ConfigWriter.DumpConfig returned the configuration
> was not thread-safe, anyway (no deepcopy).
> ---
> daemons/ganeti-masterd | 5 +++++
> lib/cmdlib.py | 20 +++++++++++++++++---
> lib/config.py | 7 -------
> lib/luxi.py | 4 ++++
> lib/mcpu.py | 2 +-
> lib/opcodes.py | 8 ++++----
> 6 files changed, 31 insertions(+), 15 deletions(-)
Good point about DumpClusterConfig, it was indeed not used and ready for
pruning/reuse.
One question: do you thik the REQ_QUERY_CONFIG_VALUES is flexible enough
even if we change the cluster parameters (I think yes, just checking).
And:
> @@ -1866,6 +1866,11 @@ class LUDumpClusterConfig(NoHooksLU):
> def ExpandNames(self):
> self.needed_locks = {}
>
> + dynamic_fields = ["cluster_name", "master_node"]
> + _CheckOutputFields(static=[],
> + dynamic=dynamic_fields,
> + selected=self.op.output_fields)
> +
Here, we don't need to RPC to any node to get this, so they are 'static'
fields. The difference between static and dynamic is:
- statis is from the config
- dynamic is from asking the nodes
iustin