- Nov 29, 2010
-
-
Michael Hanselmann authored
After moving the users file to a directory, we must ensure the directory exists. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
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>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently, 95% of the QA commands are executed in the same way: on the master, based on a command list and with expectancies for succes: AssertEqual(StartSSH(master['primary'], utils.ShellQuoteArgs(cmd)).wait(), 0) The rest 5% are variations on this theme (maybe the command needs to fail, or the node is different, etc.). Based on this, we can simplify the code significantly if we abstract the common theme into a new AssertCommand() function. This saves ~250 lines of code in the QA suite, around 8% of the entire QA code size. Additionally, the output was very cryptic before (the famous "QA error: 1 != 0" messages), whereas now we show a clear error message (node, command, exit code and failure mode). The patch replaces single quotes with double quotes in all the parts of the code that I touch; let me know if that's not OK… Signed-off-by:
Iustin Pop <iustin@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
This just a random collection of unittest improvements. Coverage increases from 73% to 76%. 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
Wrong file name in Makefile.am and wrong naming (.unittest vs _unittest). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
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
First change is to replace "range(len(self.NOTIFIERS)))" with self.NOTIFIERS, as range(len(range(N))) ≡ range(N). Sencond change is switch from an explicit indexing to use of zip. Unittests still pass :) 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
-
-
Iustin Pop authored
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
Currently, the coverage reports include the unittests themselves, and this skewes unfairly the reports, as the coverage for the tests is very high (since they all run). To fix this, we export the ganeti temp dir from run-in-temp-dir, and we use that to exclude the tests directory. The patch also fixes a but related to multiple directories to be omitted (--omit a --omit b is wrong, it needs to be --omit a,b). 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>
-
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>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
While starting to implement this, I found a number of deficiencies: - Drop regular expressions. As it turned out, only very few fields for instances used them, all of which can easily be turned into static field names. - Use two separate calls with a request and response description each. - Add forgotten list of fields to query request. - Add value status for case where a field is not available for an item, e.g. NIC 3 for an instance with only one network interface. - Add "timestamp" field type. - Updated examples. 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>
-