- Oct 10, 2007
-
-
Alexander Schreiber authored
This patch completely gets rid of fping - replace all fping invocations with TcpPing calls - update documentation accordingly. - associated cleanups (use constant for localhost IP, use more sensible defaults for TcpPing and _use_ those) Reviewed-by: iustinp
-
Iustin Pop authored
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 Reviewed-by: imsnah
-
Iustin Pop authored
Currently, AskUser dies with -ESPIPE if the user gives more than one character plus newline. This is because the python library, while returning only two chars from the readline(2) call, will cache the rest of the input, and when we do a write, it will try to seek back to just after the last returned char. This fails on /dev/tty, so an exception is raised. However, then opening the file descriptor in O_APPEND mode, python will not issue such seeks, thereby fixing this problem. The other alternative, opening in unbuffered mode, is not as good, since then python will issue one-byte reads at a time, but the tty will read the entire line, so at the next readline call, whatever remained in the descriptor buffer is returned from the kernel to python, and the user doesn't get a chance to enter something at all. Reviewed-by: imsnah
-
Iustin Pop authored
This patch adds a new 'evacuate' subcommand to gnt-node. The command will do a replace disks for all instances having that node as secondary with the new target being the new node given. The syntax is: gnt-node evacuate src_node target_node The command by itself doesn't do any resource checks, and instead relies on the LUFailoverInstance code to do that. Reviewed-by: imsnah
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Iustin Pop authored
Since modules are not directly executables, remove the shebang from them. This helps with lintian warnings. Also make the autogenerated _autoconf.py contain two comment lines at the beginning, like the other modules. Reviewed-by: ultrotter
-
Michael Hanselmann authored
- Change format of watcher state file to JSON. - Move log path for watcher script to constants.py. Reviewed-by: iustinp
-
- Oct 09, 2007
-
-
Iustin Pop authored
This was introduced in rev 208. Reviewed-by: imsnah
-
Iustin Pop authored
This patch moves the error formatting into a separate function that will be exported so that scripts that execute multiple opcodes can create the same output as for GenericMain. Also, GenericMain becomes more readable. Reviewed-by: imsnah
-
Iustin Pop authored
As far as I understand, this was just a debugging aid. Remove it so that configuration errors are nicely handled. Reviewed-by: imsnah
-
Iustin Pop authored
This patch allows the SubmitOpcode function to take a pre-created Processor instance and a different feedback function. This is helpful when submitting more than one opcode from a shell script. Reviewed-by: imsnah
-
- Oct 08, 2007
-
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Iustin Pop authored
This patch adds a simple handler for TagError that prints the error (better than having a stack dump). Reviewed-by: imsnah
-
Iustin Pop authored
This patch adds a '--from' option to the {add,remove}-tags commands that allows the command to read from a file or from stdin (when passing a dash for the filename). Reviewed-by: imsnah
-
Iustin Pop authored
This patch adds generic functions for tag manipulations to cli.py and modifies gnt-{cluster,node,instance} to export {list,add,remove}-tags commands that use those. Reviewed-by: imsnah
-
Iustin Pop authored
This patch changes the tags opcodes to work with multiple tags at once instead of only one. As such, the opcodes and some parameters are renamed. Reviewed-by: imsnah
-
Iustin Pop authored
Reviewed-by: imsnah
-
Iustin Pop authored
Reviewed-by: imsnah
-
Iustin Pop authored
This allows scripts to pass options to generic functions (options that are not visible in the command line). Reviewed-by: imsnah
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
- Move symlink to “ganeti” to top dir - Add ganeti.config_unittest.py to tests to be run - Make sure everything is built before tests are run Reviewed-by: iustinp
-
Michael Hanselmann authored
dot. Reviewed-by: iustinp
-
- Oct 04, 2007
-
-
Guido Trotter authored
This isdir() check leads to a broken error message. Even fixing it creates some cases in which the error message is nebulous and unclear while removing it makes this situation be dealt with a lot better by the _OSOndiskVersion checks. Reviewed-by: iustinp
-
Guido Trotter authored
- Document the expected change to errors.InvalidOS - Always pass the additional argument - Modify DiagnoseOS output to show the path Reviewed-by: iustinp, imsnah
-
Michael Hanselmann authored
- Add NEWS file with major changes between versions. - Bump RPC version number - No longer serialize in RPC, but just convert to dict Old Pickle based configuration files can be converted using the cfgupgrade utility. Reviewed-by: iustinp, ultrotter
-
- Oct 03, 2007
-
-
Guido Trotter authored
Abstract the _OSSearch function, to look for an OS in the search path Make OSFromDisk accept an optional base_dir, rather than the os_dir itself Reviewed-by: iustinp
-
Guido Trotter authored
First part of the OS search path cleanup. _OSOndiskversion is only ever called once, and with that argument set, so let's make it mandatory. Reviewed-by: iustinp
-
- Sep 28, 2007
-
-
Guido Trotter authored
directories which can contain OS scripts. The list defaults to the current one but can be changed at configure time. Reviewed-by: imsnah
-
- Sep 27, 2007
-
-
Guido Trotter authored
This is needed to improve FHS compliance for distribution integration. The need was discussed on the alioth pkg-ganeti project. Reviewed-by: imsnah
-
Michael Hanselmann authored
Reviewed-by: ultrotter
-
- Sep 25, 2007
-
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
with the script named differently than Debian. Reviewed-by: ultrotter
-
- Sep 24, 2007
-
-
Iustin Pop authored
This change allows instances of ConfigObject and its children to be converted to and from standard python types. This will allow easier upgrade of the configuration and use of any serialization protocol (not only pickle). The code is not very nice (a little too verbose, I think) but it works. Tested on a 2-node, 3-instance cluster by doing repeated conversions and checking consistency of results. Reviewed-by: imsnah
-
- Sep 21, 2007
-
-
Iustin Pop authored
It makes sense to make the TaggableObject a child of the ConfigObject, since in this case we can derive the Instance, Node and Cluster objects only from the TaggableObject and have a cleaner hierarchy. For consistency child classes will have to declare their slots by adding their parents on top. Reviewed-by: imsnah,ultrotter
-
Iustin Pop authored
We currently require that hostnames are FQDN not short names (node1.example.com instead of node1). We can allow short names as long as: - we always resolve the names as returned by socket.gethostname() - we rely on having a working resolver These issues are not as big as may seem, as we only did gethostname() in a few places in order to check for the master; we already required working resolver all over the code for the other nodes names (and thus requiring the same for the current node name is normal). The patch moves some resolver calls from within execution path to the checking path (which can abort without any problems). It is important that after this patch is applied, no name resolving is called from the execution path (LU.Exec() or other code that is called from within those methods) as in this case we get much better code flow. This patch also changes the functions for doing name lookups and encapsulates all functionality in a single class. The final change is that, by requiring working resolver at all times, we can change the 'return None' into an exception and thus we don't have to check manually each time; only some special cases will check (ganeti-daemon and ganeti-watcher which are not covered by the generalized exception handling in cli.py). The code is cleaner this way. Reviewed-by: imsnah
-
Iustin Pop authored
The EXIT_NODESETUP_ERROR is a useful constant and ganeti-watcher could use it too. This patch moves it to constants.py and modifed the ganeti-master script to use it from there. Reviewed-by: imsnah
-
Iustin Pop authored
Unless we use __slots__ on all parents, we don't get the benefits that __slots__ bring. This patch adds this attribute to the TaggableObject so that Instances, Nodes and the Clusters behave as intended. Reviewed-by: schreiberal,imsnah
-
- Sep 19, 2007
-
-
Iustin Pop authored
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: root@xen-test1-4:~# gnt-instance remove tsetest1 This will remove the volumes of the instance tsetest1 (including mirrors), thus removing all the data of the instance. Continue? y/[n]/?: ? y - Perform the operation n - Do not perform the operation This will remove the volumes of the instance tsetest1 (including mirrors), thus removing all the data of the instance. Continue? y/[n]/?: y The patch also removed the _ask_user member of the opts argument, since external code was using it (and thus it makes no sense for it to be a private member); now gnt-* scripts are using the AskUser function directly. Reviewed-by: ultrotter
-
Iustin Pop authored
This patch allows 'gnt-instance add' to not start the newly-created instance. It also allow 'gnt-instance add' and 'gnt-backup import' to not check for IP conflicts (only when not starting the instance). Reviewed-by: ultrotter
-
Iustin Pop authored
The current result of utils.LookupHostname() is a dict, but this does not allow static checkers to check the correctness of the code. This patch introduces a new class names HostInfo and changes LookupHostname to return an instance of this class; this allows better checking of the code (and also the code is cleaner). Reviewed-by: ultrotter
-