- Nov 02, 2007
-
-
Iustin Pop authored
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, having correct information as the only time when devices change paths are when they are started/stopped, and the code in backend.py adds cache updates to exactly these operations. The only drawback of this implementation is that we don't fully update the cache on renames of devices (we clean the old entries but we don't add new ones). Since the rename changes the path only for LVs (and not drbd and md), this is less of a problem as the target of this code is debugging DRBD and MD issues. The patch writes files named bdev_drbd<N> (or bdev_md<N>, bdev_xenvg_...) in /var/run/ganeti (more exactly, LOCALSTATEDIR/ganeti). The files start with 'bdev_' and continue with the path of the device under /dev/ (this prefix stripped), and contain the following values, space separated: - instance name - primary or secondary (depending on how the device is on the primary or secondary node) - instance visible name: sda or sdb or not_visible, the latter case when the device is not the top-level device (i.e. remote_raid1 templates will have sd[ab] for the md, but not_visible for drbd and logical volumes) The cache is designed to not raise any errors, if there is an I/O error it will only be logged in the node daemon log file. This is in order to reduce the possible impact of the cache on the block device activation and shutdown code. Reviewed-by: imsnah
-
Iustin Pop authored
When renaming a logical volume, we should change the dev_path (and other internal variables) in order to be consistent. Reviewed-by: imsnah
-
Iustin Pop authored
I forgot a pair of parentheses in that revision which break the common case. This patch adds them. Reviewed-by: ultrotter
-
- Nov 01, 2007
-
-
Iustin Pop authored
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
-
Iustin Pop authored
Reviewed-by: ultrotter
-
- Oct 31, 2007
-
-
Iustin Pop authored
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 for deciding whether to continue or abort. It also expands a bit the man page. Reviewed-by: imsnah
-
Iustin Pop authored
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
-
- Oct 30, 2007
-
-
Michael Hanselmann authored
Reviewed-by: schreiberal
-
- Oct 29, 2007
-
-
Iustin Pop authored
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
-
Iustin Pop authored
The major is declared in the base class, we do not need to overwrite it. Reviewed-by: imsnah
-
Iustin Pop authored
Reviewed-by: imsnah
-
Iustin Pop authored
Reviewed-by: imsnah
-
Iustin Pop authored
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 protocol version for the recent changes of the rpc layer. Reviewed-by: imsnah
-
Iustin Pop authored
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
-
Iustin Pop authored
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. Reviewed-by: imsnah
-
- Oct 28, 2007
-
-
Guido Trotter authored
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
-
- Oct 26, 2007
-
-
Iustin Pop authored
This is done in order to easy debugging of disk-related issues. Reviewed-by: imsnah
-
- Oct 25, 2007
-
-
Iustin Pop authored
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 and metadata device. This patch modifies these two rpc calls (and their backend implementation and their usage in cmdlib) to take a list of children to add/remove. Reviewed-by: imsnah
-
- Oct 24, 2007
-
-
Iustin Pop authored
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
-
Iustin Pop authored
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
-
Iustin Pop authored
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. Reviewed-by: imsnah
-
Iustin Pop authored
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. Reviewed-by: imsnah
-
Iustin Pop authored
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
-
Iustin Pop authored
This moves the _SetFromMinor and _MassageProcData to the base class. Reviewed-by: imsnah
-
Iustin Pop authored
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 an error instead of None, and gets rid of the one manual check for the return value. Reviewed-by: imsnah
-
Iustin Pop authored
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
-
- Oct 19, 2007
-
-
Iustin Pop authored
Reviewed-by: imsnah
-
Iustin Pop authored
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
-
Iustin Pop authored
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 in the configuration file, and as such it's best to leave them as they are. Reviewed-by: imsnah
-
- Oct 18, 2007
-
-
Alexander Schreiber authored
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). This patch contains the opcode and lu part. Reviewed-by: iustinp
-
- Oct 17, 2007
-
-
Alexander Schreiber authored
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). This patch contains the backend and rpc part of the patch. Reviewed-by: iustinp
-
- Oct 16, 2007
-
-
Michael Hanselmann authored
Reviewed-by: schreiberal
-
Iustin Pop authored
Reviewed-by: imsnah
-
Iustin Pop authored
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 need to restrict the execution of the instance removal hook to the master only. I think this is a reasonable trade-off (but I'm not sure). Reviewed-by: imsnah
-
Iustin Pop authored
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
-
- Oct 15, 2007
-
-
Alexander Schreiber authored
Reviewed-by: iustinp
-
- Oct 12, 2007
-
-
Iustin Pop authored
This patch does the following: - add constants.GANETI_RUNAS = "root", which is used to compute the homedir (and thus the .ssh directory) instead of hardcoding "/root/.ssh" in backend.AddNode and backend.LeaveCluster - add constants.SSH_CONFIG_DIR (currently hardcoded to /etc/ssh) that is used in backend instead of hardcoding it (preparation for selecting that at ./configure time) - some more internal cleanup in backend.AddNode Reviewed-by: imsnah
-
Iustin Pop authored
Currently there are a few version of "write a file safely" in the code. This patch adds a generic function that should be able to replace all the other versions. The "take attributes from the target file" option, while useful, is not implemented by this patch. Reviewed-by: imsnah,ultrotter
-
Iustin Pop authored
Since we remove only files from DATA_DIR and not from subdirectories, let's not walk the entire tree, a simple listdir suffices. Also switch to utils.RemoveFile from simple os.unlink. Reviewed-by: imsnah
-
Iustin Pop authored
Currently GetHomeDir accepts UIDs only. Enhance it to accept either a user name or a user id, to allow for nicer usage. Reviewed-by: imsnah
-