History | View | Annotate | Download (39.9 kB)
Merge branch 'stable-2.11' into master
Merge branch 'stable-2.10' into stable-2.11
Remove explicit reference to the query socket
Now that luxid's socket is the default socket anyway, do notpass the "query=True" parameter to GetClient. This will allowto get rid of this keyword argument, as masterd will go away.
Signed-off-by: Klaus Aehlig <aehlig@google.com>...
Merge branch 'stable-2.9' into stable-2.10
Add QA tests for RAPI multi-instance allocation
The instance multi-allocation had no tests to detect its breakage, andthis patch fixes that.
Signed-off-by: Hrvoje Ribicic <riba@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Fix multi-allocation RAPI method
The OpInstanceMultiAlloc that the instances-multi-alloc RAPI methoduses accepts a list of OpInstanceCreate opcodes rather than a list ofdictionaries as provided by the method. This patch correctly constructsthe opcodes, allowing the RAPI call to work as expected....
Merge branch 'stable-2.8' into stable-2.9
Improve backwards compatibility of Issue 649 fix
Commit e6e4ff4cf8d0100f331f94f7a27aa1e03a5d0e7d fixed Issue 649 by switching theseparator for usb_devices from comma to space. That solved the problem withthe command line, but RAPI was able to work with commas too, so, for backwards...
Merge branch 'stable-2.10' into master
Fix RAPI network tag handling
The network tags were absent from an if check used to actually listtags. The patch fixes the oversight, and adds a proper error message incase the issue occurs again for a new tag type.
Signed-off-by: Hrvoje Ribicic <riba@google.com>...
Instance queries: remove opcodes and LU
Removes the remains of the instance queries.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Hrvoje Ribicic <riba@google.com>
Export and network queries: remove opcodes and LUs
Removes the remains of the export (aka backup) and networkqueries.
Group queries: remove opcodes and LUs
Removes the remains of the group query code.
Node queries: remove opcodes and LUs
Removes the remains of the node query code.
Adjust console behavior wrt to operation state
Unlike its cli counterpart, the rapi console operation didnot properly take into account whether the instance isactually running. This patch fixes this problem.
Signed-off-by: Helga Velroyen <helgav@google.com>...
User query client necessary for instance queries
There were some places left when code querying for instanceinformation did not use the query client yet.
Use a query client for node queries where necessary
To remove the node query's python implementation soon, thispatch makes all users of the queries call the haskellimplementation instead of the python one.
RAPI: Make use of request_body in Reboot/Remove
Until now, the shutdown_timeout parameter could only be passed toShutdownInstance() inside kwargs, causing it to be included in therequest body. Based on that, extend RebootInstance() andRemoveInstance() so that they can take extra arguments (e.g....
Make RAPI export device names and UUIDs
Add UUIDs and names of instance's disks and NICs to the list of instancefields that are returned from RAPI.
Signed-off-by: Christos Stavrakakis <cstavr@grnet.gr>Reviewed-by: Helga Velroyen <helgav@google.com>
Merge branch 'stable-2.8' into master
Merge branch 'stable-2.7' into stable-2.8
Conflicts:...
Fix RAPI to include missing network fields
Fix RAPI interface to include missing network fields. Specifically, fixinstance queries to include the network name for instance NICs. Also fixnetwork queries to include missing common fields, like uuid and serial....
Export CPUs used by the node OS
They are exported through the LUXI, RAPI, and IAllocator interfaces.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Export node spindles
Node spindles (queried live) are exported through the LUXI, RAPI, andiallocator interfaces.
Export instance disk spindles
Instance disk spindles can be queried via LUXI and RAPI, and are exportedthrough the allocator interface. This is a prerequisite for htools tohandle spindles.
The length of a RAPI query including all the instance fields now has become...
Remove old "reason" implementation
Remove the useless parts of the old, partial, implementation of the support fortracking the reason of instances state change, before implementing the newreason trail support, as per the design document.
Signed-off-by: Michele Tartara <mtartara@google.com>...
Merge branch 'devel-2.7'
Trivial merge: no conflicts...
Update "FIXME" string in RAPI
We are not ready for this change yet. Let's push it to 2.8.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Enable split queries for the network
Now that all fields are implemented, and (I think) behave equivalentto the Python implementation, we can switch on the split queries fornetworks.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Fix style violations in commit 4a90bd4, small changes
- Commit 4a90bd4 contained a rather large number of style violations: - Indentation/sequence formatting - Wrapping of long lines - Docstrings whose first line was wrapped - A stray backslash in a docstring...
Status change reason support for Reboot
Add support to the Reboot command for specifying the reason for the laststatus change.
Some features are implemented as functions, even if used only once, becausethey will be used by the future patches introducing reason support for all...
Revert "Disable live-RPC queries under split query"
This reverts commit fb251c2c4c582ec0d6c00a6f6c5e134ed5196e03. On themaster branch we want to continue to have them enabled.
Remove network_type slot (Issue 363)
This slot was not used by Ganeti so the same info can beprovided via tags. In order not to break configuration datawe add a FromDict() method in Network config object thatremoves the deprecated network_type (if found) and then invoke...
Disable live-RPC queries under split query
Currently, the node listing RPC is very slow due to missingparallelisation. For the 2.7 release, we reset these back to masterd,hoping to revert them by the time 2.8 is ready.
There are a number of queries that I've left pointing to confd, as...
Replace frozenset with compat.UniqueFrozenset
This is not a trivial s/frozenset/compat.UniqueFrozenset/, but ratheronly replaces “frozenset” where appropriate. Most of the places are“static” information that doesn't change after the module has beenloaded....
Enable job queries via confd in gnt-node and RAPI
This patch is enabling split queries for jobs for gnt-node and rapiaccess (only for job listing, not job waiting).
Fixes to pass pep8 (make lint)
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>Reviewed-by: Iustin Pop <iustin@google.com>
Fixes to pass unittests (make check)
Add tags in network objects
Support: - gnt-network add --tags. - gnt-network list-tags/add-tags/remove-tags/. - gnt-network list -o +tags
Rapi support for networks
Support: - GetNetwork(s) - CreateNetwork - ConnectNetwork - DisconnectNetwork - RemoveNetwork
rapi: Add new user option for querying
This was requested in issue 301. Before this patch, requests to“/2/query/*” and “/2/instances/*/console” would require authenticationwith a user with write access. Since that is not strictly necessary, anew user option named “read” is added....
rlib2: Document two previously undocumented functions
Commit 208a6cff just included empty docstrings.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Enable query socket usage in gnt-node/gnt-group
This switches gnt-node/gnt-group (and their equivalent RAPI resources)to go over the query socket.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Populate the instance dict with opcode infos
This is needed so we can load it as an opcode. However, this informationshould not be available on the client, so we inject that info when wereceive the request.
Provided unittest to verify behaviour.
Signed-off-by: René Nussbaumer <rn@google.com>...
Adding RAPI resource for multi-allocation
This is straightforward.
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Complete and enable the haskell QueryClusterInfo call
Since we have now access to all cluster parameters, we can "fill" theparameters, and can finally enable it in CLI/RAPI.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Agata Murawska <agatamurawska@google.com>
Enable tags query over the query socket
This patch adds the tags field to the objects which were missing it(all except Cluster), implements handling the LuxiCall QueryTags, andthen enables the use of the query socket in cli.ListTags, used by allcommands, and in the RAPI client....
Switch RAPI to use same tags listing as CLI
Currently, RAPI uses queries (as in QueryNode with field tags) forgetting the tags, whereas the CLI uses the QueryTags Luxicommand. Since this discrepancy is not good, let's switch RAPI to usethe same method as the CLI....
RAPI regression beparams/memory fix
For compatibility with the old Ganeti version, we want to keep thebeparams/memory field around for another release. This patch fixes thisregression.
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Export more information in RAPI group queries
Sadly we don't have a way to test that, for example, all(G|N|I)Q_CONFIG fields are exported in RAPI, so for now we don't testthis; but we should, in the future.
Signed-off-by: Iustin Pop <iustin@google.com>...
Small fixup to rapi docstrings
The fast that most classes don't override the @cvars means that directreferences to FillOpcode can fail (they do on my workstation, but noton buildbot?). Anyway, for safety, it's best to qualify the name.
Additionally a small typo is fixed....
Export ndparams in RAPI node query
Group query now calculates ipolicy
Signed-off-by: Agata Murawska <agatamurawska@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
RAPI: Fix issue when replacing disks
This is another fallout from a suboptimal merge.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Andrea Spadaccini <spadaccio@google.com>
Merge branch 'devel-2.5'
Merge branch 'stable-2.5' into devel-2.5
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Fix RAPI node modify client and server calls
rapi.client.ModifyNode accepts a "group" and not a "node" param.(this bug is invisible but still not nice)
rlib2.R_2_nodes_name_modify submits the opcode with instance_name ratherthan node_name as a param. This would break the call....
RAPI: Fix resource for replacing disks
Commit d1c172deb4f inadvertently changes the“/2/instances/[instance_name]/replace-disks” resource to use bodyparameters. There were no QA tests and the issue wasn't noticed.
This patch re-introduces support for query parameters and adds a QA...
rapi: Allow auto-promotion on node role change
rapi: Add resource for modifying node
A separate patch will add “auto-promote” through“/2/nodes/[node_name]/role”.
Rename filter and filter_ to qfilter
We currently use 'filter' as the OpCode, QueryRequest and RAPI fieldname for representing a query filter. However, since 'filter' is abuilt-in function, we actually have to use filter_ throughout the codein order to not override the built-in function....
RAPI: Fix wrong check on instance shutdown
Commit 7fa310f6d84 (April 1st, 2011) converted the RAPI resource forshutting down an instance to FillOpCode. Unfortunately it missed thefact that the shutdown resource gets its parameters as query arguments.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
RAPI: Add resource to powercycle node
Fix two pylint errors
- hv_kvm.py: silence F0401, that is raised if pylint does not find the affinity module- rlib2.py: change disable-msg to disable
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
RAPI: Add resource to recreate instance's disks
This was still missing from RAPI.
rlib2: Declare all opcodes and equivalents
By declaring all used opcodes or opcodes equivalent to the operationsexecuted in a resource we will be able to ensure all opcodes are coveredby RAPI (with some exceptions).
rapi: Re-add “/2” resource
Like “/”, it'll just return a JSON null.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
rlib2: Convert /2/instances to OpcodeResource
rlib2: Convert /2/*/tags to OpcodeResource
rlib2: Convert /2/nodes/[node_name]/storage/repair to OpcodeResource
rlib2: Convert /2/nodes/[node_name]/storage/modify to OpcodeResource
rlib2: Convert /2/nodes/[node_name]/storage to OpcodeResource
rlib2: Convert /2/groups/[group_name] to OpcodeResource
rlib2: Convert /2/nodes/[node_name]/role to OpcodeResource
Also fix a typo in a constant name.
rlib2: Convert /2/instances/[inst]/disk/[idx]/grow to OpcodeResource
rlib2: Convert /2/instances/[inst]/modify to OpcodeResource
rlib2: Convert /2/instances/[inst]/rename to OpcodeResource
rlib2: Convert /2/instances/[inst]/failover to OpcodeResource
rlib2: Convert /2/instances/[inst]/migrate to OpcodeResource
rlib2: Convert /2/instances/[inst]/export to OpcodeResource
rlib2: Convert /2/instances/[inst]/prepare-export to OpcodeResource
rlib2: Convert /2/instances/[inst]/deactivate-disks to OpcodeResource
rlib2: Convert /2/instances/[inst]/activate-disks to OpcodeResource
rlib2: Convert /2/instances/[inst]/replace-disks to OpcodeResource
rlib2: Convert /2/instances/[inst]/shutdown to OpcodeResource
rlib2: Convert /2/instances/[inst]/startup to OpcodeResource
rlib2: Convert /2/instances/[inst]/reboot to OpcodeResource
rlib2: Convert /2/instances/[inst]/info to OpcodeResource
rlib2: Convert /2/instances/[inst] to OpcodeResource
rlib2: Convert /2/groups/[group_name]/assign-nodes to OpcodeResource
rlib2: Convert /2/groups/[group_name]/rename to OpcodeResource
rlib2: Convert /2/groups/[group_name]/modify to OpcodeResource
rlib2: Convert /2/groups to OpcodeResource