- 16 Feb, 2009 1 commit
-
-
Iustin Pop authored
If /proc/drbd can't be opened, this raises an IOError, but all the error-handling behaviour in backend treats only BlockDeviceErrors. This creates a plain failure in cluster verify and in other RPC calls. This patch simply converts EnvironmentErrors into BlockDeviceErrors, and also changes the RPC result for NV_DRBDLIST and its handling to be able to show the error. The other RPC calls work by default now, due the existing error handling. Reviewed-by: ultrotter
-
- 13 Feb, 2009 1 commit
-
-
Guido Trotter authored
The cli FIXME is not something broken, but rather some better handling feature we'd rather have, and the two backend FIXME are done (disks have their read only parameter set, and the error is raised and thus reaches the master). Reviewed-by: iustinp
-
- 12 Feb, 2009 2 commits
-
-
Iustin Pop authored
This patch changes the return type from this RPC call to include status information and renames the backend method to match the RPC call name. The patch is a little bigger than the reboot one, since this call is used in more than one place. However, all the points of call have the same usage pattern, so the patch is trivial. Reviewed-by: ultrotter
-
Iustin Pop authored
This small patch changes the return type from this RPC call to include status information and renames the backend method to match the RPC call name. Reviewed-by: ultrotter
-
- 10 Feb, 2009 7 commits
-
-
Iustin Pop authored
Reviewed-by: imsnah
-
Iustin Pop authored
This big patch converts the bdev Assemble() methods and the supporting functions to raise exceptions instead of returning False. This is a big patch, since the assembly functions touch other functions: add children, creation, etc. However, the patch does not add much new code, rather it reworks existing code. One of the biggest changes is in the rework of the DRBD8._SlowAssemble() method (one of the most complicated/ugly ones). Hopefully the new version is a little bit more readable. Reviewed-by: ultrotter
-
Iustin Pop authored
Currently, the Remove() methods of block devices return True/False. This doesn't permit any error detail reporting. This patch changes the return type to None for success, and raises BlockDeviceError in case of failure. This permits the details to be passed up the stack. The patch also simplifies a little the Remove method of file-based devices (no stat first, just try unlink). Reviewed-by: ultrotter
-
Iustin Pop authored
This converts the backend and cmdlib modules to a (status, data) implementation of the blockdev_remove rpc call. bdev.py is not yet converted, so we don't actually have error information. We also fix a bug in _RemoveDisks by not reusing a variable. Reviewed-by: ultrotter
-
Iustin Pop authored
Currently, the Shutdown() methods of block devices return True/False. This doesn't permit any error detail reporting. This patch changes the return type to None for success, and raises BlockDeviceError in case of failure. This permits the details to be passed up the stack. For LVM and file-backed devices, this is a simple change. For DRBD, we first remove the shutdown of disks in case of network activation failures (since with static minors the minor is used anyway, we don't gain anything by clearing it), and the we simply change _ShutdownAll() to raise an exception. Reviewed-by: ultrotter
-
Iustin Pop authored
This converts the backend and cmdlib modules to a (status, data) implementation of the blockdev_shutdown rpc call. bdev.py is not yet converted, so we don't actually have error information. We also fix a bug in _ShutdownInstanceDisks by not reusing a variable. Reviewed-by: ultrotter
-
Iustin Pop authored
This converts the RPC call blockdev_assemble to the new-style result format. Note that we won't usually have error information, but it's the first step toward it. Reviewed-by: ultrotter
-
- 09 Feb, 2009 4 commits
-
-
Iustin Pop authored
Currently, the names of the functions in backend.py that are actually RPC procedures and are called from ganeti-noded are not corresponding to the RPC names. This makes it hard to actually see which functions are exported and which functions are internal to backend. This patch renames all blockdevice-related functions in backend.py match the name of the RPC call (without the ‘call’ or ‘perspective’ prefix). This should make it easier to grep for a given function called in cmdlib, without having to open and check in ganet-inoded what backend function it corresponds to. The patch also does two minor extra cleanups (rename a variable and change a logging level). Reviewed-by: ultrotter
-
Iustin Pop authored
This patch converts the call_blockdev_find - which searches for block devices and returns their status - to the (status, data) format. We also modify the backend function name to match the rpc call. Reviewed-by: ultrotter
-
Iustin Pop authored
This patch fixes the error handling in the add OS to instance function with regard to invalid OSes. Previously, we didn't handle any such errors, with the end result that the user would have to look in the node daemon log. The patch also renames the name of the function to match the RPC call name. Reviewed-by: ultrotter
-
Iustin Pop authored
Currently the return value or errors from the block device Open() method are ignored. This patch catches any BlockDeviceErrors and returns a well-formatted result. Reviewed-by: ultrotter
-
- 03 Feb, 2009 1 commit
-
-
Iustin Pop authored
This patch unifies the hardcoded re-encoding attempts into a single function in utils.py. This function is used to take either an unicode or str object and convert it to a ASCII-only str object which can be safely displayed and transmitted. We replace then the current manual re-encodings with this function. In mcpu we stop re-encoding the hooks output and instead we do it right at the hook generation in backend.py. This passes on my 'custom' lvs output with non-ASCII chars. But there are probably other places we will need to fix. Reviewed-by: ultrotter
-
- 02 Feb, 2009 2 commits
-
-
Iustin Pop authored
This patch correctly exports the mode of disks (rw/ro) and also exports the instance OS. Reviewed-by: imsnah
-
Iustin Pop authored
When the rpc call node_add fails, we don't have any error message. This patch changes the call to return (status, data) so that the user can see the correct error message. Reviewed-by: imsnah
-
- 29 Jan, 2009 1 commit
-
-
Iustin Pop authored
Currently the LUVerifyCluster only reports the protocol version changes, not software ones. This is useful to know/monitor, so we add this too as a warning. Reviewed-by: ultrotter
-
- 21 Jan, 2009 4 commits
-
-
Guido Trotter authored
When an instance fails to shut down we currently log its whole object, rather than just the instance name. Reviewed-by: iustinp
-
Iustin Pop authored
Two are real errors (invalid names) and one is style error (overriding name from outer scope). Reviewed-by: ultrotter
-
Guido Trotter authored
MigrationInfo, AcceptInstance and AbortMigration are implemented as hypervisor specific functions, and by default they do nothing (as they're not always necessary). This patch also converts hv_base.MigrateInstance docstring to epydoc, adds a missing @type to the GetInstanceInfo docstring, and removes an unneeded empty line. Reviewed-by: iustinp
-
Guido Trotter authored
Currently the hypervisor is expected to do all the migration from the source side. With this patch we also add the option of passing some information to the target side, and starting some operation there. As a bonus, a function to cleanup any started operation is included. Reviewed-by: iustinp
-
- 20 Jan, 2009 5 commits
-
-
Guido Trotter authored
When StopInstance raises an HypervisorError, report it in the logged message to ease with debugging. Reviewed-by: iustinp
-
Iustin Pop authored
This allows the rename failures to show the ouput of OS scripts. Reviewed-by: ultrotter
-
Iustin Pop authored
This patch adds support for verification of drbd minors space in cluster verify: minors which belong to running instances and should be online but are not, and minors which do not belong to any instace but are in use. The patch requires exposing some methods from bdev.DRBD8 and config.ConfigWriter which were until now private methods. Reviewed-by: ultrotter
-
Iustin Pop authored
This allows the install and reinstall instance to return (hopefully) relevant log files from the OS create scripts. Reviewed-by: ultrotter
-
Iustin Pop authored
This will record the failure cause in starting up the instance in the job log (and thus to the user). Reviewed-by: ultrotter
-
- 19 Jan, 2009 2 commits
-
-
Iustin Pop authored
This allows errors to be visible at the user level instead of just node daemon logs. Reviewed-by: ultrotter
-
Iustin Pop authored
Currently when creation LVM-based instances, we always get the extremely-confusing message "ERROR Can't find LV /dev/xenvg/..." which is actually expected. This behaviour was introduced before we had UUID-style LV names, since at that point it was not a unexpected to have such volumes laying around after a failed creation. Today, it's much more of an error to see existing volumes, and it's better to abort with a failure. Since bdev.LogicalVolume.Create() method will raise an error in case it exists, we can remove this check in backend before creating the device. The Create methods for DRBD and FileStorage currently don't raise exception, as behaviour is not very well defined here. We also change some exception types raised in bdev so that all exceptions raised by device creation are a subclass of GenericError. Reviewed-by: ultrotter
-
- 13 Jan, 2009 3 commits
-
-
Iustin Pop authored
This is forward port via copy (and not individual patches cherry-pick) of the latest code on the 1.2 branch related to the migration. The changes compared to 1.2 are the fact that we don't need the IdentifyDisks step anymore (the drbd rpc calls are independent now), and the rpc module improvements. Reviewed-by: ultrotter
-
Iustin Pop authored
This is a modified forward-port of DrbdNetReconfig and their associated RPCs. In Ganeti 2.0, these functions will be used for two things: - live migration (as in 1.2) - and for other network reconfiguration tasks, since DRBD8.Attach() doesn't do them anymore Because of the Attach() changes, we can now implement the AttachNet/DisconnectNet functions as independent entities, and we don't need the cache anymore. Note these functions are copies of the latest 1.2 code, and not cherry-picks of the (many) patches that went into 1.2. Reviewed-by: ultrotter
-
Iustin Pop authored
Since now the Assemble function is different than Attach, we rename this backend function to show that the intent is to fully assemble the device (and it's always allowed to modify the device). Reviewed-by: ultrotter
-
- 08 Jan, 2009 1 commit
-
-
Iustin Pop authored
This is a forward-port of commit 1194 on the 1.2 branch: This call will check whether an instance is up on its primary, and that it has been started with symlinks. We currently have no on-secondary checks, nor any hypervisor specific call. Reviewed-by: iustinp The difference from the original patch is that we don't include the cmdlib changes, since those will come as a copy from the 1.2 cmdlib.py, and not as individual patches. Original-Author: ultrotter
-
- 07 Jan, 2009 6 commits
-
-
Iustin Pop authored
This is a modified forward-port of commit 1184 on the 1.2 branch: backend: Remove symlinks by disk name, not using a wildcard Reviewed-by: ultrotter The changes to the original patch are related to the docstring style and iv_name to index switch. Original-Author: imsnah
-
Iustin Pop authored
This is an extract of commit 1166 on the 1.2 branch (Add a rpc call for drbd network reconfiguration), but only the blockdev_close part. The patch changes the blockdev_close call to take the instance so that it can remove the symlinks of the instance. Originally-Reviewed-by: imsnah
-
Iustin Pop authored
This is a forward-port of commit 1163 on the 1.2 branch: This fixes the removal of the instance symlinks (probably breakage from the glob changes). Reviewed-by: imsnah
-
Iustin Pop authored
This is a forward-port of commits 1150 and 1151 on the 1.2 branch: Add _RemoveBlockDevLinks auxiliary function, called when an instance fails to start and when it is shut down. Reviewed-by: iustinp and: Fix cut&paste error when removing symlinks It's just whitespace... isn't it? uhm... :) Anyway, fixing an error made when reformatting the code for the new "safer" behaviour. Reviewed-by: iustinp Original-Author: ultrotter
-
Iustin Pop authored
This is a forward-port of commit 1149 on the 1.2 branch: _GatherAndLinkBlockDevs used to raise the errors.BlockDeviceError exception when it failed to create a block device, and with this patch set it does so also when it fails to create a symlink to it. With this patch we move the call to this function into a pre-existing try-except block in the code, and catch the BlockDeviceError exception, logging a message and returning a failure state if it happens. Reviewed-by: iustinp The changes are related to the new hypervisor and logging syntax. Original-Author: ultrotter
-
Iustin Pop authored
This is a forward-port of commit 1148 on the 1.2 branch: Change the _GatherBlockDevs private function, called only one time by StartInstance, to _GatherAndLinkBlockDevs, and make it transform the device returned even more by calling the new _SimlinkBlockDev auxiliary function. This makes sure that every time an instance is started symlinks to its block devices are created, and the instance is started off them, rather than the underlying block devices. Reviewed-by: iustinp The changes we make to the patch is related to newer function signatures in 2.0, and to the fact that iv_name is deprecated and we use instead disk%d based on the disk index. Original-Author: ultrotter
-