Statistics
| Branch: | Tag: | Revision:

root @ c8a0948f

# Date Author Comment
c8a0948f 11/09/2007 04:54 pm Michael Hanselmann

Use new functions to modify /etc/hosts.

Reviewed-by: schreiberal

899d2a81 11/09/2007 04:53 pm Michael Hanselmann

Add functions to modify /etc/hosts.

Reviewed-by: schreiberal

59f82e3f 11/09/2007 04:52 pm Michael Hanselmann

Cleanup temporary file in RemoveAuthorizedKey.

Reviewed-by: schreiberal

084bf7b2 11/09/2007 03:03 pm Michael Hanselmann

Fix usage of wrong variable in doc/examples/Makefile.am.

This makes “make distcheck” work again.

Reviewed-by: schreiberal

21546b1c 11/08/2007 09:04 pm Iustin Pop

Simplify burnin output

Currently, the burnin output is very verbose (we log the entire output
from LU feedback) and duplicate in some cases (as we enable debugging).

This patch disables debugging and only logs the burnin output when an
error occurs.

Reviewed-by: imsnah

5bfac263 11/08/2007 09:04 pm Iustin Pop

Changes related to logging

This patch modifes:
- mcpu.Processor.LogWarning to have its 'hint' parameter as optional
and only log it if not None
- cmdlib._WaitForSync to not log directly to stdout/stderr but via the
proc.Log(Info|Warning) methods...

175f44c2 11/08/2007 09:02 pm Iustin Pop

Refactor burnin to improve disk replacement

This patch changes the burnin:
- split the code into functions
- add replace2 (replace the secondary) for remote_raid1
- add replace1/2 for drbd8

Reviewed-by: imsnah

e42b5307 11/08/2007 01:51 pm Michael Hanselmann

Insert hook calls.

Reviewed-by: schreiberal

663ed0ce 11/08/2007 01:51 pm Michael Hanselmann

Implement sample hook.

Reviewed-by: schreiberal

1672a0d1 11/08/2007 01:50 pm Michael Hanselmann

Implement hooks infrastructure.

Reviewed-by: schreiberal

0834c866 11/07/2007 05:53 pm Iustin Pop

Enhance secondary node replace for drbd8

This (big) patch does two things:
- add "local disk status" to the block device checks
(BlockDevice.GetSyncStatus and the rpc calls that call this
function, and therefore cmdlib._CheckDiskConsistency)
- improve the drbd8 secondary replace operation using the above...

e3c826ec 11/07/2007 04:33 pm Michael Hanselmann

Indentation fixes for docs.

Reviewed-by: schreiberal

4677a909 11/07/2007 02:39 pm Michael Hanselmann

Update docs for the removed --secondary-node option.

Reviewed-by: ultrotter

7dd30006 11/07/2007 01:48 pm Michael Hanselmann

Check whether init.d script is executable.

Reviewed-by: schreiberal

113b8d89 11/06/2007 07:04 pm Michael Hanselmann

Adapt QA tests for removed --secondary-node option.

60d49723 11/06/2007 07:04 pm Michael Hanselmann

Remove --secondary-node option.

Replace --secondary-node option with an optional parameter for --node.

cff90b79 11/06/2007 07:01 pm Iustin Pop

Enhance DBRD8 disk replacement (same nodes)

This patch adds enhanced reporting and much more checks to the disk
replacement (when not switching the secondary).

Reviewed-by: imsnah

9db6dbce 11/06/2007 07:01 pm Iustin Pop

Implement degraded status for logical volumes

Logical volumes can be 'degraded' in a similar way to mirrored devices,
when their underlying storage has gone away (i.e. after a physical disk
failure and 'vgreduce --removemissing'). If we can detect this, we can...

0fbbf897 11/06/2007 07:01 pm Iustin Pop

Add better error logging functions for LUs

Currently, some LUs use logger.Error, others just feedback_fn, etc. This
patch adds three functions to mcpu.Processor than can be used to log
messages to both the log and to the user.

These function will be used to enhance the output of replace-disks for...

03ece5f3 11/06/2007 07:01 pm Iustin Pop

Enhance mirror operations for DRBD8

Currently, the mirror operations (add and remove children) test against
the instance's attributes. This patch changes the check tests to work
against the actual status of the device (i.e. live data) which is more
realistic....

fc1dc9d7 11/06/2007 07:00 pm Iustin Pop

Allow DRBD8 operation without backing storage

This patch adds the following functionality:
- DRBD8 devices can assemble without local storage (done by allowing
None in the list of children, and making DRBD8 to ignore all
children if any is None)...

583e3f6f 11/06/2007 07:00 pm Iustin Pop

Make DRBD8 disks show 'degraded' status if diskless

This patch enables the bdev.DRBD8 class report a degraded status if the
local disk is missing. This allows `gnt-instance info` to report the
actual situation in this case.

Note that DRBD7 should also behave like this, however the diskless case...

e739bd57 11/06/2007 07:00 pm Iustin Pop

Change the way remove children is called in bdev

For some cases, we don't have to have access to the children of a device
in order to remove them (e.g. md over lvs, or drbd over lvs). In order
to ease the removal process, skip over finding the child if it provides...

222f2dd5 11/06/2007 06:55 pm Iustin Pop

Add a support function to objects.Disk

This patch adds a function returning the device path if it is computable
from the disk object (and we don't need to instantiate a bdev object on
the target node in order to compute this). Only LVs support this.

Reviewed-by: imsnah

e2e521d0 11/05/2007 11:22 pm Iustin Pop

Small cleanup for error formatting

Reviewed-by: ultrotter

c7b46d59 11/05/2007 07:59 pm Iustin Pop

Handle missing init script at cluster init

This patch adds a check in the prereq of LUInitCluster for the existence
of the init script. This allows a clean abort instead of a stack dump.

Based on a report by

Reviewed-by: ultrotter

cf5a8306 11/05/2007 05:08 pm Iustin Pop

Fix a unhandled error case in device creation

The block device creation process is the following:
- device create
- device assembly (on primary or depending on dev_type, on secondary
too)
- set sync speed
- return

The problem is that device assembly after creation was not checked for...

65fe4693 11/05/2007 05:06 pm Iustin Pop

Miscellaneous style fixes

This patch fixes some minor pylint warnings (unused variables, wrong
indentation, etc.) and a real bug in the recovery for drbd8 rename
procedure.

Reviewed-by: imsnah

d74c2ca1 11/05/2007 02:19 pm Michael Hanselmann

Test tag functionality.

Reviewed-by: schreiberal

62843684 11/05/2007 02:18 pm Michael Hanselmann

Merge three small cluster tests into one.

Reviewed-by: schreiberal

24818e8f 11/05/2007 02:14 pm Michael Hanselmann

Rename utils.GetUUID to utils.NewUUID.

Reviewed-by: schreiberal

8ee53a06 11/05/2007 02:44 am Guido Trotter

Bump protocol version up

The OS cleanup patches change the wire protocol. Increment the protocol number
by one.

Reviewed-By: iustinp

dfa96ded 11/05/2007 02:43 am Guido Trotter

Convert os_get to use OS rather than InvalidOS

In order to do this for simplicity we leave the OSFromDisk function as-is and
we convert the eventual exception to an OS object in ganeti-noded. The
unmangling gets simplified and so does the code for checking whether the OS is...

4e679f11 11/05/2007 02:43 am Guido Trotter

Simplify diagnose mangling/unmangling functions

The functions in ganeti-noded and rpc.py still deal with the fact that an
InvalidOS error could be returned by DiagnoseOS. As this is not the case
anymore simplify their code for the current behavior.

Reviewed-By: iustinp

8fa42c7c 11/05/2007 02:43 am Guido Trotter

Make DiagnoseOS use the modified OS objects

Modify backend.py so that DiagnoseOS only returns OS objects rather than
InvalidOS errors, and make sure gnt-os understands the new objects. Also delete
the deprecated helper functions from gnt-os.

Reviewed-By: iustinp

d2c807e4 11/05/2007 02:42 am Guido Trotter

Create OS from an InvalidOS error

Add a new FromInvalidOS static function to objects.OS that makes it easy to
create an object representing a broken OS starting from the relevant exception.

Reviewed-By: iustinp

37482e7b 11/05/2007 02:42 am Guido Trotter

Make the OS object able to represent broken OSes

Till now the OS object just represents a correct OS instance. Change it so it
can represent a broken one too, by adding a "status" field: if this field is
different from the OS_VALID_STATUS constant the object is considered to be an...

519bfbae 11/05/2007 01:26 am Iustin Pop

Add option to burnin only a given set of nodes

This patch adds a '-n' option to burnin that takes a comma-separated
list of nodes to perform the burnin on.

Reviewed-by: ultrotter

00fe9e38 11/04/2007 06:10 am Guido Trotter

Make call_os_get a single node function

call_os_get is never called with a real list of nodes, so there's no point in
it being multi-node. Making it single-node till a usage for multi-node call is
found.

Reviewed-By: iustinp

74b4217d 11/04/2007 05:37 am Guido Trotter

Fix two typos in a doc string

Remove a wrong "i" and add a missing ")" to the DiagnoseOS function doc string.

Reviewed-By: iustinp

73415719 11/03/2007 08:55 am Iustin Pop

Implement tag searching

This patch adds a search command for locating tags on all objects of the
cluster using a regex pattern.

Reviewed-by: aat

830da270 11/02/2007 05:51 pm Michael Hanselmann

Test “gnt-cluster command”.

Also check whether file contents are correct for both “gnt-cluster command” and
“gnt-cluster copyfile”.

Reviewed-by: iustinp

3f78eef2 11/02/2007 03:44 pm Iustin Pop

Implement device to instance mapping cache

Currently, troubleshooting DRBD problems involves a manual process of going
backwards from the DRBD device to the instance that owns it.

This patch adds a weak (i.e. not guaranteed to be correct or up-to-date)
cache of device to instance. The cache should be, in normal operation,...

79f87a76 11/02/2007 03:43 pm Iustin Pop

Improve burnin with regard to drbd8

Allow burnin to use the new drbd8 template (for which case one needs to
disable replacement of disks, burnin does yet support that with drbd8).

The patch also changes do-replace12 to no-replace12 as that is what
they actually do....

be345db0 11/02/2007 03:43 pm Iustin Pop

Update the dev_path on LVs on rename

When renaming a logical volume, we should change the dev_path (and other
internal variables) in order to be consistent.

Reviewed-by: imsnah

25a915d0 11/02/2007 03:10 am Iustin Pop

Revision 302 is broken, this fixes it

I forgot a pair of parentheses in that revision which break the common
case. This patch adds them.

Reviewed-by: ultrotter

073ca59e 11/01/2007 11:40 pm Iustin Pop

Fix printing of unconfigured DRBD devices

If the device is unconfigured (not yet did SetDiskID for it ever), it
might have a physical_id of None. This patch fixes that case.

Reviewed-by: ultrotter

d06565e0 11/01/2007 07:51 pm Guido Trotter

Remove two trailing whitespaces

Ok, I've been battling with those for a while but it seems
in the end I forgot to get rid of them! :( Doing it explicitely now.

Reviewed-By: iustinp

2527691a 11/01/2007 07:48 pm Guido Trotter

Move blank lines inside function messages

This patch changes whitespace only. It fixes all the functions in script/gnt-os
by putting a white line at the end of all the function descriptions and
removing it from just before the code.

Reviewed-By: iustinp

dd96409a 11/01/2007 07:48 pm Guido Trotter

Add empty line after each diagnose OS-Node set

Reviewed-By: imsnah

107b0ccb 11/01/2007 07:46 pm Guido Trotter

Modify the displayed format for gnt-os diagnose

Get rid of the tabulated form and create a simplier indented structure.
Now a valid OS looks something like:

OS: foo [global status: partial valid]
Node: gsdtest4.euw.corp.google.com, status: valid (path: /usr/local/lib/ganeti/os/foo)...

48f85f75 11/01/2007 07:44 pm Guido Trotter

Change the way to compute the first os status message

Use both _DiagnoseOSStatus and _DiagnoseOSPath to calculate the message
associated with the first entry found on a node for an OS. Also call the rename
the relevant variables to _msg rather than just _status to reflect that they...

5efc50fc 11/01/2007 07:44 pm Guido Trotter

Separate OS status and path

Make _DiagnoseOSStatus only return a status message for the OS diagnose object
and create a new _DiagnoseOSPath function to get the path out. This will let us
be more flexible in the messages we display to the user.

Reviewed-By: imsnah

5d0fe286 11/01/2007 07:22 pm Iustin Pop

Whitespace fixes

Reviewed-by: ultrotter

dfe11bad 11/01/2007 04:31 pm Michael Hanselmann

Cleanup colouring functions.

Make the code somewhat smaller. Disable disk failure test for master for now.

Reviewed-by: schreiberal

b1ffe1eb 11/01/2007 03:54 pm Michael Hanselmann

Cleanup QA scripts.

- Split main() function into several small ones.
- Current work on disk failure tests. This is not yet finished.
- Fix small typo in qa_node.py.

Reviewed-by: schreiberal

80de0e3f 10/31/2007 10:12 pm Iustin Pop

Revert "Implement multi-failover options"

This reverts commit 289, as the node failover functionality was already
implemented in gnt-node (as opposed to gnt-instance). My mistake.

Reviewed-by: ultrotter

22d31e49 10/31/2007 05:19 pm Michael Hanselmann

Fix usage of OpReplaceDisks.

Reviewed-by: iustinp

bcee9cb4 10/31/2007 04:57 pm Iustin Pop

Small improvements to multi-instance selections

This patch fixes the documentation in a few cases and adds handling of
the situation where no instance is selected due to too restrictive
options given.

Reviewed-by: imsnah

36c87212 10/31/2007 04:56 pm Iustin Pop

Implement multi-failover options

This patch adds the same style of multi-instance selection as in
shutdown/startup to the failover subcommand, with the exception that we
cannot failover with --node or --all (it doesn't make sense).

Reviewed-by: imsnah

24a40d57 10/31/2007 04:56 pm Iustin Pop

More sane handling of errors during failover

Currently we ignore errors on instance shutdown (on the source node)
during instance failover. We should do this only if the user gave a
command line options allowing this, as it's a dangerous thing to do.

This patch fixes this by using the same "--ignore-consistency" option...

50ff9a7a 10/31/2007 04:55 pm Iustin Pop

Fix bridge checking in instance failover

The current code checks the bridge on the primary node of the instance,
but we need to check it on the destination node.

This was caught by testing failover with a down primary node.

Reviewed-by: imsnah

4cc2a728 10/30/2007 05:09 pm Michael Hanselmann

Fix _UpdateEtcHosts to understand empty lines.

Reviewed-by: schreiberal

1a8c0ce1 10/29/2007 10:09 pm Iustin Pop

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.

Reviewed-by: imsnah

ce838ee3 10/29/2007 07:05 pm Iustin Pop

Remove a redundant assignment

The major is declared in the base class, we do not need to overwrite it.

Reviewed-by: imsnah

0ede5336 10/29/2007 07:05 pm Iustin Pop

Fix some style issues (whitespace changes only)

Reviewed-by: imsnah

233d06c5 10/29/2007 06:02 pm Iustin Pop

Fix a non-clear error message

Reviewed-by: imsnah

a9e0c397 10/29/2007 05:49 pm Iustin Pop

Implement replace-disks for drbd8 devices

This patch adds three modes of disk replacement for drbd8:
- replace the disk on the primary node
- replace the disk on the secondary node
- replace the secondary node

It also adds some debugging code to backend.py and increments the...

b00b95dd 10/29/2007 05:47 pm Iustin Pop

Allow drbd8 devices to work without local storage

This patch adds functionality to drbd8 for:
- removing local storage
- initializing without local storage
- adding local storage

This is needed for the being able to replace disks for drbd8.

Reviewed-by: imsnah

f3e513ad 10/29/2007 05:44 pm Iustin Pop

Implement block device renaming

This patch add code for renaming a device; more precisely, for changing
the unique_id of the device. This means:
- logical volumes, rename the volume
- drbd8, change the remote peer

This is needed for the being able to replace disks for drbd8....

cc0451f3 10/29/2007 05:20 pm Guido Trotter

Convert ListOS to use the all helper function.

The predicate function gets build by a lambda function.
Also add a bit of debugging information to the 'unknown OS diagnose type'.

Reviewed-by: iustinp

78feb6fb 10/28/2007 04:32 pm Guido Trotter

Import two itertools recipes

The two function 'any' and 'all' are copied as-is from the python 2.4
documentation for the itertools module. They are useful (and are already
builtin function in python 2.5).

Reviewed-by: iustinp

65a15336 10/26/2007 01:25 pm Iustin Pop

Add a custom str() method for objects.Disk

This is done in order to easy debugging of disk-related issues.

Reviewed-by: imsnah

153d9724 10/25/2007 02:22 pm Iustin Pop

Modify two mirror-device related rpc calls

The two calls mirror_addchild and mirror_removechild take only one child
for addition/removal. While this is enough for our md usage, for local
disk replacement in drbd8, we need to be able to specify both the data...

a1f445d3 10/24/2007 05:43 pm Iustin Pop

Initial implementation of drbd8 template type

This is a partially working drbd8 template type. It does:
- add/remove
- startup/failover/shutdown

Not working is replace disks, which needs custom code for this template.

Reviewed-by: imsnah

f38478b2 10/24/2007 05:41 pm Iustin Pop

Allow DRBD8 to sync after sb1-pri with no changes

Currently the way we shutdown or startup disks seems to make DRBD8
unhappy. Until we rewrite the sequence of (de)activation, allow DRBD to
connect after a sb1-pri condition with no changes to the data.

Reviewed-by: imsnah

b352ab5b 10/24/2007 05:23 pm Iustin Pop

Fix a disk handling bug triggered by failover

This leaves an instance's disks configured for the primary node as after
disk activation we want to start the instance anyway. As such,
_GatherBlockDevs in backend.py will need the disks configured for the
primary....

a2cfdea2 10/24/2007 04:30 pm Iustin Pop

Add DRBD8 class for handling drbd version 8.x

This duplicates some code from the DRBDev class, but not very much, and
it will be expanded with the new functionality available for the 8.x
version. Currently the code is not accessible outside the module.

This patch introduces a dependency on the pyparsing module....

ae26a287 10/24/2007 04:30 pm Iustin Pop

Move/rename _IsValidMeta to base drbd class

The DRBDev._IsValidMeta only checks for the metadata device size. Since
this is a useful check (but not complete) for DRBD8, move it to the base
class and name it _CheckMetaSize.

Reviewed-by: imsnah

5a47ad20 10/24/2007 04:24 pm Iustin Pop

More abstractions from DRBD7 to base class

This moves the _SetFromMinor and _MassageProcData to the base class.

Reviewed-by: imsnah

0caf6485 10/24/2007 04:24 pm Iustin Pop

Improve out-of-minors handling

Currently, the out-of-minors handling is not very good: though both MD
and DRBD functions for finding an unused minor can return None, only the
DRBD code checks for this case.

This patch improves this by making the functions _FindUnusedMinor raise...

770fe0f9 10/24/2007 04:23 pm Iustin Pop

Move some methods from DRBDev to BaseDRBD

Since some of the methods and constants are valid for both 0.7 and 8.x
versions, we move them to the base class.

Reviewed-by: imsnah

aa4260ca 10/19/2007 02:49 pm Iustin Pop

Some tiny style fixes

Reviewed-by: imsnah

0f7f32d9 10/19/2007 02:48 pm Iustin Pop

Split some DRBD functionality based on versions

This is a small split of some functionality from the DRBDev class into a
base drbd class that holds just a few things, in order to make migration
to drbd 8.x easier.

Reviewed-by: imsnah

fe96220b 10/19/2007 02:48 pm Iustin Pop

Abstract more strings values into constants

Currently, the disk types are defined using constants in the code.
Convert those into constants so that we can easily find them and check
their usage.

Note that we don't rename the values of the constants as they are used...

e8ae0c20 10/18/2007 04:02 pm Michael Hanselmann

Implement disk failure QA test.

Testing failure on the primary node is currently disabled due to drbd problems.

Reviewed-by: iustinp

579d4337 10/18/2007 01:26 pm Alexander Schreiber

Patch series for reboot feature, part 3

This patch series implements the reboot command for gnt-instance. It
supports three types of reboot: soft (hypervisor reboot), hard (instance
config rebuild and reboot) and full (full instance shutdown and startup
again)....

bf6929a2 10/18/2007 01:25 pm Alexander Schreiber

Patch series for reboot feature, part 2

This patch series implements the reboot command for gnt-instance. It
supports three types of reboot: soft (hypervisor reboot), hard (instance
config rebuild and reboot) and full (full instance shutdown and startup
again)....

007a2f3e 10/17/2007 06:00 pm Alexander Schreiber

Patch series for reboot feature, part 1

This patch series implements the reboot command for gnt-instance. It
supports three types of reboot: soft (hypervisor reboot), hard (instance
config rebuild and reboot) and full (full instance shutdown and startup
again)....

fafa5990 10/17/2007 05:36 pm Alexander Schreiber

Fix unit tests for hooks.

Reviewed-by: imsnah

6a438c98 10/16/2007 06:27 pm Michael Hanselmann

Make “gnt-cluster verify” exit 0 if there's no problem with instances.

Reviewed-by: schreiberal

86b8c6ae 10/16/2007 05:45 pm Alexander Schreiber

tiny typing fixup

Reviewed-by: imsnah

f55ff7ec 10/16/2007 05:30 pm Iustin Pop

Add the number of VCPUs in gnt-instance info

Reviewed-by: imsnah

1d67656e 10/16/2007 04:51 pm Iustin Pop

Allow force removal of instances

This patch adds a new option to the instance removal command
"--ignore-failures" that forces the removal of the instance from the
configuration even if the removal process encounters errors.

In order to be able to do this when the remote node(s) is(are) down, we...

70d9e3d8 10/16/2007 11:28 am Iustin Pop

Replace more ssh paths with proper constants

The node's ssh keys filenames are now provided as constants; this should
allow easier customization.

Also, the user's ssh key computing has been abstracted into ssh.py

Reviewed-by: imsnah

2f8598a5 10/15/2007 04:06 pm Alexander Schreiber

Trivial typing fixups.

Reviewed-by: iustinp

b50f022f 10/15/2007 04:04 pm Iustin Pop

Fix node daemon log file permissions

The creation of the log file for the node daemon lacks the mode
parameter, so after applying the current umask, the file got 0700
permissions. Restrict this to the correct 0600.

Reviewed-by: schreiberal

8947cf2b 10/15/2007 03:16 pm Michael Hanselmann

Do QA tests on “gnt-os“, including partially valid OSes.

Reviewed-by: iustinp

90ab92e3 10/15/2007 03:08 pm Michael Hanselmann

Don't take unused parameter in qa_utils.py:Print{Info,Error}.

Reviewed-by: iustinp

a2656173 10/15/2007 02:45 pm Michael Hanselmann

Make “gnt-os diagnose” exit 1 if not all OSes are valid.

Reviewed-by: iustinp