- Mar 18, 2010
-
-
Guido Trotter authored
All non-oneliner functions, after this patch, have their docstring. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Just a few queries are checked, but this should give us confidence that at least the basic confd framework is working properly. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This function allows receiving socket data synchronously. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
- Rename WaitForSocketCondition to SingleWaitForFdCondition - Avoid potentially infinite loop, if we continue to get interrupted - Handle eintr correctly - Avoid the poller try/finally, as the poller object gets destroyed anyway - Provide a new WaitForFdCondition - Using retry, guarantee to continue checking until the timeout expires - Needs an extra helper class, as it uses retry in a very custom way (no sleep happens, because the poller sleeps by itself) Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
This new confd callback counts received replies for the registered queries. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
By sending requests with async=False, and receiving replies with ReceiveReply we can more easily use confd from a synchronous client. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
@keyword was used inappropriately. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
This basically implements read handling, without catching all exceptions. When using the socket in synchronous mode, it's useful to avoid losing exception data (which, in an async daemon, can only be logged) Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
If any or all are already defined (because we're using a new version of python) just link them inside "utils" rather than redefining them. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Mar 17, 2010
-
-
Michael Hanselmann authored
- Pass keyword parameter as such - Replace “not x == y” with “x != y” Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
This patch introduces the option “--use-replication-network” for the cluster copyfile functionality, which is useful if the primary and secondary network are significantly different (see issue 32). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch allows GetOnlineNodes to return the secondary IPs instead of the node names, and to provide filtering of the master node (required to be done in this function in case we return the secondary IPs). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This is a simple patch that adds the no-install mode for instance creation, allowing import from foreign source of the actual OS (instead of requiring the preparation of data in a form expected by the import scripts). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch modifies LUSetInstanceParms to allow OS name changes, without reinstallation, in case an OS gets renamed on-disk. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch moves the node-has-os checks to a separate function. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Mar 16, 2010
-
-
Michael Hanselmann authored
- Report exception text immediately instead of just logging it - Remove leftover assertion from when it still used “gnt-cluster modify” Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
The current check on whether we require auto_promote or not is wrong, as we check whether we will have exactly the correct number of master candidates left. But it is fine if we have more (e.g. when CPS=10 and mc_remaning=19) than the current number, and in that case we shouldn't require auto promotion. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Mar 15, 2010
-
-
Michael Hanselmann authored
Currently, the ganeti-confd's HMAC key is called “cluster HMAC key” or simply “HMAC key” everywhere. With the implementation of inter-cluster instance moves, another HMAC key will be introduced for signing critical data. They can not be the same, so this patch clarifies the purpose of the “cluster HMAC key” by renaming it. The actual file name is not changed. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
To be consistent with RAPI_CERT_FILE, the rather generic named “SSL_CERT_FILE” constant is renamed to “NODED_CERT_FILE”. The actual file name is not changed. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
As described in issue 93, just saying ':' is not a valid char can be confusing. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
The new test depends on the drbd type tests being enabled, and test conversion to plain and back to drbd. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This is much simpler than the opposite, with fewer possibilities of failures. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch adds a new mode to instance modify, the changing of the disk template. For now only plain to drbd conversion is supported, and the new secondary node must be specified manually (no iallocator support). The procedure for conversion works as follows: - a completely new disk template is created, matching the count, size and mode of the instance's current disks - we create manually (not via _CreateDisks) all the missing volumes - we rename on the primary the LVs to the new name - we create manually the DRBD devices Failures during the creation of volumes will leave orphan volumes. Failure during the rename might leave some disks renamed and some not, leading to an inconsistent instance. Once the disks are renamed, we update the instance information and wait for resync. Any failures of the DRBD sync must be manually handled (like a normal failure, e.g. by running replace-disks, etc.). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Multiple LUs require that an instance is not running while they operate on the instance (reinstall, rename, modify, recreate disks, deactivate disks). The code to do this check is duplicate many times, and not very consistent (some use call_instance_list, some call_instance_info). The patch moves this check into a separate function that is then reused. The only drawback is that _SafeShutdowInstanceDisks now raises an OpPrereqError (even though it is run during Exec()), but this use case is fine (there are no other modifications in that Exec). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Both create instance and grow disk check the free disk space on nodes using the same, duplicate code. Since we'll need this in other places in the future, we abstract the check into a new function. The patch adjusts the error message to be more in-line with the one for memory checking, and fixes the exception raised for RPC errors. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This is a simple check, but we'll need it in multiple places. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This patch modifies the parsing of the “--disk” argument to instance create to accept “adopt” as a valid key, which builds the correct disk structure for OpCreateInstance. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This new mode, valid only for the plain template disk, allows creation of an instance based on existing logical volumes (preserving data), rather than creation of new volumes and OS creation. The new mode works as follows: - instead of size, all disks passed in must have an 'adopt' key, which signifies the LV name to be used - all disks must have this key, or neither should - we check the volume existence, and from the result we fill in the actual size - online (in-use) volumes are not allowed - 'stealing' of another's instance volumes is prevented via reservation of the LV names - during creation, we rename the logical volumes to the standard Ganeti format (based on UUID) Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This way, the parameters are available in CheckArguments too. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This patch adds an LV reservation manager to be used for LV names. Since we now have four such managers, we create a list for easier release. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
First, we don't need to check man pages at sed time, because this means everyone building the package will do - we only need to check at docbook time, which is mostly at developer time. Second, don't force LC_ALL to C, as this breaks newer man-db. I've verified and removing LC_ALL works fine across etch, hardy, lenny aid squeeze/sid. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Mar 12, 2010
-
-
Michael Hanselmann authored
Recent changes to “gnt-cluster verify” made it complain on expiring SSL certificates. While it was possible to replace the SSL certificates and other cluster secrets manually before, doing so was cumbersome. Cluster certificates, keys and secrets can now be replaced easily. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Replacing cluster certificates and keys requires all cluster daemons to be shut down. This might also be handy for the cluster merger tool, though the function might need a few more extensions. 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 code to generate cluster certificates, keys and secrets is currently spread over several places. It makes sense to move it to a separate function as we want to provide the user with the ability to automatically replace all cluster certificates and keys. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-