History | View | Annotate | Download (17.1 kB)
Add support for command aliases
Passing a new aliases dict to generic main we can easily support aliases forcompatibility reasons or simply useability.
Reviewed-by: iustinp
Handle ^C while trying to acquire the lock
When waiting for the lock and pressing ^C, the user will get a backtraceas the KeyboardInterrupt exception is not handled. The patch adds asimple method of handling it.
Note that this is not about ^C in any other place....
Make utils.RunCmd log failures when using debug
This patch adds logging of command failures to the debug log in case theuser either started the command (gnt-*) or the node daemon with thedebug flag.
Reviewed-by: imsnah
Remove --secondary-node option.
Replace --secondary-node option with an optional parameter for --node.
Small cleanup for error formatting
Reviewed-by: ultrotter
Miscellaneous style fixes
This patch fixes some minor pylint warnings (unused variables, wrongindentation, etc.) and a real bug in the recovery for drbd8 renameprocedure.
Change the signature of some methods of mcpu.Processor
This patch moves the passing of the feedback_fn argument from the(Exec|Chain)OpCode to the initialization of the Processor instance.
Some small fixes to utils.GenerateTable
This adds: - fix the case when a dumb caller didn't stringify its values - explicitly raise a ProgrammerError in case a field is missing from the headers dictionary
Fix AskUser to not die on extra input
Currently, AskUser dies with -ESPIPE if the user gives more than onecharacter plus newline. This is because the python library, whilereturning only two chars from the readline(2) call, will cache the restof the input, and when we do a write, it will try to seek back to just...
Remove the shebang from modules
Since modules are not directly executables, remove the shebang fromthem. This helps with lintian warnings.
Also make the autogenerated _autoconf.py contain two comment lines atthe beginning, like the other modules.
Fix a wrong exception name
This was introduced in rev 208.
Separate error formatting out of cli.GenericMain
This patch moves the error formatting into a separate function that willbe exported so that scripts that execute multiple opcodes can create thesame output as for GenericMain. Also, GenericMain becomes more readable....
Enhance cli.SubmitOpcode to use custom parameters
This patch allows the SubmitOpcode function to take a pre-createdProcessor instance and a different feedback function. This is helpfulwhen submitting more than one opcode from a shell script.
Add handler for errors.TagError
This patch adds a simple handler for TagError that prints the error(better than having a stack dump).
Add source file option for {add,remove}-tags
This patch adds a '--from' option to the {add,remove}-tags commands thatallows the command to read from a file or from stdin (when passing adash for the filename).
Implement command-line tags support
This patch adds generic functions for tag manipulations to cli.py andmodifies gnt-{cluster,node,instance} to export {list,add,remove}-tagscommands that use those.
Extend GenericMain with a way to override options
This allows scripts to pass options to generic functions (options thatare not visible in the command line).
Remove requirement that host names are FQDN
We currently require that hostnames are FQDN not short names(node1.example.com instead of node1). We can allow short names as longas: - we always resolve the names as returned by socket.gethostname() - we rely on having a working resolver...
Improve the cli.AskUser() function
This patch improves the AskUser function by allowing it to: - choose from multiple choices (instead of only y/n) - give help to the user - preserve line breaks and whitespace formatting in the message
With this patch, an instance removal looks like this:...
Change cli.OutputTable to cli.GenerateTable
Since the table generation might be useful elsewhere, let's change it toreturn the data instead of directly printing it.
Its callers have also been updated.
Style changes for pep-8 and python-3000 compliance.
This changes the raising of exceptions from: raise Exception, valueto raise Exception(value)
as the first form will be removed in python-3000 and the second form ispreferred now.
The changes also involve a few cases of changing from raising standard...
- Move --force option to cli.py- Implement “gnt-instance reinstall”- Fix two typos
Comment formatting updates.
Use generic function to output tables.
- Implement “gnt-node volumes”- Create all --output options using a constant- Put node checking code from opcodes into a single function- Do the same for output fields
Initial commit.