- Feb 24, 2009
-
-
Iustin Pop authored
This patch removes the extra_args parameter and instead switches the instance to the HV_KERNEL_ARGS hypervisor option. This is a big change, but it's a needed cleanup, this extra parameter on all RPC calls is not generic and we also need to have a persistent value here. Reviewed-by: imsnah
-
- Feb 16, 2009
-
-
Iustin Pop authored
The recent change (commit 2151) to the watcher to make it handle offline nodes also saves the offline attribute to the state file, but this is not needed and also breaks the checking of the boot ID. This patch simply removes it, restoring the correct behaviour. Reviewed-by: imsnah
-
Iustin Pop authored
This patch adds auto-archiving of jobs older than 6 hours to the watcher. Reviewed-by: imsnah
-
- Feb 13, 2009
-
-
Iustin Pop authored
This patch fixes many small issues related to write functions: - update documentations w.r.t. how to add users - update the instance add function for latest API - add instance delete - fix addition of tags - update some error messages Reviewed-by: imsnah
-
Iustin Pop authored
This patch changes the format of the HTTP error messages from text/html, which is hard to parse from RAPI clients, to JSON which can be automatically parsed. The error message is an object, which contains always three keys: - code, an integer with the error code - message, a short description - explain, holding (if available) a description of the error In order to implement this, there is a bit of change to the http server and executor classes. I've tested and the error handling still works (but less optimal, no error message) in case the error formatting itself raises an exception. Reviewed-by: imsnah
-
Iustin Pop authored
This changes the RAPI error codes for luxi errors; a timeout error is now reported properly as 504, while any other luxi error is reported as 502. It would be good to convert even more errors into proper return codes in the future. Reviewed-by: imsnah
-
Iustin Pop authored
This patch displays a nicer error message compared to the default stacktrace. Reviewed-by: imsnah
-
- Feb 12, 2009
-
-
Iustin Pop authored
This patch introduces a 'force' mode for the master daemon startup where the voting process is not done, but the user has to confirm manually the startup (before forking, of course). Reviewed-by: imsnah
-
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
-
- Feb 11, 2009
-
-
Guido Trotter authored
We need this directory for locks, so if for any reason it's not there we'll create it. The permissions are the standard /var/lock permissions. Reviewed-by: iustinp
-
- Feb 09, 2009
-
-
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
-
- Feb 05, 2009
-
-
Iustin Pop authored
This patch fixes the SSL mode (by actually constructing SSL parameters from the command line options) and enables SSL by default; the old “-S” option which enabled SSL is now changed to “--no-ssl”. The certificate and key are by default pointing to the Ganeti auto-generated certificate for rapi. Reviewed-by: imsnah
-
- Feb 04, 2009
-
-
Iustin Pop authored
For queries, we don't want to require authentication. We fix this by adding an override GetAuthRealm in the rapi daemon. We also fix a method name. Reviewed-by: imsnah
-
Iustin Pop authored
This is the last query that RAPI executes via opcodes and is purely static (config values only). As such, we can convert it safely to a query instead of job. Reviewed-by: imsnah
-
Iustin Pop authored
This patch adds the framework for, and enables lockless OpQueryInstances. This means that instances will be shown in ERROR_up or ERROR_down state, even though this is not an error (but just an in-progress job). The framework is implemented as follows: - the OpQueryInstances, OpQueryNodes and OpQueryExports opcodes take an additional “use_locking” flag which will denote whether to lock or not; this patch only implements this for LUQueryInstances - the luxi query functions take an additional argument use_locking which is passed to the master daemon, and then passed to the above opcodes - cli.py export a new SYNC_OPT command line options which implement setting this flag to true - except for gnt-instance list, which uses this option, and for name-only queries (e.g. QueryNodes(fields=["names"])), all other callers are setting this flag to True - RAPI also sets the flag to True The patch was tested with a continuous (0.2s sleep in-between) gnt-instance list during a burnin, and no problems were observed. Reviewed-by: ultrotter
-
- Jan 21, 2009
-
-
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
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
-
- Jan 20, 2009
-
-
Iustin Pop authored
(this is related to the master daemon log) Currently it's not possible to follow (in the non-debug runs) the logical execution thread of jobs. This is due to the fact that we don't log the thread name (so we lose the association of log messages to jobs) and we don't log the start/stop of job and opcode execution. This patch adds a new parameter to utils.SetupLogging that enables thread name logging, and promotes some log entries from debug to info. With this applied, it's easier to understand which log messages relate to which jobs/opcodes. The patch also moves the "INFO client closed connection" entry to debug level, since it's not a very informative log entry. Reviewed-by: ultrotter
-
- Jan 13, 2009
-
-
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
Reviewed-by: imsnah
-
- Jan 09, 2009
-
-
Iustin Pop authored
The current fork+close fds sequence has deficiencies which are hard to work around: - logging can start logging before we fork (e.g. if we need to emit messages related to master checking), and thus use FDs which we can't track nicely - the queue locks the queue file, and again this fd needs to be kept open which is hard from the main loop (and this error is currently hidden by the fact that we don't log it) Given the above, it's much simpler, in case we will fork later, to close file descriptors right at the beginning of the program, and in Daemonize only close/reopen the stdin/out/err fds. In addition, we also close() the handlers we remove in SetupLogging so that the cleanup is more thorough. Reviewed-by: imsnah
-
- Jan 08, 2009
-
-
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
-
- Jan 07, 2009
-
-
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
-
- Jan 06, 2009
-
-
Iustin Pop authored
Two bad indentation cases and a missing variable. Reviewed-by: imsnah
-
- Dec 19, 2008
-
-
Michael Hanselmann authored
Passwords are stored in "$localstatedir/lib/ganeti/rapi_users". User options specify the access permissions of a user (see docstring for ganeti.http.ReadPasswordFile), for which only "write" is supported to grant write access. Every other user has read-only access. Reviewed-by: amishchenko
-
Michael Hanselmann authored
This will be used to evaluate access permissions to resources. Reviewed-by: amishchenko
-
- Dec 18, 2008
-
-
Michael Hanselmann authored
Reviewed-by: ultrotter
-
Michael Hanselmann authored
With a large job queue, auto-archiving jobs can take a very long time, causing timeouts on the luxi RPC layer. With this change, auto- archive returns after half of the RPC timeout has passed. The user will see how many jobs are left unchecked. Reviewed-by: ultrotter
-
- Dec 11, 2008
-
-
Iustin Pop authored
This patch should fix all outstanding epydoc parsing errors; as such, we switch epydoc into verbose mode so that any new errors will be visible. Reviewed-by: imsnah
-
- Dec 05, 2008
-
-
Iustin Pop authored
This patch adds a simple rpc which makes a backup of the config file and then removes it. This is done so that cluster verify doesn't complain immediately after demoting a node. Reviewed-by: imsnah
-
Iustin Pop authored
This patch changes the LUQueryInstances to show a different state for offline nodes and also modifies the watcher to understand the offline state in its checks. Reviewed-by: ultrotter
-
- Dec 04, 2008
-
-
Michael Hanselmann authored
Reviewed-by: amishchenko
-
Michael Hanselmann authored
Reviewed-by: amishchenko
-
Michael Hanselmann authored
It should be consistent. Reviewed-by: amishchenko
-
- Dec 02, 2008
-
-
Iustin Pop authored
The ssconf files were not updated by the master failover. We need to push them, and since we already have RPC initialized, we can use the standard ConfigWriter to do so - this will take care of both the config file and the ssconf files. Reviewed-by: imsnah
-
- Nov 26, 2008
-
-
Guido Trotter authored
Since we're not sure ganeti-noded has started yet, we need to create RUN_GANETI_DIR before SOCKET_DIR as well, with the proper permissions. Reviewed-by: imsnah
-
Guido Trotter authored
ganeti-noded used to create all directories under /var/run with an hard-coded mode. convert it to a constant. Reviewed-by: imsnah
-