- Dec 20, 2012
-
-
Constantinos Venetsanopoulos authored
Add support for passing parameters to the ext template (ext-params). Take advantage of disk-params, that don't seem to make much sense in this template (ExtStorage Providers are not predefined and we don't know their needs) and use them to pass the ext-params dynamically to the template. ext-params are correlated with gnt-os-interface's os-params. All ext-params are exported to the ExtStorage Provider through it's environment, with variables prefixed with 'EXTP_' (similarly to the OS interface's 'OSP_' params). ext-params are passed via the --disk option. If the disk template is of type `ext', then any additional options passed to --disk and are not in IDISK_PARAMS are considered ext-params e.g.: gnt-instance add -t ext --disk=0:size=2G,param1=value1,param2=value2 Finally, we introduce a new IDISK_PARAM called IDISK_PROVIDER, that is mandatory for template `ext' and is used to select the desired ExtStorage Provider. This parameter is not a valid --disk option for any other template type. The IDISK_PROVIDER parameter becomes the first element of the disk's unique_id tuple e.g.: unique_id = ('sample_provider1', 'UUID.ext.diskX') Example selecting different ExtStorage Providers for each disk and passing different ext-params to them: -t ext --disk=0:size=2G,provider=sample_provider1,param1=value1 --disk=1:size=3G,provider=sample_provider2,param2=value2 Signed-off-by:
Constantinos Venetsanopoulos <cven@grnet.gr> Signed-off-by:
Iustin Pop <iustin@google.com> [iustin@google.com: small simplification in bdev code, pylint fixes] Reviewed-by:
Iustin Pop <iustin@google.com>
-
Constantinos Venetsanopoulos authored
With this commit we introduce the External Storage Interface to Ganeti, abbreviated: ExtStorage Interface. The ExtStorage Interface provides Ganeti with the ability to interact with externally connected shared storage pools, visible by all VM-capable nodes. This means that Ganeti is able to handle VM disks that reside inside a NAS/SAN or any distributed block storage provider. The ExtStorage Interface provides a clear API, heavily inspired by the gnt-os-interface API, that can be used by storage vendors or sysadmins to write simple ExtStorage Providers (correlated to gnt-os-interface's OS Definitions). Those Providers will glue externally attached shared storage with Ganeti, without the need of preprovisioned block devices on Ganeti VM-capable nodes as confined be the current `blockdev' disk template. To do so, we implement a new disk template called `ext' (of type DTS_EXT_MIRROR) that passes control to externally provided scripts (the ExtStorage Provider) for the template's basic functions: create / attach / detach / remove / grow The scripts reside under ES_SEARCH_PATH (correlated to OS_SEARCH_PATH) and only one ExtStorage Provider is supported called `ext'. The disk's logical id is the tuple ('ext', UUID.ext.diskX), where UUID is generated as in disk template `plain' and X is the disk's index. Signed-off-by:
Constantinos Venetsanopoulos <cven@grnet.gr> Signed-off-by:
Iustin Pop <iustin@google.com> [iustin@google.com: small simplification in bdev code, pylint fixes] Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Addresses issue 145. When daemons are still running from a previous cluster instance, starting the daemons again will fail. “ConfigWriter.IsCluster” only looks at the configuration file, which could already have been deleted. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Helga Velroyen authored
The networks field of the node groups class is a dictionary of nic params and not a list of networks. This should fix the broken QA. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Constantinos Venetsanopoulos authored
Update the shared storage design document to reflect the current changes, after the implementation of the ExtStorage interface. Signed-off-by:
Constantinos Venetsanopoulos <cven@grnet.gr> Signed-off-by:
Iustin Pop <iustin@google.com> [iustin@google.com: small style fixes] Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Addresses issue 147. Only the hostnames resolved using “netutils.Hostname($name)” were normalized, but those returned by the class method “GetSysName” weren't. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
By abstracting the command/personality formatting, we can easily switch htools to the same output as the rest of the commands. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Error message formatting, else/if merging to elif, docstrings. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Some rewording, some clarifications, and a new item on opportunistic locking. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
If opportunistic locking is requested in the opcode, but no iallocator is used (not specified or no default), an error will be raised. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
- Dec 19, 2012
-
-
Michael Hanselmann authored
If, for one reason or another, a module named "ganeti.ganeti" can be succesfully imported (e.g. through a symlink in the wrong place), error which are diffcult to debug can occur. This piece of code tests for the unlikely case of that happening. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This is highly incomplete, as per the manpage BUGS section. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This is a new personality that for the moment doesn't do anything. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
The previous patch series made it simpler to deal with ERROR_up offline instances, but didn't fix qa, that had the old expectations. This fixes that, and adds more testing about the expected behavior. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Currently gnt-instance shutdown --force of an offline instance resets the offline status. Which of course is bad and completely unintended. Fix. (caught by the new qa tests) Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently, most network LUs simply use EINVAL instead of correct error codes; this patch tries to adjust the obvious cases. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
The code can loop directly over “self.wanted”, saving a lookup. An explicit loop is also replaced with a generator. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
LUNetworkConnect and LUNetworkDisconnect had very similar code to detect conflicts between instance's network interfaces and networks. This code factorizes the common part and does some cleanup: - Remove single-letter variable for lambda (“l”) - Don't repeat instance name in warning output - Fixed error messages to match style guide Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
The style guide says to use “import foo”-style imports, not “from foo import bar” unless it's a Ganeti module. There are some places with exceptions, but this one certainly isn't warranted. Also fix the import order. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Also do some minor code re-formatting. 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
This was not only copied for the networking fields in commit 306bed0e, but commit cfcea7ef fixed wrongly ordered parameters and didn't fix the original. Either way, this patch merges the two cases again. The newly added function is already tested through the tests for _GetLiveNodeField. 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
This makes entering the command easier. 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 list of query fields can be automatically generated. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
They should be in the same style as other descriptions. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This is not a trivial s/frozenset/compat.UniqueFrozenset/, but rather only replaces “frozenset” where appropriate. Most of the places are “static” information that doesn't change after the module has been loaded. Some docstrings and code formatting (e.g. empty lines) issues are addressed as well. Some lines got too long and were wrapped. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Helga Velroyen authored
Small renaming to make the test more readable. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Helga Velroyen authored
This creates a number of node groups with up to 3 networks, serializes them and compares them with their python equvalents. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Helga Velroyen authored
This adds a network field to the NIC params and a list of networks to the node group type. It adjusts the nodegroup's unit tests accordingly. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Helga Velroyen authored
Networks will be properties of NicParams and NodeGroups. Therefore they need to be defined before those. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
This patch removes code which is no longer used due to refactoring: - http.InitSsl, last usage removed in commit 33231500 (“Convert RPC client to PycURL”) - rapi.baserlib.MakeParamsDict, last usage remove in commit 4e5a68f8 (“RAPI: rlib1 removal”) - rapi.baserlib.ExtractField, last usage removed in commit 028c6b76 (“RAPI:Fix root list and unittest for it.”) - qa.qa_utils.AssertNotEqual, last real usage removed in commit 2f4b4f78 (“Simplify QA commands”) (but it was still imported for a while, until we extended pylint to run over the QA code as well) - qlang._IsHostname, added in commit f8638e28 (“Detect globbing patterns as query arguments”) but never used - cmdlib._BuildNetworkHookEnvByObject, last usage removed in commit f22433c0 (“Locking related fixes for networks”) - NLD constants, which are obsolete—the nbma project is no longer maintained and it's not working with current ganeti Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch is enabling split queries for jobs for gnt-node and rapi access (only for job listing, not job waiting). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
This shouldn't live in the main Query module, since it's too node specific. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
This adds support for job queries, including (basic) unit-tests. I've tested this for memory and cpu usage as follows: - 3600 jobs (live queue): - via masterd, default: ~1.1s (masterd: ~60MB ram) - via confd, default: ~1.1s (hconfd: ~25MB ram) - via masterd, id only: ~1.0s (masterd: ~57MB ram) - via confd, id only: ~0.2s (hconfd: ~15MB ram) - all jobs (128K in total, around 570MB size on disk): - via masterd, default: 1m22s (masterd cpu: 48s), masterd: 1.4G ram - via confd, default: 1m16s (hconfd cpu: 51s), hconfd: 570MB ram peak (peak only right before starting luxi send, hconfd decreases in RSS as results are streamed over luxi, back to ~18MB after the send) - via masterd, id only: ~49s (masterd cpu: 45s), masterd: 1.3G ram - via confd, id only: ~39s (hconfd cpu: 35s), hconfd: 110MB ram peak (right before luxi send, decreasing as results are sent, back to ~14MB after the send) Given this, and that in production it's not likely to have hundreds of thousand of job files, I believe the implementation is safe from this point of view. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
This is required for QueryJobs implementation; we change makeSimpleFilter to support both string and integers as names. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
This patch adds implementation for a read-only job queue module, together with "full" test (as full as can be in a lazy language…). One note about the behaviour of the job queue is the handling of opcodes that fail validation: the 'input' opcode actually is a meta-type, which can hold either a real opcode or a plain JSValue, so that we can still load jobs with invalid opcodes for querying. The only downside of this is that, as opposed to Python code, we can't show the correct summary for such an opcode - we try to parse the OP_ID but not the extended OP_DSC_FIELD-equivalent. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
I am very very unhappy with this patch. We have to do this, in order to be compatible with the Python code and behaviour, but there's lots of duplication; both the Python and the Haskell code will need to be cleaned up and simplified (we don't need QFF_* at all). For now though, this implements QffTimestamp and associated code. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Bernardo Dal Seno authored
Unit tests updated and expanded with an inheritance check. The flag has no effect yet. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-