- Sep 19, 2007
-
-
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
-
- Sep 18, 2007
-
-
Iustin Pop authored
This patch adds a new OpCode (and corresponding LU) that implements the cluster rename functionality. This is done by shutting down the master role, making the needed sstore modifications and distributing the changed files to all nodes, and then re-enabling the master role. The modification to the man page of gnt-cluster also moves the section on gnt-cluster destroy in order to correct alphabetical ordering. Reviewed-by: imsnah
-
- Sep 17, 2007
-
-
Alexander Schreiber authored
Reviewed-by: iustinp, imsnah
-
Iustin Pop authored
This uses the recently-added Instance.FindDisk() method instead of hard coded find-disk code. It also renames one parameter to AddNode from ssh to sshkey in order not to shadow the ganeti.ssh module. Reviewed-by: imsnah
-
Iustin Pop authored
This patch adds support for instance rename operation at all remaining layers: RPC, OpCode/LU and CLI. Reviewed-by: imsnah
-
Alexander Schreiber authored
To be used to replace the currently fping(8) based reachability test. Reviewed-by: imsnah
-
Iustin Pop authored
This patch adds support for renaming at OS level. Because of this, we need to bump up the version of the OS api from 4 to 5. The patch also documents the new script interface in the ganeti-os-interface(7) man page and adds a section on upgrading the OS definitions to the new version. Reviewed-by: imsnah
-
Iustin Pop authored
This patch adds support for renaming instances to the ConfigWriter class. It's needed in here in order to guarantee that we don't lose the instance during the rename (the instance will be there, either with the old name or with the new name). Reviewed-by: imsnah
-
- Sep 14, 2007
-
-
Iustin Pop authored
Change this to have the exact same parameters as OpQueryInstances. Also fix burnin which is broken since r146. Reviewed-by: imsnah
-
Iustin Pop authored
As per the changes to LUQueryNodes, the QueryInstances LU is modified to accept a list of instances for which to compute and return information. Reviewed-by: imsnah
-
Iustin Pop authored
Now that LUQueryNodes supports all the functionality of LUQueryNodeData, let's migrate gnt-node.ShowNodeConfig to use it and remove all traces of OpQueryNodeData and LUQueryNodeData. Reviewed-by: imsnah
-
Iustin Pop authored
LUQueryNodes it's very similar to LUQueryNodeData, but it lacks two features: - instance list (it has count though), both primary and secondary - selective node listing In order to support these features, we change it to return raw values instead of stringified ones (like the recent change to LUQueryInstances) and to support query-ing of a restricted set of nodes. This CL also modifies the gnt-node script to conform to the new protocol and the opcode OpQueryNodes to support the new "nodes" attribute. Reviewed-by: imsnah
-
Iustin Pop authored
On closer look, all except one of the current users of _GetWantedNodes are using only the name of the nodes and throw away the other attributes. It makes sense to make this function return only the name list (as in the future this might be faster than computing all attributes). Reviewed-by: imsnah
-
- Sep 13, 2007
-
-
Iustin Pop authored
Currently, LUQueryInstances will provide strings for its results. This makes it hard for other consumers than "gnt-instance list" to use the OpQueryInstances opcode for whatever they wish to. The change moves the formatting in five of the six cases where this happens to the actual gnt-instance.ListInstances procedure and removes the unconditional convert to string in LUQueryInstances.Exec() Reviewed-by: imsnah
-
Iustin Pop authored
Explanation: since we use lists and not a string, every argument we give is passed unchanged to the remote shell. So, for example, passing '/etc/init.d/ganeti restart' to the remote shell, it will try to run the path /etc/init.d/ganeti\ restart. With the s space included. This breaks, for example, gnt-node add and gnt-cluster command. The original problem with the backup routines that led to the "'" change is that they use a plain " ".join(list), but we don't need to quote the whole ssh remote command for this. We can simply use the existing utils.ShellQuoteCmd(list) which does the proper quoting of the ';' or '&&' metacharacters. With this change, both gnt-node add, gnt-cluster command and export/import work. This also improves the error-handling behaviour of one cat command by making it conditional on the preceding mkdir. Reviewed-by: ultrotter
-
- Sep 12, 2007
-
-
Michael Hanselmann authored
- Set only LC_ALL, it overrides any other variable - Restore environment after unittest Reviewed-by: iustinp
-
Iustin Pop authored
This duplicates _GetWantedNodes to _GetWantedInstances, after doing some changes to it: - fix an indentation error that should result in only the last node name passed being chosen - change the function to have a single return statement - remove a redundant 'is not None' check Reviewed-by: imsnah
-
Iustin Pop authored
Reviewed-by: imsnah
-
- Sep 11, 2007
-
-
Iustin Pop authored
This filters out the LANG and LC_ variables from the environment of programs executed by RunCmd, in order to get consistent output of execute programs like lvs, etc. Reviewed-by: imsnah
-
Michael Hanselmann authored
- Clean generated files on “make maintainer-clean”. - Build _autoconf.py and ganeti.initd on “make all”. Reviewed-by: iustinp
-
- Sep 07, 2007
-
-
Guido Trotter authored
This avoids forgetting some parameters, as it's happening right now (the correct known host file is not being passed) In order to do so we split SSHCall into an auxiliary BuildSSHCmd which builds the command but doesn't actually call it, and SSHCall itself which runs RunCmd on top of BuildSSHCmd's result. BuildSSHCmd is then explicitely called by import/export who has to build a more complex command to be run later.
-
- Sep 05, 2007
-
-
Michael Hanselmann authored
Reviewed-by: schreiberal
-
- Sep 04, 2007
-
-
Michael Hanselmann authored
variables. The underline is there to mark it as a private module. Reviewed-by: iustinp
-
- Sep 03, 2007
-
-
Michael Hanselmann authored
- Bump version number to 1.2b2 - Add version.py file generated from version.py.in by autoconf Reviewed-by: schreiberal
-
Iustin Pop authored
This changes the implementation of RunCmd from using the popen2 module to using the (new in 2.4) subprocess module. This is helpful because the subprocess module has more advanced features than popen2, the most important ones being the ability to run code in the child process before the exec and ability to launch with modified environment. Reviewed-by: imsnah
-
- Aug 30, 2007
-
-
Iustin Pop authored
Also add some debugging output.
-
Michael Hanselmann authored
- Replace magic values by constants. Reviewed-by: iustinp
-
Iustin Pop authored
This changes a ';' to '&&' to make sure we run the create script from the correct directory. Reviewed-by: imsnah
-
Iustin Pop authored
This adds a check that the initial node's IP name doesn't resolve to a loopback address (127.x.y.z). Also remove an unused variable. Reviewed-by: imsnah
-
Iustin Pop authored
This changelist add: - documentation on how to select the kernel and initrd (if needed) for instances - support in hypervisor.py for the initrd - adds note about internet-connectivity and debootstrap requirements for the minimal etch os - documentation on the miminum xenvg size Reviewed-by: roman.marxer,ultrotter
-
- Aug 28, 2007
-
-
Iustin Pop authored
This changes the cluster init and node join to refuse a node that has a different hostname than what the resolver returns. Reviewed-by: imsnah
-
Iustin Pop authored
This fixes a compatibility problem with recent mdadm (2.x?) by reimplementing the zero-ing of the superblocks in ganeti itself. Reviewed-by: imsnah
-
- Aug 24, 2007
-
-
Iustin Pop authored
This changes: - cluster setup, we no longer edit /etc/ssh/ssh_known_hosts but our own file - node add, we no longer remove root's known_hosts (twice) - gnt-instance console, both the LU and the script: since now the ssh setup is not standard, we need to build the ssh cmdline in the LU (instead of manually building it in the script) with the correct parameters and use the command line as returned in the script - ssh.py, many changes, split options in module-level constants so that building the command line in different places is easier/more logical - backend.py, we no longer remove root's known_hosts in Add node, and we allow our own known_hosts file to be uploaded Reviewed-by: imsnah
-
- Aug 23, 2007
-
-
Iustin Pop authored
This function used a hand-coded ssh call to remote nodes. Fix it to use the ssh.SSHCall function, and in the process drop the command field from the results, as it's too verbose and we can use (in gnt-cluster) what we passed in. Reviewed-by: schreiberal
-
- Aug 22, 2007
-
-
Iustin Pop authored
_GetWantedNodes is used wrongly by the LUClusterCopyFile. This fixes that. Reviewed-by: imsnah
-
- Aug 21, 2007
-
-
Michael Hanselmann authored
Reviewed-by: iustin
-
- Aug 20, 2007
-
-
Iustin Pop authored
In case we use StrictHostKeyChecking=ask, also add HashKnownHosts=no so that debugging is easier. The nodes to which we are connecting are anyway visible in /etc/ssh/ssh_known_hosts.
-
Iustin Pop authored
Reviewed-by: imsnah
-
Iustin Pop authored
appropriate raise. Reviewed-by: imsnah
-
- Aug 17, 2007
-
-
Iustin Pop authored
Since the table generation might be useful elsewhere, let's change it to return the data instead of directly printing it. Its callers have also been updated. Reviewed-by: imsnah
-