- Jan 21, 2011
-
-
René Nussbaumer authored
This patch renames QRFS_* to RS_* fields so they can be used in other places (i.e. LUs) without confusion, as this was initially meant for query operations. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jan 20, 2011
-
-
René Nussbaumer authored
This is just a plain stupid and simple out-of-band helper without anything fancy. It uses plain ssh to power off / power cycle the machine, does not support power on. It support power status using fping to check if the host replies. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jan 18, 2011
-
-
Michael Hanselmann authored
This was missing from commit 7385c51d. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This will detect human errors when setting a release date in NEWS. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
This patch exposes the VTYPE kind of BE/HV parameters, instead of returning QFT_OTHER. The current situation makes a query like: gnt-instance list -o name,be/memory,oper_ram very strange looking. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
If a HV parameter is required that does not apply for an instance, currently the code returns None. This is bad, as it means we cannot switch to the actual HV parameter types and validate correctly this field. This patch changes it so that in this case we return QRFS_UNAVAIL; ideally we would use a NOT_APPROPRIATE or similar field, but UNAVAIL is good enough (the call cannot fail in another way). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently, the single assert just checks that the entire row is consistent (true/false), and dumps the row and field definitions as an accompanying message. This makes it very hard to understand what failed. This patch changes this validation to show descriptive messages, which makes it much faster in diagnosing invalid result. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
The conversion to querylib introduced unique field titles, which however did an inconsistent rename of the instance vcpus/memory fields. This patch makes both BE_MEMORY and _VCPUS be named with prefix “Config” (which before was “Configured_”), and drops the “Runtime” (note no underscore) prefix on the oper_ ones. Rationale: for numeric fields, the width of the title defines the width of the columns, as the numbers are usually small. Hence these columns (more likely used than the BE ones) would be very wide, leading to a not-so-nice display. I happened upon this when my terminals didn't manage to fit a gnt-instance list anymore. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
While looking at the query library, I realized that while we have five field statuses, making this a 5-dimensional space, four of them are shrunk to a single possible value (None). Hence it should be possible to convert this into a single value space plus extra 4 special constants. This patch implements this, making (IMHO) the return value of normal functions much simpler: you simply return the desired value, instead of (QRFS_NORMAL, value); for the special results, you simply return _FS_UNAVAIL, instead of (QRFS_UNAVAIL, None). This I believe does simplify the code. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently, the QRFT/QFT constants are used with the module (e.g. constants.QRFS_NORMAL) in the query library. Given that there are 176 uses of these constants in a module that has roughly ~1200 lines in total (including whitespace), it makes sense to import these directly to improve readability. This patch does this and (IMHO) it does indeed make the code more to the point; the entire query library is about queries, so using these constants directly doesn't cause any misunderstandings. Note: the epydoc links are not changed, since we want the generated docs to point to the right place. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This shouldn't normally happen, but if it does no need to fail. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Apollon Oikonomopoulos authored
This patch introduces network configuration for KVM in Ganeti. There are three problems with having KVM perform network configuration via ifup scripts: a) Ganeti never gets to know the tap interface that is associated with an instance's NIC b) Migration of routed instances will cause network problems because the incoming KVM side configures the network as soon as it is spawned and not as soon as the migration finishes. This means that all routing configuration will be present in both, primary and secondary, nodes at the same time, possibly causing network disruption during the migration. c) We never get to know if the network configuration succeeded or not. This patch moves network configuration from KVM to Ganeti, using KVM's ability to receive already open tap devices as file descriptors. _WriteNetScript is removed from hv_kvm.py, together with its unit tests. Minor modifications are made to _ExecKVMRuntime to handle tap device initialization. NIC <-> tap associations are stored under a new directory, _ROOT_DIR/nic in a file-per-nic fashion. The end-user semantics remain the same: The user can override the network configuration by providing _KVM_NET_SCRIPT. If this is not present or executable, the default constants.KVM_IFUP script is run. Signed-off-by:
Apollon Oikonomopoulos <apollon@noc.grnet.gr> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Apollon Oikonomopoulos authored
In order to retain backwards compatibility, we ship the shell script previously generated by _WriteNetScript as a stand-alone script under PKGLIBDIR. Signed-off-by:
Apollon Oikonomopoulos <apollon@noc.grnet.gr> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Apollon Oikonomopoulos authored
Add two new functions, _OpenTap and _ProbeTapVnetHdr, to hypervisors.hv_kvm. _ProbeTapVnetHdr checks if the host kernel supports the virtio net header (IFF_VNET_HDR) feature. This feature allows KVM to ask the the host kernel to perform checksumming and segmentation offload of the data passing through a guest's virtio NIC, using a special header[1] prepended to data sent through the tap interface. A qemu-kvm version later than 0.12 is required for this feature to work. _OpenTap opens a new tap device suitable for use with qemu-kvm's "-net tap,fd=n" option. It also enables vnet_hdr support if requested and safe to do so. [1] struct virtio_net_hdr in include/linux/virtio_net.h Signed-off-by:
Apollon Oikonomopoulos <apollon@noc.grnet.gr> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
This way we can add there non-python scripts Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
The removal requires adding a few pylint ignores, as it cannot know that OP_ID will be defined at runtime. Also switch the asserts to check for non-declaration. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
As the class names should be now consistent with the OP_IDs, we add a check for wrongly-defined OP_IDs. However, the future removal of the hand-coded OP_IDs will render this obsolete, so this check is introduced just to make sure that the previous renaming patches did the right job, and it will then be removed. The consistency checks require renaming the test opcodes, which were using arbitrary names, depending on test author. They are now all standardized on OpTest (local scope). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-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:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-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:
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:
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:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-