History | View | Annotate | Download (25.9 kB)
Add user and group for the monitoring agent
This commit adds the user and group variables for the monitoring agent in allthe configuration files where they are required.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Move burnin to ganeti.tools.burnin
Similar to other scripts, “tools/burnin” just becomes a wrapper script.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Rename htools/ to src/
Per offline discussions, this is the first patch of therenames. Tested with "make distcheck", seems to work fine.
The only change outside of the renaming is a bit of simplification inthe .gitignore rules; otherwise, simply s/htools/src/....
Add the gnt-storage client
Add a new client called 'gnt-storage'.The client interacts with the ExtStorage interface, similarly tothe way gnt-os interacts with the OS interface.
For now, only two commands are supported: 'info' and 'diagnose'.
'diagnose' calculates the node status of each provider on each node,...
Merge branch 'devel-2.6'
Fix job completion with big job queues
Accidentally stumbled upon this while testing unrelated code on amachine with ~3K active jobs - the bash completion unittest washanging.
Upon investigation, it turns out that bash's ${var//pattern/repl/} isprobably quadratic in the size of input (or worse, even):...
Enable bash completion for mon-collector
This just ties in all the pieces so far and enables bash completionfor it.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
bash-completion: add support for multi-cmd Haskell binaries
This patch adds support for parsing the command list out of a binary(very strict format), and then iterating over that and building thesub-commands options/arguments.
It also does a bit of general cleanup in the script....
Include networks in Makefile and bash completion
Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>Reviewed-by: Iustin Pop <iustin@google.com>
bash_completion: Fix mistake introduced in merge 6a74f58
This part of the code was duplicated by accident.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Merge ganeti-master-cleaner back into ganeti-cleaner
As I wrote during/after the review on commit 2958c56, “ganeti-cleaner:Separate queue cleaning code”, while I appreciated the permissionseparation, I didn't like too much the file-based approach:
- it is a very simple script, and lots of the code is duplicated...
Split the OptComplNumeric into integer/float ones
This allows the command completion to treat them as separate optiontypes; this is not useful in build-bash-completion right now, butmight become so in the future.
Signed-off-by: Iustin Pop <iustin@google.com>...
Enable bash completion for Haskell daemons too
This requires a few tiny changes to build-bash-completion and toMakefile rules, but is straightforward.
Support the new option types in build-bash-completion
Beside parsing the arguments as well, we also change the serialisationformat for choices/suggests, to make the Python code simpler.
bash_completion: Enable extglob while parsing file
In older versions of GNU Bash extended patterns, such as “@(…)”, are onlyavailable with the “extglob” shell option. As pointed out in [1] and [2],“extglob” must be enabled while parsing the code. Therefore the flag must be...
Enable bash completion for htools scripts
This patch ties together the previous commits, by extendingbuild-bash-completion to call all htools scripts and get theircompletion information, then use that to build fake cli_optionsrepresenting them and finally generate the bash completion...
Revert "bash_completion: Always enable extglob"
This reverts commit 94014b6328f813b674a1126ffd221705d7e315b3. Turns outI misunderstood the “extglob” shell option.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
bash_completion: Generate more compact version
First the numbers:$ stat --format '%s %n' doc/examples/bash_completion*77847 doc/examples/bash_completion86492 doc/examples/bash_completion-debug
The non-debug version doesn't use indentation and does not have some...
bash_completion: Always enable extglob
In older versions of GNU Bash extended patterns, such as “@(…)” are onlyavailable with the “extglob” shell option. This patch adds a wrapperfunction so that extglob is always enabled while doing any completion.Due to early returns inside the main completion function this seemed...
Migrate build-bash-completion from constants to pathutils
File system paths moved from constants to pathutils.
Bump pep8 version to 1.2
Debian Wheezy will ship with this version, and it has many improved checks compared to 0.6, so let's:
- bump version in the docs- silence some new checks that are wrong due to our indent=2 instead of 4- fix lots of errors in the code where the indentation was wrong by 1...
Ensure a stable content of the bash completion file
Currently, the order of commands in the bash completion file israndom, because the sub-commands are not sorted. This makes it harderto investigate the differences in packaged Ganeti or in installedGaneti, since chunks in this file will have a random order....
Merge branch 'devel-2.5'
DeprecationWarning fixes for pylint
In version 0.21, pylint unified all the disable-* (and enable-*)directives to disable (resp. enable). This leads to a lot ofDeprecationWarning being emitted even if one uses the recommendedversion of pylint (0.21.1, as stated in devnotes.rst)....
bash completion: Shorten function names
This saves another 5 kB from the generated script. An old debug commentwritten to the generated output is also removed.
bash completion: Group commands by arguments and options
This grouping, which was a TODO for a long time, reduces the script sizeby about 5kB.
Check option name format when building bash completion
This is just a style check. Option names should be consistent. Since allof them go through the “build-bash-completion” script, this seemed to bea good place.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
Querying node groups: add client/gnt_group.py
This implements `gnt-group list`.
Signed-off-by: Adeodato Simo <dato@google.com>Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Add nodegroup bash autocomplation
We autocomplete both by nodegroup name and uuid.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
cli: Use list of options shared between commands
The completion script for bash has to know about these options. Until nowthe list was in two places--once in cli.py and once inautotools/build-bash-completion. A shared list is used with this patch.
Move ShellWriter class to utils
Also add unittest.
Introduce a bool CLI option type
This option type enforces its value to either True or False, relievingthe scripts from manually parsing the values in each function.
We also update the bash completion code to use the option type ifpossible.
cli: Add ArgOs for later use in gnt-os
Signed-off-by: René Nussbaumer <rn@google.com>Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
build-bash-completion: Take care of pylint warnings
build-bash-completion: Fix a few pylint warnings
build-bash-completion: Check for None before comparing
Comparing a number with None is not a good idea:
>>> (0 < None, 0 > None) (False, True)
This patch also adds build-bash-completion to the listof checked Python scripts and wraps one line of more...
bash_completion: Move common code into function
This reduces the size of the script by about 9 kB.
Remove explicit DEBUG_OPT and add it by default
Since >90% of the commands take the “--debug” option, and all shouldactually take it (the gnt-job command is currently missing it), it makessense to simply remove this and add it by default in cli.py.
Show "--help" in bash completion
Move LoadModule function to ganeti.build
It should only be used at build-time.
Add bash completion for --node node1[:node2]
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Luca Bigliardi <shammash@google.com>
Add more debugging to bash completion
Move LoadModule function to utils
It can be used by unittests for daemons/* or scripts/*.
Bash completion: Implement dynamic option value completion
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Olivier Tharan <olive@google.com>
Bash completion: Add function to get all iallocators
Bash completion: Simplify option completion
This makes the output file quite a bit smaller and is neededin preparation for non-static option completion (e.g. list ofnodes).
Bash completion: Support for --foo=bar option format
That is with the equal sign.
Bash completion: Small optimizations
$2 doesn't contain the correct value when completing something like"--disk-template=…". Getting it via COMP_WORDS is better.
Short options (e.g. -I) can't have an equal sign.
Also add useful debugging commands for development....
bash completion: Allow arguments with min < max arguments
Handle more errors in bash completion
Don't print error messages if cluster hasn't been initialized yet.
Add ArgHost class
It expands to the hostnames known by bash.
Use script to generate bash completion
Completion for tools/burnin is not yet implemented. It needs to beconverted to definition-based options handling first.