- 01 Oct, 2008 1 commit
-
-
Michael Hanselmann authored
Replace ssconf with utility functions. Reviewed-by: iustinp
-
- 09 Sep, 2008 3 commits
-
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Iustin Pop authored
We create a multi-node call so that querying all nodes for agreement will be fast. Reviewed-by: imsnah
-
Michael Hanselmann authored
This helps to prevent complete deadlocks. Reviewed-by: iustinp
-
- 05 Sep, 2008 1 commit
-
-
Michael Hanselmann authored
Only one process should modify the queue at the same time. Reviewed-by: iustinp
-
- 08 Aug, 2008 5 commits
-
-
Michael Hanselmann authored
This will be used to archive jobs. Reviewed-by: iustinp
-
Michael Hanselmann authored
The lock will also be needed by another function. Reviewed-by: iustinp
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
jobqueue_update: Uploads a job queue file's content to a node. The most common operation is to upload something that we already have in a string. Unlike in the upload_file function, the file is not read again when distributing changes, but content has to be passed as a string. jobqueue_purge: Removes all queue related files from a node. Reviewed-by: iustinp
-
- 30 Jul, 2008 2 commits
-
-
Iustin Pop authored
The 'old-style' info, error, debug logs do not make much sense. This patch unifies the SetupLogging and SetupDaemon functions. As a result, all the commands logs to a 'commands.log' file. The patch also changes the log setup to keep going if there's an error in setting up the file logging but we're logging to stderr. Also, burnin now logs to its own file (burnin.log). Reviewed-by: ultrotter
-
Iustin Pop authored
This patch adds a new, unused for now, parameter to the start and stop master operations in backend. The idea behind it is that we need to be able to control whether the IP (de)activation is coupled with daemon startup/shutdown. The callers are also modified to pass this parameter (even if unused for now). Reviewed-by: ultrotter
-
- 29 Jul, 2008 1 commit
-
-
Iustin Pop authored
Reviewed-by: imsnah
-
- 23 Jul, 2008 1 commit
-
-
Guido Trotter authored
Reviewed-by: iustinp
-
- 21 Jul, 2008 1 commit
-
-
Michael Hanselmann authored
This also fixes a TODO added by ultrotter by killing the parent process when QuitGanetiException is raised. Reviewed-by: ultrotter
-
- 16 Jul, 2008 1 commit
-
-
Guido Trotter authored
Create a new ForkingHTTPServer in ganeti-noded by deriving both from NodeDaemonHttpServer and ForkingMixin. This will allow us to process concurrent requests. Reviewed-by: imsnah
-
- 11 Jul, 2008 1 commit
-
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
- 09 Jul, 2008 2 commits
-
-
Iustin Pop authored
Currently, in debug mode, both the logfile handler and the stderr handler will log debug messages. Since the stderr is redirected to the same logfile (to catch non-logged errors), it means log entries are doubled. The patch adds an extra parameter to the logger.SetupDaemon() function that allows disabling of the stderr logging. The master and node daemon will use this to enable stderr logging only when running in foreground. Reviewed-by: imsnah
-
Iustin Pop authored
The patch adds some more logging to the node daemon: - log methods at beggining not only at the end - log method parameters (they are very verbose, but useful) A separate change is to initialize the global variable in the global scope, not inside main(). Reviewed-by: imsnah
-
- 08 Jul, 2008 1 commit
-
-
Iustin Pop authored
Rather than just creating BDEV_CACHE_DIR we loop through the SUB_RUN_DIRS list and create all its childs. Reviewed-by: iustinp
-
- 27 Jun, 2008 1 commit
-
-
Guido Trotter authored
- s/GanetiQuitException/QuitGanetiException/ - Look for the arguments in err.args, not err itself Reviewed-by: iustinp
-
- 26 Jun, 2008 2 commits
-
-
Guido Trotter authored
Accoring to the usage documented in the QuitGanetiException docstring, if we receive such an exception we'll set the global _EXIT_GANETI_NODED variable to True, and then return either a valid value or an error message to the user. This will be the last request we serve, though, because the main loop will be interrupted and the daemon will terminate. Reviewed-by: iustinp
-
Guido Trotter authored
Rather than calling httpd.serve_forever() in ganeti-noded we'll call httpd.handle_request() but just while a global variable, which we'll call _EXIT_GANETI_NODED, remains false. Reviewed-by: iustinp
-
- 20 Jun, 2008 1 commit
-
-
Iustin Pop authored
This patch adds rpc layer calls (in rpc.py and the equivalent in ganeti-noded) to close a list of block devices, and the wrapper in backend.py that takes a list of Disk objects, identifies them and returns correctly formatted results. The reason why this very basic call was missing until now from the rpc layer is that we usually don't care about device closes (though we should, and will do so in the future) as only drbd has a meaningful Close() operation; right now we directly do Shutdown(). The patch is clean enough that it's actually independent of the live migration implementation. Reviewed-by: imsnah
-
- 17 Jun, 2008 1 commit
-
-
Iustin Pop authored
This simple patch exposes the block device grow operation at the rpc layer. It does not increase the protocol version as it has been recently changed by the live failover rpc call. Reviewed-by: imsnah
-
- 16 Jun, 2008 1 commit
-
-
Iustin Pop authored
This patch adds the migration rpc call and its implementation in the backend. The patch does not deal with the correct activation of disks. Because of the new RPC, the protocol version is increased. Reviewed-by: imsnah
-
- 13 Jun, 2008 1 commit
-
-
Michael Hanselmann authored
- Shorter code - Reorder arguments to logger.SetupLogging calls to make more sense Reviewed-by: iustinp
-
- 28 Apr, 2008 1 commit
-
-
Iustin Pop authored
Currently the iallocator execution takes place in the master, which is a violation of the current architecture, and will create problems with a threaded master daemon. This patch moves the execution to the backend, similar to the hooks runner, by: - introducing a new class that handles the execution in the backend (and could be used also for listing the allocators, etc.) - introducing a new rpc call - replacing the actual execution in IAllocator.Run() with a rpc call This passes burnin with the dumb allocator Reviewed-by: imsnah
-
- 05 Apr, 2008 1 commit
-
-
Manuel Franceschini authored
Reviewed-by: ultrotter
-
- 04 Apr, 2008 1 commit
-
-
Iustin Pop authored
Currently, in ganeti-noded we have the createDaemon function. Since we'll need the same in other daemons, we move this function to utils.py With the move, a few changes were also done: - change the name to Daemonize() - add a parameter, logfile, as different daemons will want to log to different files - remove the try.. except.. around the fork calls, since they were only re-raising the OS exception with less data; unless we want to actually handle fork error (not just re-raising), these try blocks are not useful - change the return style at the end of the function Reviewed-by: imsnah
-
- 27 Mar, 2008 1 commit
-
-
Iustin Pop authored
This patch just removes an extraneous \n from the log message making it nicer to view. Reviewed-by: schreiberal
-
- 19 Mar, 2008 1 commit
-
-
Iustin Pop authored
Currently in order to deal with tmpfs /var/run, we create the BDEV_CACHE_DIR in the init script. However, that does not cover all the cases, and it's not a proper place to deal with it: for example, dealing with not initialized clusters and the master node is more complicated. Therefore, this patch does: - make ganeti-noded create the directory automatically - make ganeti-noded error out if it can't create it or it's already there but not a directory - remove the creation from the init.d script Reviewed-by: ultrotter
-
- 11 Mar, 2008 1 commit
-
-
Iustin Pop authored
This patch modifies TcpPing and its callers to make the source address selection optional. Usually, the kernel will know better what source address to use, just in some cases we want to enforce a given source address so it makes sense to make this optional. Reviewed-by: ultrotter
-
- 22 Feb, 2008 1 commit
-
-
Iustin Pop authored
This patch switches from the twisted usage for inter-node protocol to simple BaseHTTPServer/httplib. The patch has more deletions because we use no authentication, no encryption at all. As such, this is just for trunk, and only for testing. What it brings is the ability to use the rpc library from within multiple threads in parallel (or it should so). Since the changes are very few and non-intrusive, they can be reverted without impacting the rest of the code. This passes burnin. QA was not tested. Reviewed-by: imsnah
-
- 05 Feb, 2008 1 commit
-
-
Iustin Pop authored
This can be used for testing purposes. Reviewed-by: ultrotter,imsnah
-
- 29 Nov, 2007 1 commit
-
-
Iustin Pop authored
This patch adds logging of command failures to the debug log in case the user either started the command (gnt-*) or the node daemon with the debug flag. Reviewed-by: imsnah
-
- 05 Nov, 2007 2 commits
-
-
Guido Trotter authored
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 valid. Reviewed-By: iustinp
-
Guido Trotter authored
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
-
- 02 Nov, 2007 1 commit
-
-
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
-
- 29 Oct, 2007 1 commit
-
-
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
-