ganeti-local
16 years agoIntegrate Leonardo's LSB init script patch
Guido Trotter [Tue, 25 Sep 2007 14:22:41 +0000 (14:22 +0000)]
Integrate Leonardo's LSB init script patch

Reviewed-By: imsnah

16 years agoRename constants for SSH init script by Iustin's request.
Michael Hanselmann [Tue, 25 Sep 2007 13:04:25 +0000 (13:04 +0000)]
Rename constants for SSH init script by Iustin's request.

Reviewed-by: iustinp

16 years agoIgnore man/*.in.
Michael Hanselmann [Tue, 25 Sep 2007 11:41:53 +0000 (11:41 +0000)]
Ignore man/*.in.

Reviewed-by: ultrotter

16 years agoAdd configure option for init.d/ssh script. This is useful for distributions
Michael Hanselmann [Tue, 25 Sep 2007 11:41:20 +0000 (11:41 +0000)]
Add configure option for init.d/ssh script. This is useful for distributions
with the script named differently than Debian.

Reviewed-by: ultrotter

16 years agoRemove mkdir from man/Makefile.am because mktemp creates the directory before.
Guido Trotter [Mon, 24 Sep 2007 15:03:14 +0000 (15:03 +0000)]
Remove mkdir from man/Makefile.am because mktemp creates the directory before.

Thanks to Christoph Rauch for reporting the problem.

Reviewed-By: iustinp

16 years agoReplace paths in ganeti-watcher.sgml.
Michael Hanselmann [Mon, 24 Sep 2007 12:03:14 +0000 (12:03 +0000)]
Replace paths in ganeti-watcher.sgml.

Reviewed-by: iustinp

16 years agoImplement to/from dict conversion for ConfigObject(s)
Iustin Pop [Mon, 24 Sep 2007 08:41:50 +0000 (08:41 +0000)]
Implement to/from dict conversion for ConfigObject(s)

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

16 years agoChange class hierarchy in objects.py
Iustin Pop [Fri, 21 Sep 2007 14:59:56 +0000 (14:59 +0000)]
Change class hierarchy in objects.py

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

16 years agoRemove requirement that host names are FQDN
Iustin Pop [Fri, 21 Sep 2007 13:37:49 +0000 (13:37 +0000)]
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 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

16 years agoMove a constant from ganeti-master to constants.py
Iustin Pop [Fri, 21 Sep 2007 13:36:50 +0000 (13:36 +0000)]
Move a constant from ganeti-master to constants.py

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

16 years agoFix tools/burnin w.r.t. OpCreateInstance.ip_check
Iustin Pop [Fri, 21 Sep 2007 12:25:30 +0000 (12:25 +0000)]
Fix tools/burnin w.r.t. OpCreateInstance.ip_check

Since we added a new, required parameter to OpCreateInstance, we need to
update burnin to build the correct opcode.

Reviewed-by: schreiberal

16 years agoAdd __slots__ on TaggableObject
Iustin Pop [Fri, 21 Sep 2007 12:23:57 +0000 (12:23 +0000)]
Add __slots__ on TaggableObject

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

16 years agoAsk for confirmation when touching multiple instances
Iustin Pop [Thu, 20 Sep 2007 07:26:20 +0000 (07:26 +0000)]
Ask for confirmation when touching multiple instances

This patch makes the new startup/shutdown multi-instance operations to
ask for confirmation when touching more than one instance (and unless
--force-multi is given).

The code is not very short, but it does present a nice (IMO) user
interface.

Reviewed-by: ultrotter

16 years agoImprove the cli.AskUser() function
Iustin Pop [Wed, 19 Sep 2007 14:24:52 +0000 (14:24 +0000)]
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:
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

16 years agoAllow 'add instance' to not start the new instance
Iustin Pop [Wed, 19 Sep 2007 13:52:34 +0000 (13:52 +0000)]
Allow 'add instance' to not start the new instance

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

16 years agoChange resolved hostname from dict to a class
Iustin Pop [Wed, 19 Sep 2007 06:56:49 +0000 (06:56 +0000)]
Change resolved hostname from dict to a class

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

16 years agoImplement cluster rename operation
Iustin Pop [Tue, 18 Sep 2007 12:42:31 +0000 (12:42 +0000)]
Implement cluster rename operation

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

16 years agoFix a docstring
Guido Trotter [Tue, 18 Sep 2007 08:06:27 +0000 (08:06 +0000)]
Fix a docstring

Reviewed-by: iustinp

16 years agoCleanup up selective imports for utils and utils unit test.
Alexander Schreiber [Mon, 17 Sep 2007 14:04:13 +0000 (14:04 +0000)]
Cleanup up selective imports for utils and utils unit test.

Reviewed-by: iustinp, imsnah

16 years agoA few minor fixes in backend.py
Iustin Pop [Mon, 17 Sep 2007 11:53:53 +0000 (11:53 +0000)]
A few minor fixes in backend.py

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

16 years agoImplement instance rename operation
Iustin Pop [Mon, 17 Sep 2007 11:52:38 +0000 (11:52 +0000)]
Implement instance rename operation

This patch adds support for instance rename operation at all remaining
layers: RPC, OpCode/LU and CLI.

Reviewed-by: imsnah

16 years agoAdded TcpPing to do ping-alike via TCP connect(2) with defined source address.
Alexander Schreiber [Mon, 17 Sep 2007 11:18:49 +0000 (11:18 +0000)]
Added TcpPing to do ping-alike via TCP connect(2) with defined source address.
To be used to replace the currently fping(8) based reachability test.

Reviewed-by: imsnah

16 years agoAdd support for rename operation in the OS API
Iustin Pop [Mon, 17 Sep 2007 10:52:33 +0000 (10:52 +0000)]
Add support for rename operation in the OS API

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

16 years agoAllow start/stop of multiple instances at once
Iustin Pop [Mon, 17 Sep 2007 09:12:45 +0000 (09:12 +0000)]
Allow start/stop of multiple instances at once

This is an initial version of the multi-instance start/stop, which
allows the gnt-instance startup and shutdown subcommands to work on
multiple instances at once.

The available selections are:
  - "gnt-instance startup --instance name..." which is the default, and
    if passed only one argument it behaves like the original command)
  - "gnt-instance startup --node name..." will work on all instances
    having either primary or secondary one of the passed names
  - "gnt-instance startup --primary name..." will work on all instances
    having primary node one of the passed names
  - "gnt-instance startup --secondary name..." will work on all
    instances having as secondary node one of the passed names
  - "gnt-instance startup --all" will work on all instances

This allows a simple cluster-wide shutdown or node shutdown (or
startup).

Note that this version stops at the first error - it will not try to
start the 2nd instance selected if there is a critical error with the
1st one.

Also note that this version is not faster than simply running manually
"gnt-instance shutdown NAME", because it doesn't parallelize the
shutdown/startup actions.

Reviewed-by: imsnah,roman.marxer

16 years agoAdd rename instance support to ConfigWriter
Iustin Pop [Mon, 17 Sep 2007 09:10:02 +0000 (09:10 +0000)]
Add rename instance support to ConfigWriter

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

16 years agoDocumentation fix for missing dependencies
Iustin Pop [Sat, 15 Sep 2007 09:11:53 +0000 (09:11 +0000)]
Documentation fix for missing dependencies

I was getting into trouble with gnt-backup and discovered reading the
code of the debian-etch os image and the error logs that:
     1 - Debian os image shipped by ganeti depends on the availability
of dump and restore.

Based on that I had included in the section of "Installing the
Operating System support packages" the dependency of dump/restore and
the command to install dump/restore.

Author: Leonardo Rodrigues de Mello <l@lmello.eu.org>
Reviewed-by: iustinp

16 years agoChange OpQueryNodes nodes attribute to names
Iustin Pop [Fri, 14 Sep 2007 09:54:47 +0000 (09:54 +0000)]
Change OpQueryNodes nodes attribute to names

Change this to have the exact same parameters as OpQueryInstances.

Also fix burnin which is broken since r146.

Reviewed-by: imsnah

16 years agoEnable LUQueryInstances to work with a given list of instances
Iustin Pop [Fri, 14 Sep 2007 09:54:22 +0000 (09:54 +0000)]
Enable LUQueryInstances to work with a given list of instances

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

16 years agoRemove OpQueryNodeData and LUQueryNodeData
Iustin Pop [Fri, 14 Sep 2007 09:03:12 +0000 (09:03 +0000)]
Remove OpQueryNodeData and LUQueryNodeData

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

16 years agoChange LUQueryNodes to return raw values and support selective listing
Iustin Pop [Fri, 14 Sep 2007 09:02:56 +0000 (09:02 +0000)]
Change LUQueryNodes to return raw values and support selective listing

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

16 years agoChange _GetWanted* to return names instead of objects
Iustin Pop [Fri, 14 Sep 2007 09:02:33 +0000 (09:02 +0000)]
Change _GetWanted* to return names instead of objects

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

16 years agoSplit QA script into different modules.
Michael Hanselmann [Thu, 13 Sep 2007 12:46:25 +0000 (12:46 +0000)]
Split QA script into different modules.

Reviewed-by: iustinp

16 years agoMove string formatting out of LUQueryInstances
Iustin Pop [Thu, 13 Sep 2007 11:49:29 +0000 (11:49 +0000)]
Move string formatting out of LUQueryInstances

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

16 years agoFix the ssh change which breaks remote ssh commands
Iustin Pop [Thu, 13 Sep 2007 11:31:06 +0000 (11:31 +0000)]
Fix the ssh change which breaks remote ssh commands

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

16 years agoComplete rename of testing/ to test/.
Michael Hanselmann [Wed, 12 Sep 2007 17:46:47 +0000 (17:46 +0000)]
Complete rename of testing/ to test/.

Reviewed-by: iustin

16 years agoFix typo in last commit.
Michael Hanselmann [Wed, 12 Sep 2007 15:54:10 +0000 (15:54 +0000)]
Fix typo in last commit.

16 years agoRename testing/ to test/.
Michael Hanselmann [Wed, 12 Sep 2007 15:51:34 +0000 (15:51 +0000)]
Rename testing/ to test/.

16 years agoClean *.py[co] in testing/.
Michael Hanselmann [Wed, 12 Sep 2007 15:17:10 +0000 (15:17 +0000)]
Clean *.py[co] in testing/.

Reviewed-by: iustin

16 years agoMove QA script from testing/ to qa/.
Michael Hanselmann [Wed, 12 Sep 2007 15:12:27 +0000 (15:12 +0000)]
Move QA script from testing/ to qa/.

Reviewed-by: iustin

16 years agoChange the way how locales are overridden:
Michael Hanselmann [Wed, 12 Sep 2007 12:02:56 +0000 (12:02 +0000)]
Change the way how locales are overridden:
- Set only LC_ALL, it overrides any other variable
- Restore environment after unittest

Reviewed-by: iustinp

16 years agoClone cmdlib._GetWantedNodes into _GetWantedInstances
Iustin Pop [Wed, 12 Sep 2007 11:58:29 +0000 (11:58 +0000)]
Clone cmdlib._GetWantedNodes into _GetWantedInstances

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

16 years agoFix docstrings of many opcodes
Iustin Pop [Wed, 12 Sep 2007 10:32:24 +0000 (10:32 +0000)]
Fix docstrings of many opcodes

Reviewed-by: imsnah

16 years agoFilters out LANG and LC_* on RunCmd
Iustin Pop [Tue, 11 Sep 2007 12:18:05 +0000 (12:18 +0000)]
Filters out LANG and LC_* on RunCmd

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

16 years ago- Don't build .tar.bz2, we only distribute .tar.gz anyway.
Michael Hanselmann [Tue, 11 Sep 2007 08:45:54 +0000 (08:45 +0000)]
- Don't build .tar.bz2, we only distribute .tar.gz anyway.
- Clean generated files on “make maintainer-clean”.
- Build _autoconf.py and ganeti.initd on “make all”.

Reviewed-by: iustinp

16 years agoMake import/export use the auxiliary ssh library to build the remote commands.
Guido Trotter [Fri, 7 Sep 2007 11:30:50 +0000 (11:30 +0000)]
Make import/export use the auxiliary ssh library to build the remote commands.

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.

16 years agoFix two errors in man page
Guido Trotter [Fri, 7 Sep 2007 08:09:19 +0000 (08:09 +0000)]
Fix two errors in man page

16 years agoAdd function to get all local IP addresses, will be used in cmdlib.py.
Michael Hanselmann [Wed, 5 Sep 2007 17:14:52 +0000 (17:14 +0000)]
Add function to get all local IP addresses, will be used in cmdlib.py.

Reviewed-by: schreiberal

16 years agoUse configure's paths in the init script example.
Michael Hanselmann [Tue, 4 Sep 2007 15:27:01 +0000 (15:27 +0000)]
Use configure's paths in the init script example.

Reviewed-by: schreiberal

16 years agoNow that we use configure's variables, add --sysconfdir to configure.
Michael Hanselmann [Tue, 4 Sep 2007 13:10:14 +0000 (13:10 +0000)]
Now that we use configure's variables, add --sysconfdir to configure.

Reviewed-by: ultrotter

16 years agoUse _autoconf.py instead of version.py, generated by Makefile with more
Michael Hanselmann [Tue, 4 Sep 2007 11:32:31 +0000 (11:32 +0000)]
Use _autoconf.py instead of version.py, generated by Makefile with more
variables. The underline is there to mark it as a private module.

Reviewed-by: iustinp

16 years agoCombine rules for manpages.
Michael Hanselmann [Tue, 4 Sep 2007 07:35:55 +0000 (07:35 +0000)]
Combine rules for manpages.

Reviewed-by: iustinp

16 years agoUse DESTDIR when creating additional directories.
Michael Hanselmann [Tue, 4 Sep 2007 07:35:12 +0000 (07:35 +0000)]
Use DESTDIR when creating additional directories.

Reviewed-by: iustinp

16 years ago- Generic automake cleanup
Michael Hanselmann [Mon, 3 Sep 2007 14:42:08 +0000 (14:42 +0000)]
- Generic automake cleanup
- Bump version number to 1.2b2
- Add version.py file generated from version.py.in by autoconf

Reviewed-by: schreiberal

16 years ago- Add Makefile in doc/examples/
Michael Hanselmann [Mon, 3 Sep 2007 13:28:54 +0000 (13:28 +0000)]
- Add Makefile in doc/examples/

16 years ago- Rename docs/ to doc/
Michael Hanselmann [Mon, 3 Sep 2007 13:23:20 +0000 (13:23 +0000)]
- Rename docs/ to doc/
- Add Makefile in doc/examples/

Reviewed-by: schreiberal

16 years agoSwitch utils.RunCmd from popen2 to subprocess
Iustin Pop [Mon, 3 Sep 2007 11:22:22 +0000 (11:22 +0000)]
Switch utils.RunCmd from popen2 to subprocess

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

16 years agoAdd a small unittext extension for utils.RunCmd
Iustin Pop [Mon, 3 Sep 2007 08:04:24 +0000 (08:04 +0000)]
Add a small unittext extension for utils.RunCmd

Reviewed-by: imsnah

16 years agoTest “gnt-node volumes”.
Michael Hanselmann [Fri, 31 Aug 2007 15:36:47 +0000 (15:36 +0000)]
Test “gnt-node volumes”.

Reviewed-by: iustinp

16 years agoAdd note about Debian default dbrd.conf
Iustin Pop [Fri, 31 Aug 2007 09:12:26 +0000 (09:12 +0000)]
Add note about Debian default dbrd.conf

Debian's default drbd configuration has some enabled directives, which make the
init script throw errors. Document how to disable the defaults and thus get rid
of the errors.

Reviewed-by: imsnah

16 years agoBump up version to beta1 v1.2b1
Iustin Pop [Thu, 30 Aug 2007 18:33:00 +0000 (18:33 +0000)]
Bump up version to beta1

16 years agoFix capitalization.
Michael Hanselmann [Thu, 30 Aug 2007 18:27:05 +0000 (18:27 +0000)]
Fix capitalization.

Reviewed-by: iustinp

16 years agoFix some spelling mistakes
Iustin Pop [Thu, 30 Aug 2007 18:19:24 +0000 (18:19 +0000)]
Fix some spelling mistakes

16 years agoAdd note about lvm.conf tuning
Iustin Pop [Thu, 30 Aug 2007 18:10:34 +0000 (18:10 +0000)]
Add note about lvm.conf tuning

Reviewed-by: imsnah

16 years agoPass --os-size and --swap-size to burnin during QA.
Michael Hanselmann [Thu, 30 Aug 2007 17:49:38 +0000 (17:49 +0000)]
Pass --os-size and --swap-size to burnin during QA.

Reviewed-by: iustinp

16 years agoFix the path in the example cron file
Iustin Pop [Thu, 30 Aug 2007 17:27:12 +0000 (17:27 +0000)]
Fix the path in the example cron file

Reviewed-by: imsnah

16 years agoFix a typo in install.sgml
Guido Trotter [Thu, 30 Aug 2007 16:50:20 +0000 (16:50 +0000)]
Fix a typo in install.sgml

Reviewed-By: iustinp

16 years agoAdd information about the recommended Xen settings
Iustin Pop [Thu, 30 Aug 2007 16:37:21 +0000 (16:37 +0000)]
Add information about the recommended Xen settings

Reviewed-by: imsnah

16 years agoFix mdadm -D output compatibility issues.
Iustin Pop [Thu, 30 Aug 2007 16:16:32 +0000 (16:16 +0000)]
Fix mdadm -D output compatibility issues.

Also add some debugging output.

16 years ago- Check for secondary node before doing a failover.
Michael Hanselmann [Thu, 30 Aug 2007 15:36:10 +0000 (15:36 +0000)]
- Check for secondary node before doing a failover.
- Replace magic values by constants.

Reviewed-by: iustinp

16 years agoAdd a safety check to the backend.AddOSToInstance
Iustin Pop [Thu, 30 Aug 2007 14:32:20 +0000 (14:32 +0000)]
Add a safety check to the backend.AddOSToInstance

This changes a ';' to '&&' to make sure we run the create script from
the correct directory.

Reviewed-by: imsnah

16 years agoAdd one more check on cluster init.
Iustin Pop [Thu, 30 Aug 2007 14:30:38 +0000 (14:30 +0000)]
Add one more check on cluster init.

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

16 years agoMore updates to the installation tutorial.
Iustin Pop [Thu, 30 Aug 2007 14:21:59 +0000 (14:21 +0000)]
More updates to the installation tutorial.

Changes:
  - add note about installing the cron job
  - add an example cron job file and modify top-level Makefile.am to put
    it into the archive
  - modify the tutorial with information about setting a reasonable
    number of minors for DRBD
  - add note about installing on 32-bit the xen libc

Reviewed-by: imsnah

16 years agoAdd note about manually loading the drbd module
Iustin Pop [Thu, 30 Aug 2007 12:53:48 +0000 (12:53 +0000)]
Add note about manually loading the drbd module

16 years agoAdd note about running the Xen kernel before compiling DRBD
Iustin Pop [Thu, 30 Aug 2007 12:52:23 +0000 (12:52 +0000)]
Add note about running the Xen kernel before compiling DRBD

16 years agoAdd mdadm to the debian example
Iustin Pop [Thu, 30 Aug 2007 12:30:39 +0000 (12:30 +0000)]
Add mdadm to the debian example

Reviewed-by: roman.marxer

16 years agoAdd more details about hostname issues
Iustin Pop [Thu, 30 Aug 2007 12:14:15 +0000 (12:14 +0000)]
Add more details about hostname issues

16 years agoFix the manpage gnt-instance w.r.t. units
Iustin Pop [Thu, 30 Aug 2007 10:29:03 +0000 (10:29 +0000)]
Fix the manpage gnt-instance w.r.t. units

The manpage wrongly states that the default unit for disk sizes is
gibibytes, whereas currently it's mebibytes. Fix that and also update
the '--help' output to display the default unit.

Reviewed-by: roman.marxer

16 years agoDocument kernel selection method
Iustin Pop [Thu, 30 Aug 2007 09:35:39 +0000 (09:35 +0000)]
Document kernel selection method

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

16 years agoNew version of install.sgml
Iustin Pop [Wed, 29 Aug 2007 14:34:58 +0000 (14:34 +0000)]
New version of install.sgml

This adds more examples and clarifies the existing ones.

Reviewed-by: roman.marxer

16 years agoRefuse nodes with non-FQDN hostnames.
Iustin Pop [Tue, 28 Aug 2007 12:25:29 +0000 (12:25 +0000)]
Refuse nodes with non-FQDN hostnames.

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

16 years agoDocbook-relate changes on admin.sgml
Iustin Pop [Tue, 28 Aug 2007 11:35:22 +0000 (11:35 +0000)]
Docbook-relate changes on admin.sgml

This changes a lot of docbook-related stuff and addresses a few consistency
issues.

Reviewed-by: vylavera

16 years agoCleanup of the installation tutorial.
Iustin Pop [Tue, 28 Aug 2007 08:54:04 +0000 (08:54 +0000)]
Cleanup of the installation tutorial.

This fixes some consistency issues.

Reviewed-by: vylavera

16 years agoFix compatibility problems with mdadm-2.5.6
Iustin Pop [Tue, 28 Aug 2007 08:50:02 +0000 (08:50 +0000)]
Fix compatibility problems with mdadm-2.5.6

This fixes a compatibility problem with recent mdadm (2.x?) by
reimplementing the zero-ing of the superblocks in ganeti itself.

Reviewed-by: imsnah

16 years agoChanged INSTALL to point to the tutorial and admin guide.
Iustin Pop [Mon, 27 Aug 2007 09:20:54 +0000 (09:20 +0000)]
Changed INSTALL to point to the tutorial and admin guide.

16 years agoImplement argument for known_hosts file.
Michael Hanselmann [Fri, 24 Aug 2007 12:29:54 +0000 (12:29 +0000)]
Implement argument for known_hosts file.

Reviewed-by: iustinp

16 years agoSet SSH's ClearAllForwardings and ForwardAgent options.
Michael Hanselmann [Fri, 24 Aug 2007 11:38:31 +0000 (11:38 +0000)]
Set SSH's ClearAllForwardings and ForwardAgent options.

Reviewed-by: iustinp

16 years ago- Test “gnt-cluster copyfile”
Michael Hanselmann [Fri, 24 Aug 2007 10:23:50 +0000 (10:23 +0000)]
- Test “gnt-cluster copyfile”
- Run “gnt-cluster verify” and “gnt-cluster info” after adding all nodes
- Remove unused --cleanup option
- Remove --verbose option and always print executed SSH commands

Reviewed-by: iustinp

16 years agoRework ssh known-hosts handling.
Iustin Pop [Fri, 24 Aug 2007 09:20:37 +0000 (09:20 +0000)]
Rework ssh known-hosts handling.

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

16 years agoImprove LURunClusterCommand
Iustin Pop [Thu, 23 Aug 2007 13:59:11 +0000 (13:59 +0000)]
Improve LURunClusterCommand

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

16 years agoFix one wrong usage of _GetWantedNodes
Iustin Pop [Wed, 22 Aug 2007 15:53:06 +0000 (15:53 +0000)]
Fix one wrong usage of _GetWantedNodes

_GetWantedNodes is used wrongly by the LUClusterCopyFile. This fixes that.

Reviewed-by: imsnah

16 years agoFix typo.
Michael Hanselmann [Tue, 21 Aug 2007 14:35:59 +0000 (14:35 +0000)]
Fix typo.

Reviewed-by: iustin

16 years agoRename installing.sgml to install.sgml
Iustin Pop [Tue, 21 Aug 2007 08:39:52 +0000 (08:39 +0000)]
Rename installing.sgml to install.sgml

This is more in line with the other document names.

Also, change the title to simply "Ganeti installation tutorial".

Reviewed-by: ultrotter

16 years agoAdd information about installing from source.
Iustin Pop [Mon, 20 Aug 2007 14:43:34 +0000 (14:43 +0000)]
Add information about installing from source.

In case one installs from source, make, tar and gzip are also needed. tar and
gzip are almost always installed, but make not, so let's add a note about that.

Also remove a '>' in the apt-get install example so copy-paste works.

Reviewed-by: imsnah

16 years agoDisable hashing of the ssh keys.
Iustin Pop [Mon, 20 Aug 2007 13:27:45 +0000 (13:27 +0000)]
Disable hashing of the ssh keys.

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.

16 years agoAdd support for listing instance disk sizes.
Iustin Pop [Mon, 20 Aug 2007 12:17:50 +0000 (12:17 +0000)]
Add support for listing instance disk sizes.

Reviewed-by: imsnah

16 years agoA CheckPrereq method had one unconverted "return 1" statement. Change it to the
Iustin Pop [Mon, 20 Aug 2007 11:29:11 +0000 (11:29 +0000)]
A CheckPrereq method had one unconverted "return 1" statement. Change it to the
appropriate raise.

Reviewed-by: imsnah

16 years agoAdd ganeti-master to sbin_SCRIPTS
Iustin Pop [Mon, 20 Aug 2007 08:21:08 +0000 (08:21 +0000)]
Add ganeti-master to sbin_SCRIPTS

This was forgotten when the init script was changed.

Reviewed-by: imsnah

16 years agoChange cli.OutputTable to cli.GenerateTable
Iustin Pop [Fri, 17 Aug 2007 09:14:44 +0000 (09:14 +0000)]
Change cli.OutputTable to cli.GenerateTable

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

16 years agoAnother documentation update.
Iustin Pop [Thu, 16 Aug 2007 15:23:19 +0000 (15:23 +0000)]
Another documentation update.

This removes the section on packages from installing.sgml (until we have
packages) and adds/corrects informations about using the startup script.

It also adds notes about the ``--master-netdev`` option, which one needs
to use if the node doesn't have an interface named xen-br0 (or if it's
not the interface wanted for external access).

16 years agoSome small fixes.
Iustin Pop [Thu, 16 Aug 2007 15:13:03 +0000 (15:13 +0000)]
Some small fixes.

It fixes the main Makefile.am to create $localstatedir/{lib,log}/ganeti.
It fixes the testing Makefile.am after the rename fake_config.py ->
mocks.py.  It strips the output of "ip link show" to have a nicer output
if the master netdev does not exist.