Statistics
| Branch: | Tag: | Revision:

root / lib / opcodes.py @ 2b48dbca

History | View | Annotate | Download (69.5 kB)

# Date Author Comment
da4a52a3 06/20/2013 05:04 pm Thomas Thrainer

Index instances by their UUID

No longer index instances by their name but by their UUID in the cluster
config. This change changes large parts of the code, as the following
adjustments were necessary: * Change the index key to UUID in the configuration and the...

f5c4553b 06/18/2013 06:24 pm Michele Tartara

Merge branch 'stable-2.8' into 'master'

  • stable-2.8
    Version bump to 2.8.0~alpha1
    Make cfgupgrade idempotent
    Update config version number when downgrading
    Add test for shrink heuristics over different resources
    Improve hspace shrinking strategy...
1c3231aa 06/13/2013 12:32 pm Thomas Thrainer

Index nodes by their UUID

No longer index nodes by their name but by their UUID in the cluster
config. This change changes large parts of the code, as the following
adjustments were necessary: * Change the index key to UUID in the configuration and the
ConfigWriter, including all methods....

e5c92cfb 06/04/2013 09:06 pm Klaus Aehlig

Add a force option to the ClusterSetParams Opcode

If set, the op code will, in particular, try to set the master IP
on the new netdev, even if shutting down the master IP on the old
netdev failed.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Michele Tartara <>

40d93e3b 05/28/2013 12:45 pm Bernardo Dal Seno

gnt-cluster repair-disk-sizes repairs spindles too

When exclusive storage is active, any wrong or missing spindles information
in disks gets updated too.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

dbae804a 04/22/2013 02:14 pm Michele Tartara

Add a field to store the reason trail in OpCodes

The reason trail will be available for all the OpCodes, so the field that
is to contain it has to be added to the OpCode base class.

Signed-off-by: Michele Tartara <>
Reviewed-by: Helga Velroyen <>

d634b4e0 04/22/2013 02:12 pm Michele Tartara

Add an opcode name conversion function

Add a function to convert an opcode class name to a source string for the
reason trail, factoring out the code in common with the existing _NameToId
function.

Signed-off-by: Michele Tartara <>
Reviewed-by: Helga Velroyen <>

aa922d64 04/22/2013 02:10 pm Michele Tartara

Remove old "reason" implementation

Remove the useless parts of the old, partial, implementation of the support for
tracking the reason of instances state change, before implementing the new
reason trail support, as per the design document.

Signed-off-by: Michele Tartara <>...

b21d488b 04/17/2013 05:49 pm Christos Stavrakakis

Support UUIDs and names when refering to a device

Modify _ApplyContainerMods function to lookup NICs/Disks not only by their
index inside the container, but also by their UUID or name. Abstract the
lookup code in new GetItemFromContainer function.

Make type of identifier in "opcode._TestInstSetParamsModList" to be...

9c8c69bc 04/11/2013 11:53 pm Helga Velroyen

Removes obsolete 'enabled storage types'

Since managing of different storage units is now done using
disk templates and not storage types, we remove the obsolete
enabled storage types.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Michele Tartara <>

66af5ec5 04/11/2013 11:52 pm Helga Velroyen

gnt-cluster modify: modify enabled disk templates

Adds setting of the list of enabled disk templates to 'gnt-cluster modify'.
Note that this does not yet include any verification regarding disk templates
currently used by instances.

Signed-off-by: Helga Velroyen <>...

d2204b1a 04/02/2013 02:01 pm Klaus Aehlig

Add parameter pnode to OpInstanceSetParams

This parameter will be used to set the new primary node
of an instance, assuming that the disks have been moved
by other means (outside ganeti's control).

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Guido Trotter <>

c270ee07 03/21/2013 05:41 pm Helga Velroyen

gnt-cluster modify: dis/enabling storage types

This patch extends the 'gnt-cluster modify' command to manipulate the list
of enabled storage types. Note that this currenlty does no validation
with respect to whether or not there are instances currently using a storage...

777e8b6f 03/06/2013 05:31 pm Michele Tartara

Fix "reason" opcode parameter description

The "reason" opcode parameter can now apply to multiple opcodes, not just the
one for rebooting instances.

Signed-off-by: Michele Tartara <>
Reviewed-by: Iustin Pop <>

69c88fb1 03/06/2013 11:16 am Michele Tartara

Make "reason" a common opcode attribute

The "reason" attribute will be common to many opcodes.
This patch factors it out so that it will be possible for the next commits
to use it without code duplication.

Signed-off-by: Michele Tartara <>...

a82d9394 02/25/2013 02:52 pm Michael Hanselmann

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...

4a90bd4f 02/19/2013 04:27 pm Michele Tartara

Status change reason support for Reboot

Add support to the Reboot command for specifying the reason for the last
status change.

Some features are implemented as functions, even if used only once, because
they will be used by the future patches introducing reason support for all...

fe502d25 02/15/2013 03:04 pm Iustin Pop

Merge branch 'devel-2.7'

  • devel-2.7:
    Rename lib/objectutils to outils.py
    Fix typo in gnt-group manpage
    Fix wrong type in a docstring of the RAPI subsystem
    Finish the remote→restricted commands rename
    Enable use of the priority option in hbal
    Add CLI-level option to override the priority...
473d87a3 02/15/2013 12:14 pm Iustin Pop

Rename lib/objectutils to outils.py

Back when this was introduced, I mentioned that it breaks heavily tab
completion (ob<TAB> doesn't work anymore), but at that moment I didn't
have a suggestion what to name it. I think outils is good and short
enough, and doesn't conflict with anything else, so here it goes....

37a978e7 02/12/2013 03:39 pm Helga Velroyen

Force conflicts check in LUNetworkDisconnect

Until now if one disconnects a network with --no-conflicts-check
and then remove it, there is a possibility to leave instances with NICs
referencing non-existing networks. This causes network queries,
instance removal and modification to fail....

3c296f56 02/12/2013 03:25 pm Michael Hanselmann

Merge branch 'devel-2.7'

  • devel-2.7: (23 commits)
    QA: Support additional arguments for initialization
    qa_utils: Fix order of arguments passed to _AssertRetCode
    Improve reporting on errors.AddressPoolError exceptions
    Add note about lv-tags rename...
5cfa6c37 02/11/2013 05:31 pm Dimitris Aragiorgis

Remove network_type slot (Issue 363)

This slot was not used by Ganeti so the same info can be
provided via tags. In order not to break configuration data
we add a FromDict() method in Network config object that
removes the deprecated network_type (if found) and then invoke...

aeb6ba44 01/30/2013 07:39 pm Dato Simó

Document that OpTestDelay/TestDelay take duration in seconds

Also, fix @rtype and @return elements of utils.TestDelay(), which now
returns a tuple but this wasn't being indicated.

Signed-off-by: Dato Simó <>
Reviewed-by: Helga Velroyen <>

6bb939a2 01/30/2013 07:26 pm Helga Velroyen

Force conflicts check in LUNetworkDisconnect

Until now if one disconnects a network with --no-conflicts-check
and then remove it, there is a possibility to leave instances with NICs
referencing non-existing networks. This causes network queries,
instance removal and modification to fail....

8d459129 01/07/2013 07:00 pm Michael Hanselmann

Add "use_locking" parameter to network query opcode

This was extracted from a patch by Dimitris Aragiorgis with the subject
“Add locking to _NetworkQuery”. The rest of the patch did no longer
apply and will require more work.

Signed-off-by: Michael Hanselmann <>...

b954f097 12/22/2012 11:47 am Constantinos Venetsanopoulos

Add the gnt-storage client

Add a new client called 'gnt-storage'.
The client interacts with the ExtStorage interface, similarly to
the way gnt-os interacts with the OS interface.

For now, only two commands are supported: 'info' and 'diagnose'.

'diagnose' calculates the node status of each provider on each node,...

911ee606 12/21/2012 11:32 am Michael Hanselmann

opcodes: Common parameter for target groups

Also add a missing parenthesis at the end.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

6ef37395 12/19/2012 06:54 pm Michael Hanselmann

OpNetworkConnect: Check for network mode

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

0d57ce24 12/19/2012 01:02 pm Guido Trotter

Allow shutting down offline instance

If an instance is offline we definitely shouldn't start it up.
But shutting it down, should it be up by mistake is not "that" bad.
Still, we only allow it with --force, as it still performs an action on
an instance we shouldn't touch. This should make everybody happy....

8bc17ebb 12/17/2012 01:29 pm Iustin Pop

Add optional formatting for OP_DSC_FIELD

For some opcodes, the output is not "stable", and depends on the exact
input values; this makes it harder to check consistency against
Haskell code.

To compensate for this, we add a way to override the formatting of the...

3e3ddbf0 12/12/2012 03:18 pm Constantinos Venetsanopoulos

Remove checks wrt IDISK_PARAMS from OpCode level

Change the "--disks" option validation, to just check the format
of the dict and do not check whether the keys are included in the
IDISK_PARAMS constant at OpCode level. This allows the passing of
arbitrary parameters at the CLI, which will then be logically...

1f1188c3 12/07/2012 02:36 pm Michael Hanselmann

cmdlib: Opportunistic locking on instance creation

Adds a new parameter to “OpInstanceCreate” and “OpInstanceMultiAlloc” to
use opportunistic locks.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

dd076c21 12/04/2012 01:44 pm Iustin Pop

Add safety check on job dependency/TIsLength

If TIsLength is applied to a non-container item, it will fail (type
error) due to invalid application of len(). Since this can happen on
user-supplied data, we add an explicit TList/TTuple check (the TTuple
test is a new one)....

213076fe 12/03/2012 01:04 pm Dimitris Aragiorgis

Fix locking in networks

Ensure that locks are held only if needed.

Add conflicts_check in OpNetworkAdd. This is needed if we want to
check whether nodes/master IPs are included in network.

Depending on conflicts_check value, we have to hold node/instance locks...

398e9066 11/30/2012 03:54 pm Iustin Pop

Add Group, OS and Backup opcodes

This also corrects a docstring in OpBackupExport on the Python side.

Signed-off-by: Iustin Pop <>
Reviewed-by: Helga Velroyen <>

89514061 11/30/2012 03:54 pm Iustin Pop

Add a helper for the "iallocator" opcode field

This field is used with just changed description in about 10 opcodes,
so unifying it makes things simpler for future potential changes to
the field type.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

55b7e783 11/30/2012 03:54 pm Iustin Pop

Rename OpTestAllocator.allocator to iallocator

This makes the OpCode more consistent with the other opcodes. The
downside is incompatibility when upgrading from 2.6, but since this is
a test opcode it shouldn't be problematic.

Signed-off-by: Iustin Pop <>...

4c405df7 11/30/2012 03:54 pm Iustin Pop

Fix empty list as default value in OpInstanceMultiAlloc

Commit 12e62af5 (“Adding the new opcode for multi-allocation”)
introduced a "bad" default value; while porting this to Haskell, I
realised this is wrong.

Signed-off-by: Iustin Pop <>...

e055a2ab 11/30/2012 10:14 am Dimitris Aragiorgis

Introduce ht.TMaybeValueNone and ht.TValueNone

TValueNone checks if a value is "none" and TMaybeValueNone is a wrapper
of TOr(TValueNone, x). This is used by OpNetworkSetParam in order to
reset a network value (e.g. mac_prefix, gateway, etc.)

Signed-off-by: Dimitris Aragiorgis <>...

5dff65da 11/30/2012 07:10 am Michael Hanselmann

opcodes: Replace manual loop with map

Also remove a superfluous empty line in test file.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

16091a6e 11/29/2012 01:33 pm Michael Hanselmann

Fix type descriptions in RAPI documentation

This patch adds descriptors to the “_CheckCIDR*” functions in opcodes
and improves the descriptions generated by “ht.TInstanceOf”, thereby
indirectly fixing bad type descriptions in the RAPI documentation.

Before this patch:...

e1494c96 11/23/2012 04:24 pm Iustin Pop

Fix network opcode parameters

Commit 32e3d8b1 (“opcodes: Network parameter improvements and fixes”)
changed a few parameters in the network add, connect and set params
opcodes, but some of the changes are buggy. The patch changed the type
to TMaybe(), whereas the default should have been changed from None to...

fd9f58fd 11/23/2012 04:24 pm Iustin Pop

Introduce a TMaybe combinator

We have many cases in the code where we write TOr(TNone, a), so let's
introduce a combinator that simplifies this case.

Beside replacing the above with TMaybe(a), I did a few other parameter
fixes:

- noop change TOr(TNone, TDict) to TMaybeDict...

829cfbc5 11/23/2012 04:23 pm Dimitris Aragiorgis

Fix bug in OpNetworkQuery result check

Signed-off-by: Dimitris Aragiorgis <>
Signed-off-by: Iustin Pop <>
Reviewed-by: Iustin Pop <>

a138ead7 11/21/2012 08:21 am Michael Hanselmann

ht: Complain if TNone isn't listed first for TOr/TAnd

Some type descriptions are rather long. If "None" is listed at the end
or somewhere in between it is easily missed. Therefore it should be at
the beginning, e.g. "None or (long description)".

Signed-off-by: Michael Hanselmann <>...

32e3d8b1 11/21/2012 08:20 am Michael Hanselmann

opcodes: Network parameter improvements and fixes

- Use variables for checks for IP addresses (makes them more consistent,
too)
- Fix checks to accept default values
- Small description improvements (e.g. s/IP/IP address/)

Signed-off-by: Michael Hanselmann <>...

1f84cca8 11/21/2012 08:18 am Michael Hanselmann

Merge branch 'devel-2.6'

  • devel-2.6:
    Fix opcode validation for OpOobCommand.command
    Fix typo in manpage for gnt-os
    gnt-instance.8: Add index to disk and nic removal

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

3c286190 11/20/2012 07:51 pm Dimitris Aragiorgis

Fixes to pass pep8 (make lint)

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

6e8091f9 11/20/2012 07:51 pm Dimitris Aragiorgis

Fixes to pass unittests (make check)

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

8140e24f 11/20/2012 07:51 pm Dimitris Aragiorgis

Add tags in network objects

Support:
- gnt-network add --tags.
- gnt-network list-tags/add-tags/remove-tags/.
- gnt-network list -o +tags

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

eaa4c57c 11/20/2012 07:50 pm Dimitris Aragiorgis

IP pool related objects, opcodes and constants

Config objects: * Introduce L{Network} with
- IPv4 network field (mandatory)
- IPv4 gateway, IPv6 (network/gateway), mac prefix, type (optional) * Modify existing config objects to support networks:
- Add new slot 'network' to L{NIC} config object...

e1ebbfcf 11/20/2012 11:25 am Iustin Pop

Improve error message for wrong opcode parameter values

When given an empty string as value to a parameter that doesn't accept
empty strings, the error message was confusing, since it was showing
just as a double space.

Signed-off-by: Iustin Pop <>...

2c9fa1ff 11/20/2012 11:16 am Iustin Pop

Cleanup ht's use of positive/strictpositive

Currently, ht.py uses a bad terminology for positive/non-negative
numbers. Per http://en.wikipedia.org/wiki/Positive_number, this is the
correct terminology:

- A number is positive if it is greater than zero.
- A number is negative if it is less than zero....

70296981 11/19/2012 03:17 pm Iustin Pop

Fix opcode validation for OpOobCommand.command

The 'command' attribute of the OpOobCommand command is defined with a
default value of None, but its validation requires a member of
constants.OOB_COMMANDS, which doesn't accept None. This result in the
following error when submitting an opcode without the command:...

e4d745a7 11/19/2012 03:12 pm Michael Hanselmann

Add opcode for running commands remotely

The opcode doesn't pay attention to the build-time flag to enable or
disable restricted commands. In a cluster different nodes could have
different settings.

Node locks are acquired in shared mode by default, but the use of an...

bcd35e09 11/05/2012 09:50 pm Dato Simó

cli.py: use None as name for tag operations on the cluster

This change is mostly cosmetic. Previously, the literal "cluster" was
used for the 'name' field of tag operations on the cluster (as opposed
to a node or an instance). Since this field has a type of TMaybeString...

8e09e801 11/01/2012 07:44 pm Michael Hanselmann

Merge branch 'devel-2.6'

  • devel-2.6:
    Fix typo in gnt-instance man page
    jqueue: Return jobs to queue when shutting down
    gnt-debug delay: Add "--submit" option
    Make hostname checks uniform between instance rename and add
    Improve logging of new job submissions...
8e66b9bf 10/30/2012 02:17 pm Iustin Pop

Fix validation of vgname in OpClusterSetParams

This variable can be empty, when we want to disable LVM, so we can't
use TMaybeString.

Fixes issue 285.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

63a3d8f7 10/05/2012 05:17 am Michael Hanselmann

backend: Check for shared storage also

If normal file storage was disabled but shared storage enabled,
“_TransformFileStorageDir” would still throw an exception.

in “opcodes._CheckStorageType” there's also a check, but I wasn't quite
sure what the correct way of handling it was, so I added a TODO comment....

3779121c 09/28/2012 06:11 pm René Nussbaumer

Pylint cleanup

The previous commits introduced some pylint errors.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

68b2e985 09/28/2012 04:05 pm René Nussbaumer

Make validation error message more useful

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

9bc5ac44 09/28/2012 04:05 pm René Nussbaumer

Provide a custom Validate for OpInstanceMultiAlloc

This is needed, as we're not strictly separating validation from
populating the defaults. We do this all in one function. If we now
receive a non complete OpInstanceCreate opcode in instances, we would
run into AttributeErrors on those....

12e62af5 09/24/2012 02:48 pm René Nussbaumer

Adding the new opcode for multi-allocation

Skeleton for the multi-allocation opcode

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

3c049cd3 09/12/2012 12:27 pm René Nussbaumer

Adapt gnt-debug iallocator

Add the new multi-alloc request to the test allocation framework. For
now we just create --count identical instances. This might need further
improvements later.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

32683096 09/12/2012 12:27 pm René Nussbaumer

Make the slots functionality more modular

As we will introduce another set of containers using the slots trick
we abstract away as much as possible to separate bases classes. The
child classes then adapt them for their needs. This leads to less code...

107102af 09/08/2012 12:19 am Iustin Pop

Merge branch 'devel-2.6' into submit

  • devel-2.6:
    Fix bug in non-mirrored instance allocation
    Fix gnt-debug iallocator

Signed-off-by: Iustin Pop <>
Reviewed-by: Agata Murawska <>

09123222 09/04/2012 02:22 pm René Nussbaumer

Fix gnt-debug iallocator

There was an issue with the recent ipolicy introduction which lead to a
bug in gnt-debug iallocator. It was not providing the spindle_use field
and therefore it wont let you create a valid iallocator request.

Signed-off-by: René Nussbaumer <>...

3d091af0 07/25/2012 09:38 pm Bernardo Dal Seno

Allocator support in recreate-disks LU

This affects only the backend.

Signed-off-by: Adam Ingrassia <>
Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Iustin Pop <>

112aee5f 07/13/2012 06:00 pm Iustin Pop

Merge branch 'stable-2.6'

  • stable-2.6: (72 commits)
    Make Ganeti 2.6.0 rc3 release
    Allow reinstall even when secondaries are offline
    Prepare NEWS file for Ganeti 2.6.0 rc3
    QA updated to test instance removing when sec. is offline
    Ignore offline node errors when removing disks...
b69437c5 07/05/2012 07:11 pm Iustin Pop

9Add wait_for_sync flag to OpInstanceActivateDisks

This can be used to ensure that after activate-disks has returned, the
instance's storage is consistent; currently there's no programmatic
way to do this.

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

32708d0a 06/25/2012 04:09 pm Iustin Pop

Add summary field to OpNodeModifyStorage

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

0fb66bb1 06/18/2012 02:48 pm Iustin Pop

Fix inconsistent punctuation in rapi docs and opcodes

While reviewing the RAPI docs (for commit 003306f9), I realised that
the punctuation used in RAPI is inconsistent, especially with regards
to definition lists.

This patch changes all such lists to not have punctuation, except for...

e7f99087 04/26/2012 06:41 pm Iustin Pop

Add 'absolute' grow-disk mode at OpCode/LU level

This also improves the log messages for the (default) relative mode
("by %s to %s").

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

fa47242b 04/26/2012 06:40 pm Iustin Pop

Ensure that the grow disk amount is positive

The CLI currently doesn't permit this, but a direct job submission
would allow it.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

971b3a98 04/20/2012 08:58 pm Michael Hanselmann

Add opcode parameter descriptions

Fixes QA after commit cfdf561dade7.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Chris Schrier <>

cfdf561d 04/20/2012 07:11 pm Michael Hanselmann

Stop using locks in LUXI "QueryTags"

Also mark it as deprecated in NEWS as normal queries can be used
instead.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

7bfb3367 03/06/2012 08:58 pm Iustin Pop

Merge remote-tracking branch 'origin/devel-2.5'

Conflicts:
Makefile.am (trivial, test data files added on both branches)
lib/opcodes.py (trivial, master renamed filter→qfilter, 2.5
fixed the type of the parameter)...

b02c6bdf 02/23/2012 06:00 pm Michael Hanselmann

opcodes: Remove dependency on query module

There's no need to verify the field definitions on every query. They are
static for all intents and purposes anyway and verified at module load
time.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

48796673 02/21/2012 09:18 pm Michael Hanselmann

Add result checks for OpTags*

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

415feb2e 02/21/2012 05:34 pm René Nussbaumer

opcodes: Annotate the OP_RESULT of query operations

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

202fb4e0 02/20/2012 06:57 pm Michael Hanselmann

opcodes: Add result checks for OpBackup*

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

aa12a891 02/20/2012 12:50 pm René Nussbaumer

opcodes: Fix OP_RESULT for OobCommand

The result is a list of a list with elements with size of 2.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

c363310d 02/17/2012 10:59 am René Nussbaumer

opcodes: Adding missing OP_RESULTs

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

a2aadb34 02/13/2012 03:23 pm Michael Hanselmann

OpInstanceSetParams: Make two type checks public

They'll be used for tests in cmdlib.py.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

e9c3d864 02/13/2012 03:23 pm Michael Hanselmann

OpInstanceSetParams: Accept more flexible NIC/disk modifications

Start accepting a new form of NIC/disk modifications for adding/removing
arbitrary NICs/disks. Unlike before the index must always be given. An
index of “-1” stands for the last item.

Signed-off-by: Michael Hanselmann <>...

20a32e74 02/13/2012 03:23 pm Michael Hanselmann

opcodes: Add comments to two parameter tests

These comments appear in the RAPI documentation.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

dd9b9d7b 02/01/2012 10:25 am Michael Hanselmann

Merge branch 'stable-2.5' into devel-2.5

  • stable-2.5:
    Fix type check for OpQuery.filter
    Fix explanation of gnt-node evacuate --primaries-only
    Makefile.am: fix permissions for Python scripts on install
    devel/upload: Fix permissions for installed directories...
ddc1de7c 02/01/2012 08:24 am Michael Hanselmann

Add stricter checks for OpInstanceSetParams.{nics,disks}

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

ff8067cf 02/01/2012 08:24 am Michael Hanselmann

Add ht.TMaybeListOf type check

Replaces some uses of TOr(TNone, TListOf(…)).

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

8f227489 02/01/2012 08:24 am Michael Hanselmann

Stricter check for OS modifications passed to OpClusterSetParams

Don't just check the first element of each item, but also make sure the
OS name is a string and not empty.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

545d0362 01/31/2012 02:32 pm Michael Hanselmann

Fix type check for OpQuery.filter

Just using ht.TListOf as a type check doesn't work correctly. The
function must be called with the expected item type. In this specific
case TListOf was always called with the filter as a value, and the
result of that call evaluated to truth. Since filters can be quite...

3016bc1f 01/31/2012 07:44 am Michael Hanselmann

OpInstanceSetParams: Merge {off,on}line_inst parameters

Instead of having two separate parameters, a single boolean parameter is
used. Unfortunately we need a third state to say “no change”, so the
value can be None, True or False (similar to other parameters). There...

8c0b16f6 01/26/2012 06:33 pm Guido Trotter

cli/opcodes: add a --no-runtime-changes migrate opt

This will be used for now to avoid ballooning memory at live migration time.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

1b01390b 01/26/2012 04:30 pm René Nussbaumer

doc/rapi.rst: Document ipolicy parameter

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

735e1318 01/25/2012 03:36 pm Michael Hanselmann

gnt-instance recreate-disks: Allow specifying new size

With this change a new disk size can be specified when recreating disks.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

2c0af7da 01/18/2012 06:03 pm Guido Trotter

gnt-instance modify -m|--runtime-memory

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

d2fe2bfb 01/16/2012 10:36 am René Nussbaumer

TLReplaceDisk: Add ipolicy checks

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

9fa567b3 01/06/2012 02:47 pm René Nussbaumer

gnt-node: Add instance policy to migrate

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

10889e0c 01/06/2012 02:46 pm René Nussbaumer

gnt-instance: Adding instance policy to add

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

1559e1e7 01/06/2012 02:46 pm René Nussbaumer

gnt-instance: Adding verification of instance policy to modify

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>