- Aug 04, 2011
-
-
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>
-
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>
-
Iustin Pop authored
Explain that we only start the instance on the new node if it was originally running. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Just explain a bit the relation between node evacuate and instance commands. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This uses now the component for the transfer (if available), otherwise (e.g. in installs/renames) nothing. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This modifies the RPC layer to export the component name too to the backend, so that it can be used in log files and messages. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently, transfer data is done mainly with just the instance name, but when we have instances with multiple disks this is not enough to distinguish between the different transfers being done for the instance. Some parts of the code do have knowledge of the part being transferred (i.e. DiskTransfer.name), but if I understood correctly not all, so I decided to add a new argument to the respective disk import/disk export classes. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Similar to the previous patch, this adds a helper function to eliminate repeated calls info ConfigWriter. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This adds a new ConfigWriter.GetMultiNodeInfo function and replaces multiple/looping calls to GetNodeInfo with it. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
It turns out that the only use of the operator module was for itemgetter, so patch eb62069e should have removed that import too. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
operator.itemgetter(0) → fst operator.itemgetter(1) → snd snd is not used yet, but it makes sense to add both. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Aug 02, 2011
-
-
Iustin Pop authored
Iallocator mode reloc, parameter reloc_from takes a list; half of the code already forced this parameter to list, we add the other two cases where it is needed. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently we use absolute symlinks, but this doesn't work when we install remotely (due to install first to local temp dir, then rsync to remote machines). To fix, we change to manually-computed relative paths, which is not best, but it works. One possible alternative would be to use hard-links… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
By sleeping for 100ms after receiving a notification for a changed job file the job is given some additional time to change again. This significantly reduces the number of LUXI calls for WaitForJobChanges (depending on the job, in my tests with “gnt-cluster verify --debug-simulate-errors” by about 80%), and improves performance (the same job went from around 7 seconds to around 3.5 seconds). This method is not perfect. The algorithm could be made more complex, e.g. by increasing the delay on each change, etc., but for now this simple change provides a good improvement. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
These will be very useful for ganeti-watcher as it needs to retrieve instances by group. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Commit 54ca6e4b renamed some arguments, but didn't also renames them in the docstrings. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jul 29, 2011
-
-
Michael Hanselmann authored
For now this will do another query to the master daemon, but with the split for node groups this issue will go away. 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
Until now the state class would receive instances as objects (ganeti.watcher.Instance), but this is not necessary. By using strings the interface is simplified. This patch also simplifies some code accessing the internal structures, e.g. setting a key of a dictionary. Some instances of “del dict[key]” are replaced with “dict.pop(key, None)” to suppress any exceptions if the key doesn't exist. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Also, remove punctuation from one error message. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Make them match with style guide. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
WATCHER_STATEFILE will be removed at the end of this patch series. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Stephen Shirley authored
Signed-off-by:
Stephen Shirley <diamond@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
ganeti-watcher will use this constant to pass the option to itself for processing all node groups. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
I still don't know why Michael is a fan of %r, but in the meantime this patch changes: WARNING: import u'import-2011-07-29_01_39_33-y3gZKV' on node1 failed: Exited with status 1 into: WARNING: import 'import-2011-07-29_01_39_33-y3gZKV' on node1 failed: Exited with status 1 Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Stephen Shirley authored
During instance installations, you do not want the instance to reboot and start again with the same parameters, as that will most likely re-start the install process. Therefore, when the instance requests a reboot it should instead shutdown. This flag allows this to be controlled. Signed-off-by:
Stephen Shirley <diamond@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-