- Nov 29, 2010
-
-
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>
-
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>
-
Iustin Pop authored
Currently the test executes "/bin/sh -c 'trap "" TERM …" via the shell, which means we have two shells involved (the parent one and the child one, which does the trap). For some weird reason, this works for older OSes: the first shell exec's the second one, whereas on squeeze it forks and only then exec. This might be due to changes in Python or bash or whatever. In any case, the point is that this is a hacky way to call a shell, so we change this to simply execute the desired shell directly, without any intermediate shells (I don't understand why it was written as such originally). 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
-
-
Iustin Pop authored
* devel-2.3: Updates NEWS and configure.ac for 2.3.0~rc1 Update NEWS & configure.ac for the 2.2.2 release Fix documentation regarding conversion to drbd Fix documentation regarding conversion to drbd Reinstall instance: disallow offline secondaries QA: check that doubly modifying an OS state is OK Fix breakage in OS state modify QA: add tests for gnt-cluster modify -B LUSetClusterParms: fix validation of beparams Add unittests for TemporaryReservationManager TempReservationManager: Reserved() doesn't work Conflicts: man/gnt-instance.sgml (ported to the RST version) Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
make check < /dev/null breaks these tests. Until we have change RunCmd to override stdin, we need to remove them. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
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>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
* devel-2.2: Update NEWS & configure.ac for the 2.2.2 release Fix documentation regarding conversion to drbd Conflicts: NEWS (integrated 2.2 changes) configure.ac (kept our version) Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This imports the 2.1.8 NEWS entry and adds the 2.2.2 one, then updates the configure.ac version. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-