- Nov 29, 2010
-
-
Michael Hanselmann authored
Dictionaries are hard to encode into query strings, therefore the “/2/instances/[instance_name]/reinstall” resource is changed to accept its parameters via the request body. The old query string parameters are still accepted for backwards compatibility. To allow clients to detect whether a server supports the new body parameters, a new feature string is added to the “/2/features” resource. Some people might not like this, but it reuses existing functionality. The RAPI client and its unittests are updated. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This reverts commit fd7f5b41. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This reverts commit cb1ef973. QA was broken by this commit. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This reduces the number of notifications in “ganeti-rapi”. Until now it was notified for every change in …/lib/ganeti and had to check whether the users file was affected. A symlink is always created in cfgupgrade to not break tools referring to the old name. 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 source cluster has to shut down an instance before it can be exported. Doing so can take a while, but the default connection timeout is only 60 seconds. Adding the shutdown timeout on the receiving cluster should help. 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
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Nov 28, 2010
-
-
Iustin Pop authored
Thanks Balasz! Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
I have found a few regexes which are static and thus can be moved to load time, rather than run time, creation. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Nov 27, 2010
-
-
Iustin Pop authored
While git-am'ing the blockdev_prefix patch, I modified the hv_xen.py file but forgot to amend the patch :(, so here it is. Furthermore, to detect such inconsistencies in the future, a unittest is added that cross-checks the default parameters in constants.py and the hypervisor PARAMETERS dict. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Maciej Bliziński authored
Allows to install Red Hat based systems, for example Oracle Linux. Tested with OEL. The hypervisor by default offers a device named 'sda'. If the SCSI module is already loaded, the disk device can't be created due to naming conflict, and the disk is not available. A workaround is to modify the initrd by removing the scsi driver from it. This helps, but doesn't allow to install the OS. Red Hat's installer, anaconda, runs parted, which tries to execute a check against /dev/sda and fails. This makes anaconda think that the disk is faulty, and not available. The best way to work around this, is to declare 'xvda' as the xen disk device. Red Hat version of parted package contains a patch which makes parted skip the SCSI test if device name starts with 'xvd'. This patch allows to pass -H xen-pvm:blockdev_prefix="xvd" and successfully run the Red Hat installer. Signed-off-by:
Maciej Bliziński <blizinski@google.com> [iustin@google.com: added the new parameter to XenHvm PARAMS] Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 26, 2010
-
-
Iustin Pop authored
Currently, the call_node_info RPC does always check both the VG free space and the hypervisor information. However, in ⅔ of the uses, we only care about one or the other. Therefore, we change it so that if any of the passed parameters is None, we don't perform the respective check. We also modify its callers to only pass in what they need. This also helps if the "default" hypervisor is broken and we want to create an instance for another hypervisor. With this patch, the duration of this rpc changes from 500ms to 90ms for a normal LVM+Xen PVM node, when we only require the LVM data; when we only require the hypervisor data, it doesn't change (as the “xm list” time is dominant). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This only tries to upload the ssh_known_hosts_file to the online nodes, eliminating a timeout and warning for offline nodes. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
In the previous patch where I modified LUSetNodeParams to take ndparams into account I missed this additional check of parameters in the Logical Unit. This patch adds ndparams to the recognized parameter lists which has to be filled out if nothing else is. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 25, 2010
-
-
Iustin Pop authored
Since we now have just two possibilities (plaint to drbd or drbd to plain), we can assume (+an assert) that we come from LVM and access directly logical_id[0] for the VG on which it is stored. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Dmitry Chernyak authored
Was substituted by _CheckNodesFreeDiskPerVG. Signed-off-by:
Dmitry Chernyak <dmi.chernyak@gmail.com> Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Dmitry Chernyak authored
Also should work disk growing, instance moving and prerequisite checks. Signed-off-by:
Dmitry Chernyak <dmi.chernyak@gmail.com> [iustin@google.com: small style fixes] Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Dmitry Chernyak authored
Implemented _CheckNodesFreeDiskPerVG and _ComputeDiskSizePerVG functions for VG-aware iterations. Signed-off-by:
Dmitry Chernyak <dmi.chernyak@gmail.com> [iustin@google.com: some style fixes (long lines, etc.)] Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Dmitry Chernyak authored
Added "vg" argument to the "gnt-instance ... --disk" syntax specification. Now is ok to write: gnt-instance add ... --disk N:size=NNg,vg=VG_NAME ... But not all internal structures are ready to handle this yet. Signed-off-by:
Dmitry Chernyak <dmi.chernyak@gmail.com> [iustin@google.com: removed changes to design-2.0.rst] Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 24, 2010
-
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Nov 23, 2010
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Dmitry Chernyak authored
Extend allocation functions to be aware of different vg names. Suppose, vg_name is helded in disk.physical_id[0] (already was) LUCreateInstance is modified to be aware of new "vg" argument of the disk specification. cfg.GetVGName() will only be used when no VG is specified. The "add" and "remove" for plain and drbd instances should be correct. The "move" for plain instance should be correct. Signed-off-by:
Dmitry Chernyak <dmi.chernyak@gmail.com> [iustin@google.com: fixed missing parameters in two cases and tabs] Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Lance Albertson authored
Signed-off-by:
Lance Albertson <ramereth@gmail.com> Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
There are two issues: first, it's simpler to assign directly to pt instead of via another local variable. Second, this code doesn't make sense: if lt < 0: break pt = max(0, lt) If lt is indeed < 0, then the code will break. Otherwise, lt ≥ 0, and max(0, lt) will always be equal to lt. So we remove the extra assignment. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This patch makes a simple timeout test (e.g. testTimeoutKill) go from 13K poll syscalls to just 6. The code didn't take into account that RunningTimeout talks in seconds while the poller object expects milliseconds. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Nov 22, 2010
-
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Nov 19, 2010
-
-
René Nussbaumer authored
Further investigations have to be done for merging some of these bits together with import-export daemon which uses similiar logic. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Nov 18, 2010
-
-
Iustin Pop authored
Currently, reinstallation of a DRBD instance with the secondary node offline does: node1# gnt-instance reinstall -f instance1 Waiting for job 139053 for instance1... Thu Nov 18 01:36:09 2010 - WARNING: Could not prepare block device disk/0 on node node3 (is_primary=False, pass=1): Node is marked offline Thu Nov 18 01:36:09 2010 - WARNING: Could not shutdown block device disk/0 on node node3: Node is marked offline Job 139053 for instance1 has failed: Failure: command execution error: Disk consistency error Since this fails anyway, let's check the secondary nodes, thus preventing any modifications to the instance (e.g. OS type change): node1# gnt-instance reinstall -f instance1 Waiting for job 139058 for instance1... Job 139058 for instance1 has failed: Failure: prerequisites not met for this operation: error type: wrong_state, error details: Instance secondary node offline, cannot reinstall: node3 The patch needs modifications to the _CheckNodeOnline function, in order to display meaningful messages ("Can't use offline node" would be very confusing for an instance reinstall, since we didn't select a node manually). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
I was using the feedback_fn function incorrectly (it doesn't automatically expand the arguments). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Nov 17, 2010
-
-
Iustin Pop authored
Since the contents of the dict is validated via the ForceDictType, we can simply require that it is a dict here. The previous check was wrong, as it was copied from the HV checks (which also doesn't verify the leaf dict type). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Nov 16, 2010
-
-
René Nussbaumer authored
As we need this functionality in other places than just locking it makes sense to move it to utils rather than keeping it in locking Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-