- Aug 08, 2011
-
-
Michael Hanselmann authored
Short: this patch enables the use of “gnt-instance list '*.site'”. Detailed description: This patch changes the command line interface code to try to deduce the kind of filter from the arguments to a “list” command. If it's a list of plain names an old-style name filter is used. If filtering is forced or the single argument is potentially a filter, it is parsed as a query filter string. Any name looking like a globbing pattern (e.g. “*.site” or “web?.example.com”) is treated as such. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Sometimes it's good to tell the user about parameter differences but then proceed anyway. Strictness is still enforced for those parameters that would break the cluster (volume group name, storage dir if file storage is enabled). Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
There's no point in checking whether the file storage dir in the two clusters is the same if file storage is not even enabled Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently, the IAllocator code requests strictly that the (set of) groups of the nodes we're relocating from is equal to the set of groups we're relocating to. This, however, makes is impossible to fix split instances, since (by definition) the secondary of a split instance is not in the same group as the primary node, and after the fixing is it the same. The patch changes the test from group equality to check that the final group set (across both primary and secondary nodes) is a subset of the initial group set (again across both nodes). This means we can't "extend" the group of nodes but keeping the same or decreasing it is allowed. After this patch, one can finally fix (automatically) split instances via a gnt-instance replace-disks. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
As discussed offline, the new node-change mode could be used for evacuation, but it's not directly useful as it returns a list of opcodes; therefore, we need to partially revert commits fbe5fcf6 and 5b53ca79 that removed it (and multi-evacuate, which remains removed). The new version of relocate is actually just a wrapper over the tryNodeEvac (which does the node evacuate); we run that and then we do some extra checks that the nodes we got from that function are consistent with the instance's new state. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Commit f0edfcf6 removed the parsing of multi-evacuate result, but the code went from: if mode in (multi-evac, relocate): … if mode == relocate: … to: if mode == relocate: … if mode == relocate … This patch simply removes the nested if. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Commit 342f9172 added stricter checks for the iallocator result in evacuate mode, but it does this irrespective of the result status. When the result has failed and (according to the design) the list of nodes is empty, this code will trigger the following: node1# gnt-instance replace-disks -I hail instance14 Failure: command execution error: Groups of nodes returned by iallocator () differ from original groups (default) After the patch, the result is: node1# gnt-instance replace-disks -I hail instance14 Failure: prerequisites not met for this operation: error type: insufficient_resources, error details: Can't compute nodes using iallocator 'hail': Request failed: … Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Aug 05, 2011
-
-
Michael Hanselmann authored
The operators “=*” and “!*” do globbing in filters, e.g.: $ gnt-instance list --no-headers -o name 'name =* "*.site"' inst1.site.example.com Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
The docstring of the DRBD8 class says: … The meta device is checked for valid size and is zeroed on create. which is not done today, hence we have http://code.google.com/p/ganeti/issues/detail?id=182 : node1# mkreiserfs -f /dev/xenvg/t8 … ReiserFS is successfully created on /dev/xenvg/t8. node1# drbdmeta --force /dev/drbd256 v08 /dev/xenvg/t8 0 create-md md_offset 0 al_offset 4096 bm_offset 36864 Found reiser filesystem This would corrupt existing data. If you want me to do this, you need to zero out the first part of the device (destroy the content). You should be very sure that you mean it. Operation refused. I've tested and even just 1MB is enough to wipe the meta, but let's be safer and pass a 'clean' meta to drbd. Note: I didn't copy _WipeDevice from backend.py since it seemed more complex than needed here. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
It is no longer used and has been deprecated in 2.5. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This was never used by a stable version. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
The first argument to str.split is the separator, not the maximum number of splits. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
… instead of getting the list of instances once again from the configuration. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Each per-group watcher process writes its own instance status file. Once that's done it tries to acquire an exclusive lock on the global file and will proceed to read all status file, merging them based on each file's mtime. If an instance is moved to another group, the newer status will supersede that of an older file which hasn't yet been updated. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This will be used by the watcher to store the file's fstat(2). It must be done from the filehandle. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 04, 2011
-
-
Agata Murawska authored
Signed-off-by:
Agata Murawska <agatamurawska@google.com> Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
We just need an object that has a list_owned method. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Apollon Oikonomopoulos authored
Remove 15 second sleep when wait_for_sync is not set. LUInstanceCreate already calls _WaitForSync with oneshot=True, which already performs an internal wait-loop for disks to start syncing. Signed-off-by:
Apollon Oikonomopoulos <apollon@noc.grnet.gr> Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
lu.glm.list_owned becomes lu.owned_locks, which is clearer for the reader. Also rename three variables (which were before named owned_locks) to make clearer what they track. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
The module is called “objects”, not “object”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This is quite similar to evacuating a group, but the locking is different. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
Watcher state files can stay around if node groups are removed. With this patch they're removed after 21 days. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This patch brings a huge change to ganeti-watcher to make it aware of node groups. Each node group is processed in its own subprocess, reducing the impact of long-running operations. The global watcher state file, $datadir/ganeti/watcher.data, is replaced with a state file per node group ($datadir/ganeti/watcher.${uuid}.data). Previously a lock on the state file was used to ensure only one instance of watcher was running at the same time. Some operations, e.g. “gnt-cluster renew-crypto”, blocked the watcher by acquiring an exclusive lock on the state file. Since the watcher processes now use different files, this method is no longer usable. Locking multiple files isn't atomic. Instead a dedicated lock file is used and every watcher process acquires a shared lock on it. If a Ganeti command wants to block the watcher it acquires the lock in exclusive mode. Each per-nodegroup watcher process also acquires an exclusive lock on its state file. This prevents multiple watchers from running for the same nodegroup. The code is reorganized heavily to clear up dependencies between functions and to get rid of the global “client” variable. The utility class “Watcher” is removed in favour of stand-alone utility functions. Since the parent watcher process won't wait for its children by default, a new option (--wait-children) was added. It is used, for example, by QA. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
All potential target nodes should be locked while calculating a group evacuation. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
- Use OpPrereqError in CheckPrereq - Clarify command synopsis Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
The same logic will be used for changing an instance's group. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Including the designs which were actually implemented. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 03, 2011
-
-
Apollon Oikonomopoulos authored
When wait_for_sync is set to False in LUInstanceCreate, Ganeti lets DRBD sync in the background while performing the rest of the installation steps, including OS installation. However, OS installation is a very disk-intensive task that intereferes badly with the background I/O caused by DRBD's initial sync. To this end, we pause the background sync before OS installation and unpause it afterwards, which yields a significant speed boost for OS installation. The following should be noted: a) The user has requested not to wait for sync, i.e. the instance will be non-redundant for an unspecified interval anyway and delaying this by a couple of minutes is not a big compromise. b) This approach is also followed during disk wiping. Signed-off-by:
Apollon Oikonomopoulos <apollon@noc.grnet.gr> [iustin@google.com: simplify an if check] Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-