- Mar 31, 2008
-
-
Manuel Franceschini authored
This patch does two things: - Remove "vg_name" from _OP_REQP due to the introduction of --no-lvm-storage. Since vg_name option has as default now None and is only set to the DEFAULT_VG if lvm_storage is enabled, this is needed - It changes LUInitCluster.CheckPrereq() to skip _HasValidVG check initializing the cluster with --no-lvm-storage. Furthermore it adds to the help message the statement of the possibility to use --no-lvm-storage if no 'xenvg' volume group is found. Reviewed-by: iustinp
-
Manuel Franceschini authored
Add LUSetClusterParams, which is the LU to modify cluster options. This includes checks: - not to disable lvm storage when it's already disabled - not to enable lvm storage when it is already enabled - not to disable lvm when lvm-based instances are present - that the specified volume group is valid on all cluster-nodes when lvm-storage is going to be enabled Reviewed-by: iustinp
-
Manuel Franceschini authored
Reviewed-by: iustinp
-
Manuel Franceschini authored
This adds a check to fail instance creation if lvm-storage is disabled (cluster-wide). If lvm-storage is disabled (by initializing the cluster with --no-lvm-storage) only instances with disk template in frozenset DTS_NOT_LVM are allowed to create. Reviewed-by: iustinp
-
Manuel Franceschini authored
DTS_NOT_LVM: This constant is needed when checking if an instance can be created with the given disk template if no lvm-storage is available, i.e. the ganeti cluster does not have a volume group DEFAULT_VG: 'xenvg' has been hardcoded before. Reviewed-by: iustinp
-
- Mar 30, 2008
-
-
Iustin Pop authored
In the start and stop instance LUs, the configuration update is done right at the end. This means that if, for example, the instance shutdown succeeds, but the drive deactivation fails, the next run of the watcher will start the instance again, as it's still marked in running mode. This patch changes these two LUs so that first the update the configuration to the desired state, and only then we proceed to update the config. This ensures that the state saved is the desired state. Because the config might be updated even though the LU failed, this patch also modifies the mcpu.Processor.ExecOpCode method to run the RunConfigUpdate hook in a finally: phase while the lu.Exec is done in its try phase. This ensures that config update hooks (tries to) run at all times when the config is updated. Reviewed-by: schreiberal
-
- Mar 27, 2008
-
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
- Mar 25, 2008
-
-
Manuel Franceschini authored
Reviewed-by: iustinp
-
Manuel Franceschini authored
Reviewed-by: iustinp
-
Iustin Pop authored
This patch removes the options that allow to create local_raid1 or remote_raid1 instances. It also modifies the documentation and removes these disk templates from burnin and from qa. Reviewed-by: imsnah
-
Iustin Pop authored
These two operations are related to md/drbd7 code (remote_raid1). Remove them as part of the md/drbd7 removal. Reviewed-by: imsnah
-
- Mar 20, 2008
-
-
Manuel Franceschini authored
This patch adds three things: - it normalizes the file storage directory path passed to gnt-cluster init - if the file-storage-path doesn't exist on the master node, ganeti tries to create it - adds additional check if the passed file-storage-dir is not a directory Reviewed-by: iustinp
-
Iustin Pop authored
The BlockDev.GetStatus() method and some associated constants were never used in the rest of the code. This patch removes them. Reviewed-by: imsnah
-
- Mar 19, 2008
-
-
Iustin Pop authored
This patch adds a new top-level class (BaseJO) that is used for both opcodes and a new Job class. This new class and the related changes to the OpCode abstract class are used to implement simple to-dict/from-dict transformations, so that we can easily serialize the classes using json. Reviewed-by: imsnah
-
Manuel Franceschini authored
Author: manuel.franceschini Reviewed-by: iustinp
-
Manuel Franceschini authored
Author: manuel.franceschini Reviewed-by: iustinp
-
Manuel Franceschini authored
Author: manuel.franceschini Reviewed-by: iustinp
-
Manuel Franceschini authored
Author: manuel.franceschini Reviewed-by: iustinp
-
Manuel Franceschini authored
Author: manuel.franceschini Reviewed-by: iustinp
-
- Mar 18, 2008
-
-
Michael Hanselmann authored
Reviewed-by: ultrotter
-
Michael Hanselmann authored
This replaces very old code. Reviewed-by: ultrotter
-
Michael Hanselmann authored
Reviewed-by: ultrotter
-
Michael Hanselmann authored
Reviewed-by: ultrotter
-
Michael Hanselmann authored
This allows callers to allocate a pseudo-TTY easily. Reviewed-by: ultrotter
-
Michael Hanselmann authored
Reviewed-by: ultrotter
-
Michael Hanselmann authored
This renames some functions and does some minor codestyle cleanup. Reviewed-by: ultrotter
-
Michael Hanselmann authored
The whole Ganeti cluster has a single SSH key. Its fingerprint is written to Ganeti's known_hosts file, together with an alias. This allows us to always use that alias instead of the real hostname, making management of the known_hosts file much easier. This patch does not handle an upgrade from an earlier version. Reviewed-by: ultrotter
-
Guido Trotter authored
Reviewed-by: imsnah
-
Guido Trotter authored
Previously if a shared thread was notified, together with the rest, and was not fast enough in waking up and acquiring the lock, another one could release it, decide there were no more sharers, and let an exclusive one in instead. With this patch we make sure all the shared holders which were waiting have passed, before declaring it's time to make an exclusive one pass. This also allows us to reintroduce a slight variation of the assertion removed in r665, which makes our code safer. Reviewed-by: imsnah
-
- Mar 11, 2008
-
-
Iustin Pop authored
Make the cluster init fail if the IP to which the cluster name resolved is already reachable by the master node. This is not a foolproof solution, but it allows a cheap method of detecting simple mistakes. It will also disallow using the master node name as cluster name (which is something good). The only drawbacks that I see are: - you are not allowed to do this, which might come in handy in cluster upgrades; but since we support rename, this is mitigated - cluster init takes longer now (+the timeout value, set to 5 seconds), but since this is a one-off operation, it should be ok Reviewed-by: ultrotter
-
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
-
- Mar 05, 2008
-
-
Michael Hanselmann authored
Reviewed-by: ultrotter
-
Michael Hanselmann authored
Reviewed-by: ultrotter
-
- Mar 04, 2008
-
-
Guido Trotter authored
A LockSet is mostly useful when it has some locks in it. On the other hand there are cases in which it must function even when empty. For example if a cluster has no instances in it there's no reason why locking all of them shouldn't work anyway. This patch adds test code for that situation and implements the necessary fixes to make it work. Reviewed-by: imsnah
-
Guido Trotter authored
Reviewed-by: imsnah
-
Guido Trotter authored
r644 contained some cleanup code for LockSet. Among other things it removed a syntax error that allowed an assertion that previously wan't really checked to trigger. It turns out that even though the spirit of that assertion was correct its actual implementation was wrong. While it's true that no sharers must be waiting if an exclusive holder is not present it might happen that when all the sharers wake up one of them releases the lock before some other even has had a chance to run. In this case __shr_wait would still be greater than 0, even if the sharer is not actually waiting, just pending a wakeup to proceed. Thus, removing the assertion in question. Reviewed-by: imsnah
-
Michael Hanselmann authored
Reviewed-by: ultrotter
-
Guido Trotter authored
This new functionality makes it possible to acquire a whole set, by passing "None" to the acquire() function as the list of elements. This will avoid new additions to the set, and then acquire all the current elements. The list of all elements acquired will be returned at the end. Deletions can still happen during the acquire process and we'll deal with it by just skipping the deleted elements: it's effectively as if they were deleted before we called the function. After we've finished though we hold all the elements, so no more deletes can be performed before we release them. Any call to release() will then first of all release the "set-level" lock if we're holding it, and then all or some of the locks we have. Some new tests checks that this feature works as intended. Reviewed-by: imsnah
-
Guido Trotter authored
This patch adds a try/except area around most of the acquire() code (everything after the intial condition checks). Since the except: clause contains just a 'raise' nothing really changes except the indentation of the code. This is done in a separate commit to insulate and make clearer what the real code changes done in the upcoming patch are. Reviewed-by: imsnah
-
Guido Trotter authored
Previously the private version of the __names function returned directly a set. We'll keep this in the public interface but change the private version to a list in order to be able to sort() its result and then loop on it, even though we'll need to do this with the usual care that some keys may disappear in between. Reviewed-by: imsnah
-