[PATCH master 03/52] Rename optISpec to optStdSpec

2012-01-09 Thread Iustin Pop
More consistency with the tiered allocation mode. --- htools/Ganeti/HTools/CLI.hs|6 +++--- htools/Ganeti/HTools/Program/Hspace.hs |2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htools/Ganeti/HTools/CLI.hs b/htools/Ganeti/HTools/CLI.hs index

[PATCH master 04/52] Better max ispec defaults

2012-01-09 Thread Iustin Pop
Instead of being equal to the minimum ones, these are reusing current constants. --- lib/constants.py | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/constants.py b/lib/constants.py index 64669cc..16931ac 100644 --- a/lib/constants.py +++ b/lib/constants.py

[PATCH master 02/52] Change how hspace reads cmdline args for std specs

2012-01-09 Thread Iustin Pop
For the standard specs, hspace currently takes separate options for the memory, disk and VCPUs. For the tiered specs, which were introduced later, it takes a single option with all three values combined. This patch adds a backward-incompatible change to the standard spec, basically moving it to

[PATCH master 07/52] More reshuffling of code

2012-01-09 Thread Iustin Pop
Following the split Types/BasicTypes, we can remove the last JSON-related stuff from Utils.hs, and do some more cleanup. --- htools/Ganeti/BasicTypes.hs |6 ++ htools/Ganeti/HTools/JSON.hs | 12 htools/Ganeti/HTools/Luxi.hs |2 +- htools/Ganeti/HTools/QC.hs|

[PATCH master 12/52] Add support for tuples in convert-constants

2012-01-09 Thread Iustin Pop
--- autotools/convert-constants | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/autotools/convert-constants b/autotools/convert-constants index d1744ea..0bb1c64 100755 --- a/autotools/convert-constants +++ b/autotools/convert-constants @@ -25,6 +25,7 @@ import

[PATCH master 11/52] More improvements to convert-constants

2012-01-09 Thread Iustin Pop
This prepares for tuple and other conversions. --- autotools/convert-constants | 41 ++--- 1 files changed, 26 insertions(+), 15 deletions(-) diff --git a/autotools/convert-constants b/autotools/convert-constants index 8dd1a11..d1744ea 100755 ---

[PATCH master 19/52] Load cluster ipolicy via Rapi

2012-01-09 Thread Iustin Pop
This requires changing from querying the /tags resource to the /info resource. --- htools/Ganeti/HTools/Rapi.hs | 21 - 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/htools/Ganeti/HTools/Rapi.hs b/htools/Ganeti/HTools/Rapi.hs index 6172cc2..eff6d1f 100644

[PATCH master 21/52] Add a helper function converting ispecs to rspecs

2012-01-09 Thread Iustin Pop
The rspec type is simpler than the ispec one; most likely it should be deprecated later. --- htools/Ganeti/HTools/Types.hs |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/htools/Ganeti/HTools/Types.hs b/htools/Ganeti/HTools/Types.hs index 497e877..cb69917 100644

[PATCH master 17/52] Load cluster ipolicy via Luxi

2012-01-09 Thread Iustin Pop
Also show it in hbal's verbose output (helpful for debugging). --- htools/Ganeti/HTools/Luxi.hs | 16 ++-- htools/Ganeti/HTools/Program/Hbal.hs |5 +++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/htools/Ganeti/HTools/Luxi.hs

[PATCH master 06/52] htools: split parts of HTools/Types.hs into BasicTypes.hs

2012-01-09 Thread Iustin Pop
The 'Result' type is common and: - might be used outside of HTools-specific code too - is better split as we need these basic types for building the more complex ones in Types.hs --- Makefile.am |1 + htools/Ganeti/BasicTypes.hs | 67

[PATCH master 13/52] Add support for lists/frozensets in convert-constants

2012-01-09 Thread Iustin Pop
Unfortunately, we only support lists of simple types, and not even lists of tuples. If we actually needed those, it would be possible to implement them, with a bit more complexity in the converter. --- autotools/convert-constants | 20 1 files changed, 20 insertions(+), 0

[PATCH master 10/52] Improve convert-constants to handle dictionaries

2012-01-09 Thread Iustin Pop
The two main drawbacks for convert-constants are the fact that it can't handle sets/frozensets (mainly due to the fact that I don't know how useful this would be to the Haskell code) and that it cannot export dictionaries. To fix the second case, the current patch changes the code to support

[PATCH master 08/52] Stop exporting JSON functionality from Utils.hs

2012-01-09 Thread Iustin Pop
This completes the Utils/JSON split started in commit f047f90f. The import graph should be cleaner now. --- htools/Ganeti/HTools/IAlloc.hs |2 +- htools/Ganeti/HTools/Luxi.hs |3 +-- htools/Ganeti/HTools/QC.hs |5 +++-- htools/Ganeti/HTools/Rapi.hs |2 +-

[PATCH master 09/52] Add object definitions for the ispec and ipolicy

2012-01-09 Thread Iustin Pop
--- htools/Ganeti/HTools/Types.hs | 22 +- htools/Ganeti/THH.hs | 10 +- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/htools/Ganeti/HTools/Types.hs b/htools/Ganeti/HTools/Types.hs index 3209ce7..99f07dc 100644 ---

[PATCH master 05/52] Fix cluster ispecs on upgrade

2012-01-09 Thread Iustin Pop
Cluster-level parameters must *not* be empty. Plus two more minor changes. --- lib/objects.py |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/objects.py b/lib/objects.py index 1e6162a..47fe527 100644 --- a/lib/objects.py +++ b/lib/objects.py @@ -97,7 +97,7 @@

[PATCH master 14/52] Add support for RE patterns to convert constants

2012-01-09 Thread Iustin Pop
This is a trivial conversion. --- autotools/convert-constants | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/autotools/convert-constants b/autotools/convert-constants index 89f9f00..ae36774 100755 --- a/autotools/convert-constants +++

[PATCH master 15/52] Add default ipolicy declarations

2012-01-09 Thread Iustin Pop
--- htools/Ganeti/HTools/Types.hs | 35 +++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/htools/Ganeti/HTools/Types.hs b/htools/Ganeti/HTools/Types.hs index 99f07dc..497e877 100644 --- a/htools/Ganeti/HTools/Types.hs +++

[PATCH master 16/52] Extend ClusterData with the cluster instance policy

2012-01-09 Thread Iustin Pop
This attribute is always initialised to the default, and is not (yet) read/saved in the various backends. --- htools/Ganeti/HTools/IAlloc.hs |4 ++-- htools/Ganeti/HTools/Loader.hs |4 +++- htools/Ganeti/HTools/Luxi.hs |2 +-

[PATCH master 20/52] Abstract creation of instance from a spec

2012-01-09 Thread Iustin Pop
--- htools/Ganeti/HTools/Program/Hspace.hs | 20 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/htools/Ganeti/HTools/Program/Hspace.hs b/htools/Ganeti/HTools/Program/Hspace.hs index 81c8098..e5185c3 100644 --- a/htools/Ganeti/HTools/Program/Hspace.hs +++

[PATCH master 35/52] A trivial optimisation in Loader.mergeData

2012-01-09 Thread Iustin Pop
During loading, we can eliminate some intermediate data structures. This only matters for big clusters, and even there it's less than 1% less memory allocated, but still, it's a no-brainer. --- htools/Ganeti/HTools/Loader.hs | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-)

[PATCH master 18/52] Update memory/maxmem reading in Rapi backend

2012-01-09 Thread Iustin Pop
Recent changes to the instance beparams have replaced memory with maxmem in Rapi bulk queries. Until this is either reverted (for backwards compat) or we decide to go ahead with only maxmem, we change the backend to read both; this only affects the instance down code path (where ``oper_ram`` is

[PATCH master 34/52] Trivial performance optimisation

2012-01-09 Thread Iustin Pop
This is not in the hot-path, but still, no sense in doing O(n) instead of O(1). --- htools/Ganeti/HTools/Cluster.hs |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/htools/Ganeti/HTools/Cluster.hs b/htools/Ganeti/HTools/Cluster.hs index d3b1bc7..67dff0c 100644 ---

[PATCH master 24/52] Add a new CLI option type 'list'

2012-01-09 Thread Iustin Pop
This simply splits the value in the option parser, instead of needing to do it in the client code. --- lib/cli.py | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/lib/cli.py b/lib/cli.py index ebf91c8..be68a4e 100644 --- a/lib/cli.py +++ b/lib/cli.py @@

[PATCH master 31/52] Switch hspace to read the disk template from the cluster

2012-01-09 Thread Iustin Pop
The default disk template is the first enabled template. --- htools/Ganeti/HTools/CLI.hs|8 htools/Ganeti/HTools/Program/Hspace.hs | 21 +++-- man/hspace.rst |5 +++-- 3 files changed, 22 insertions(+), 12 deletions(-) diff

[PATCH master 25/52] Add a new disk-template ipolicy option

2012-01-09 Thread Iustin Pop
--- lib/cli.py |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/lib/cli.py b/lib/cli.py index be68a4e..2c611c0 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -171,6 +171,7 @@ __all__ = [ SPECS_DISK_SIZE_OPT, SPECS_MEM_SIZE_OPT, SPECS_NIC_COUNT_OPT, +

[PATCH master 42/52] Add a help function for generating test nodes

2012-01-09 Thread Iustin Pop
This abstracts the concept of give an sane, online node in a single place, rather than spread around the tests. We also change the signature for isNodeBig for easier usage. --- htools/Ganeti/HTools/QC.hs | 40 +++- 1 files changed, 19 insertions(+), 21

[PATCH master 27/52] Remove extraneous check in policy creation

2012-01-09 Thread Iustin Pop
The values are already checked in CreateIPolicy, no need to manually check them again. --- lib/client/gnt_cluster.py |2 -- lib/client/gnt_group.py |3 --- 2 files changed, 0 insertions(+), 5 deletions(-) diff --git a/lib/client/gnt_cluster.py b/lib/client/gnt_cluster.py index

[PATCH master 30/52] Read the disk templates part of the ipolicy

2012-01-09 Thread Iustin Pop
The default value is badly defined (hardcoded defaults)… --- htools/Ganeti/HTools/Types.hs |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/htools/Ganeti/HTools/Types.hs b/htools/Ganeti/HTools/Types.hs index 57bc3d8..946a25b 100644 --- a/htools/Ganeti/HTools/Types.hs

[PATCH master 32/52] Enable Eq instances for TH-built objects

2012-01-09 Thread Iustin Pop
This is needed for the next patch. --- htools/Ganeti/THH.hs |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/htools/Ganeti/THH.hs b/htools/Ganeti/THH.hs index ca1e765..87e6b0a 100644 --- a/htools/Ganeti/THH.hs +++ b/htools/Ganeti/THH.hs @@ -583,7 +583,7 @@ buildObject

[PATCH master 29/52] Move DiskTemplate definition around

2012-01-09 Thread Iustin Pop
This is needed since we'll need the DiskTemplate definition in the IPolicy one. --- htools/Ganeti/HTools/Types.hs | 22 +++--- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/htools/Ganeti/HTools/Types.hs b/htools/Ganeti/HTools/Types.hs index cb69917..57bc3d8

[PATCH master 45/52] Implement saving/restoring of policies in Text backend

2012-01-09 Thread Iustin Pop
This adds a new optional (so we're backwards-compat) section to the cluster data so that we can reliably save/restore the policy data. Note that different from the other sections, we save all policies together and separately from the group data. I thought this is cleaner than extending adding the

[PATCH master 28/52] Add new disk_templates parameter to instance policy

2012-01-09 Thread Iustin Pop
This is a bit more complex patch, as it requires changing the assumption that all keys in the policy dict points to values that are themselves dicts. Right now we introduce an assumption that any non-dicts are lists, we'll see in the future if this holds or whether we need more complex type

[PATCH master 36/52] Set group policy on nodes

2012-01-09 Thread Iustin Pop
In order to be able to use the group policy during allocation, we have a few choices: - pass the group policy as a separate argument to all involved functions, or - add the policy as an attribute to nodes, or - add the group (not only the group index) as an attribute to nodes The first and

[PATCH master 01/52] Abstract tiered specs command line parsing

2012-01-09 Thread Iustin Pop
This will be used in the future for the standard specs too, so let's abstract it away. --- htools/Ganeti/HTools/CLI.hs | 29 - 1 files changed, 16 insertions(+), 13 deletions(-) diff --git a/htools/Ganeti/HTools/CLI.hs b/htools/Ganeti/HTools/CLI.hs index

[PATCH master 00/52] Instance policy changes [READ FIRST]

2012-01-09 Thread Iustin Pop
Hi all, This is a long patch series that does three main things: - extend the Python instance policy with disk templates - adapt htools for instance policies support (allocation, relocation, capacity) - related and unrelated unittest changes in htools The first item, disk templates in

[PATCH master 22/52] Switch hspace defaults to the cluster policy

2012-01-09 Thread Iustin Pop
This changes from the current hardcoded defaults to the cluster policy. The command line options now override the defaults from the cluster, and the tiered spec mode is always enabled. Also fixes a tiny typo in the man page (together with the man page updates). --- htools/Ganeti/HTools/CLI.hs

[PATCH master 38/52] Show explicit message when hspace fails to alloc

2012-01-09 Thread Iustin Pop
Currently, in the human-readable mode, hspace doesn't show any messages when no instances can be allocated in tiered-alloc mode. This is confusing, so let's add an explicit message. --- htools/Ganeti/HTools/Program/Hspace.hs | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-)

[PATCH master 37/52] Obey instance policy in allocation routines

2012-01-09 Thread Iustin Pop
This currently checks the minimum/maximum sizes and the disk template. Unittests will come later. --- htools/Ganeti/HTools/Cluster.hs |7 +-- htools/Ganeti/HTools/Instance.hs | 33 +++-- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git

[PATCH master 33/52] Add ipolicy attribute to group objects

2012-01-09 Thread Iustin Pop
This is straightforward; as before, so far the text and simu backends have no way to use a non-default ipolicy. Furthermore, we do some unit-test preparation for future changes (these seem a no-op for now, but they are needed for later patches). --- htools/Ganeti/HTools/Group.hs |6 --

[PATCH master 40/52] Add a helper function for 'not offline' instances

2012-01-09 Thread Iustin Pop
--- htools/Ganeti/HTools/Instance.hs |8 +++- htools/Ganeti/HTools/Loader.hs |2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/htools/Ganeti/HTools/Instance.hs b/htools/Ganeti/HTools/Instance.hs index d54dee5..5a8542e 100644 --- a/htools/Ganeti/HTools/Instance.hs

[PATCH master 41/52] Fix a couple of bugs in handling offline instances

2012-01-09 Thread Iustin Pop
The addition of the offline state for instances has introduced a few bugs related to their handling. The current code adds a helper function for making the check whether an instances uses reserved memory on the seoncondary (and uses it instead of just autoBalance), and furthermore uses

[PATCH master 39/52] Unittests for the instance policy checks on allocation

2012-01-09 Thread Iustin Pop
--- htools/Ganeti/HTools/QC.hs | 65 1 files changed, 65 insertions(+), 0 deletions(-) diff --git a/htools/Ganeti/HTools/QC.hs b/htools/Ganeti/HTools/QC.hs index 68cbbac..01ad0a1 100644 --- a/htools/Ganeti/HTools/QC.hs +++

[PATCH master 43/52] Generate clusters with unique node names in tests

2012-01-09 Thread Iustin Pop
Nothing breaks otherwise in the cluster routines, but serialisation to/from text gets confused otherwise. --- htools/Ganeti/HTools/QC.hs |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/htools/Ganeti/HTools/QC.hs b/htools/Ganeti/HTools/QC.hs index c75cfa6..1134dc5

[PATCH master 46/52] Further unittests for ipolicy/ispec text serialisation

2012-01-09 Thread Iustin Pop
--- htools/Ganeti/HTools/QC.hs | 15 +++ htools/Ganeti/HTools/Text.hs |5 + 2 files changed, 20 insertions(+), 0 deletions(-) diff --git a/htools/Ganeti/HTools/QC.hs b/htools/Ganeti/HTools/QC.hs index 5a98f7c..740f58a 100644 --- a/htools/Ganeti/HTools/QC.hs +++

[PATCH master 44/52] Add a complex allocation/serialisation/load test

2012-01-09 Thread Iustin Pop
This is unfortunately a complex test that checks if: - starting from a empty cluster - allocating a few instances on it - serialising it via the Text backend - loading it back into internal data structures we end up with the same thing. More precisely, it checks that the cluster after dump/load

[PATCH master 50/52] Fix a few issues in unittest data generation

2012-01-09 Thread Iustin Pop
This patch fixes two ugly but non-critical issues: - the getFQDN wrongly generated only the first component as limited-length name, the rest could be any length, and that makes the generated name bad for display purposes - the random generator had real issues in finding an offline instance

[PATCH master 49/52] Extend node evacuation unittests

2012-01-09 Thread Iustin Pop
Currently they only check for change secondary, via iallocator's relocate method. We add two separate unittests that checks all the node evacuate modes (ChangeAll, ChangePrimary) and also the group change request. All of these are done only for DRBD instances. The patch also enhances an error

[PATCH master 52/52] Fix another data generation issue in tests

2012-01-09 Thread Iustin Pop
Another good seed value manages to generate nodes with identical names, which of course makes the sets be of smaller value than the lists. Avoid this issue by generating unique node names. --- htools/Ganeti/HTools/QC.hs | 21 + 1 files changed, 13 insertions(+), 8

[PATCH master 47/52] Further JSON unit-tests for various Types.hs types

2012-01-09 Thread Iustin Pop
--- htools/Ganeti/HTools/QC.hs | 33 + 1 files changed, 29 insertions(+), 4 deletions(-) diff --git a/htools/Ganeti/HTools/QC.hs b/htools/Ganeti/HTools/QC.hs index 740f58a..fae433b 100644 --- a/htools/Ganeti/HTools/QC.hs +++ b/htools/Ganeti/HTools/QC.hs @@

[PATCH master 48/52] Add a unit-test helper function

2012-01-09 Thread Iustin Pop
… instead of always using printTestCase … False. --- htools/Ganeti/HTools/QC.hs | 45 --- 1 files changed, 21 insertions(+), 24 deletions(-) diff --git a/htools/Ganeti/HTools/QC.hs b/htools/Ganeti/HTools/QC.hs index fae433b..732d744 100644 ---

[PATCH master 51/52] Remove some dead code

2012-01-09 Thread Iustin Pop
While wondering why Cluster.tryReloc is not unit-tested, I realised that this is no longer uses. Apparently, last summer's new IAllocator modes and related changes have silently deprecated this function. --- htools/Ganeti/HTools/Cluster.hs | 29 - 1 files changed, 0

[PATCH master 26/52] Move the instance specs options to cli.py

2012-01-09 Thread Iustin Pop
Currently these are defined twice, instead of a single time in cli.py. Also adds the new disk_templates option to the common block, even though it's not yet used. --- lib/cli.py| 11 +++ lib/client/gnt_cluster.py |8 lib/client/gnt_group.py |8

[PATCH master 23/52] Fix handling of errors from InstancePolicy.Check...

2012-01-09 Thread Iustin Pop
This code raises a configuration error, but we need to transform it into a prereq error (or possibly exec error), depending on when we call this function. --- lib/cmdlib.py | 18 +++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py

[PATCH master] gen-coverage: Change filter

2012-01-09 Thread Michael Hanselmann
It is not necessary to run a Python script to generate the filter, which didn't work very well anyway on systems with modules in /usr/share/pyshared. --- autotools/gen-coverage | 15 --- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/autotools/gen-coverage

Re: [PATCH master] gen-coverage: Change filter

2012-01-09 Thread Iustin Pop
On Mon, Jan 09, 2012 at 03:15:32PM +0100, Michael Hanselmann wrote: It is not necessary to run a Python script to generate the filter, which didn't work very well anyway on systems with modules in /usr/share/pyshared. LGTM

[PATCH master] InstanceStartup: use overridden beparams in prereq

2012-01-09 Thread Guido Trotter
Without doing this memory checks happen on instance default parameters rather than any overridden ones. Signed-off-by: Guido Trotter ultrot...@google.com --- lib/cmdlib.py |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index

Re: [PATCH master] InstanceStartup: use overridden beparams in prereq

2012-01-09 Thread Michael Hanselmann
Am 9. Januar 2012 14:02 schrieb Guido Trotter ultrot...@google.com: Without doing this memory checks happen on instance default parameters rather than any overridden ones. LGTM

[MERGE] devel-2.4 into stable-2.5

2012-01-09 Thread Michael Hanselmann
commit e77b225e34421645c987acc77760765d4c73d98c Merge: 585c818 b39d17b Author: Michael Hanselmann han...@google.com Date: Mon Jan 9 17:09:56 2012 +0100 Merge branch 'devel-2.4' into stable-2.5 * devel-2.4: Add UnescapeAndSplit unittest for multi-escapes Fix a bug in

Re: [MERGE] devel-2.4 into stable-2.5

2012-01-09 Thread Iustin Pop
On Mon, Jan 09, 2012 at 05:10:35PM +0100, Michael Hanselmann wrote: commit e77b225e34421645c987acc77760765d4c73d98c Merge: 585c818 b39d17b Author: Michael Hanselmann han...@google.com LGTM.

[PATCH stable-2.5] Bump version to 2.5.0~rc5, update NEWS

2012-01-09 Thread Michael Hanselmann
Signed-off-by: Michael Hanselmann han...@google.com --- NEWS | 24 +++- configure.ac |2 +- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/NEWS b/NEWS index aa8bf69..5ed5ca9 100644 --- a/NEWS +++ b/NEWS @@ -5,19 +5,7 @@ News Version 2.5.0 rc5

Re: [PATCH stable-2.5] Bump version to 2.5.0~rc5, update NEWS

2012-01-09 Thread Iustin Pop
On Mon, Jan 09, 2012 at 05:27:55PM +0100, Michael Hanselmann wrote: Signed-off-by: Michael Hanselmann han...@google.com Don't you want to mention the forward-port of the two important fixes from 2.4? iustin

Re: [PATCH stable-2.5] Bump version to 2.5.0~rc5, update NEWS

2012-01-09 Thread Michael Hanselmann
Am 9. Januar 2012 14:29 schrieb Iustin Pop ius...@google.com: On Mon, Jan 09, 2012 at 05:27:55PM +0100, Michael Hanselmann wrote: Signed-off-by: Michael Hanselmann han...@google.com Don't you want to mention the forward-port of the two important fixes from 2.4? They would be included in the

Re: [PATCH stable-2.5] Bump version to 2.5.0~rc5, update NEWS

2012-01-09 Thread Iustin Pop
On Mon, Jan 09, 2012 at 02:39:08PM -0200, Michael Hanselmann wrote: Am 9. Januar 2012 14:29 schrieb Iustin Pop ius...@google.com: On Mon, Jan 09, 2012 at 05:27:55PM +0100, Michael Hanselmann wrote: Signed-off-by: Michael Hanselmann han...@google.com Don't you want to mention the

[PATCH master] Fix KVM migration finalization

2012-01-09 Thread Andrea Spadaccini
KVM execution must be resumed (_CONT_CMD) if we are done with non-live migration, not with live migration. Signed-off-by: Andrea Spadaccini spadac...@google.com --- lib/hypervisor/hv_kvm.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/hypervisor/hv_kvm.py

[PATCH master 0/4] Manual memory ballooning

2012-01-09 Thread Guido Trotter
gnt-instance set-mem and relevant RAPI call. Tested locally but no buildbot as today it was down, but still sending in the meantime for code style and review purposes. Based on my already-reviewed but not submitted balloon patch series. Guido Trotter (4): gnt-instance set-mem Disable two

[PATCH master 1/4] gnt-instance set-mem

2012-01-09 Thread Guido Trotter
Signed-off-by: Guido Trotter ultrot...@google.com --- doc/hooks.rst | 11 ++ lib/client/gnt_instance.py | 35 lib/cmdlib.py | 76 lib/opcodes.py | 10 ++ man/gnt-instance.rst

[PATCH master 2/4] Disable two pylint errors in qa

2012-01-09 Thread Guido Trotter
Signed-off-by: Guido Trotter ultrot...@google.com --- qa/qa_config.py |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/qa/qa_config.py b/qa/qa_config.py index b4cff14..28a58de 100644 --- a/qa/qa_config.py +++ b/qa/qa_config.py @@ -57,6 +57,7 @@ def Validate(): def

[PATCH master 4/4] Burnin: test set-mem

2012-01-09 Thread Guido Trotter
Add new --maxmem-size and --minmem-size options. The old --mem-size option allows setting both at the same time. If --minmem-size is lower than --maxmem-size execute a set-mem on all instances, bringing them to their minimum memory size. Signed-off-by: Guido Trotter ultrot...@google.com ---

[PATCH master 0/5] Start instances with less than max memory

2012-01-09 Thread Guido Trotter
This patch series (based on the other two balloon series) allows instances to be started even if the target node doesn't have all the needed memory. If it sounds good similar changes can be applied to migration and failover. Guido Trotter (5): Xen: make _WriteConfigFile a method kvm: always

[PATCH master 1/5] Xen: make _WriteConfigFile a method

2012-01-09 Thread Guido Trotter
This is only called by proper methods anyway, and will need to call a method in the base hypervisor to calculate the correct startup memory. Since that method calls in turn GetNodeInfo, which is a real method, it's easier to just make _WriteConfigFile a method too. Signed-off-by: Guido Trotter

[PATCH master 2/5] kvm: always start in paused state

2012-01-09 Thread Guido Trotter
Currently kvm starts in a frozen state if cpu pinning is set. This is useful for other purposes as well (eg. ballooning before the instance uses the memory), so we move the functionality out of the cpu pinning code. Note that before the continue command was executed in a finally after trying to

[PATCH master 3/5] Instance startup: lock primary node

2012-01-09 Thread Guido Trotter
This will be used to balloon other instances on the node if needed. Signed-off-by: Guido Trotter ultrot...@google.com --- lib/cmdlib.py |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 040de0e..5a6c05c 100644 --- a/lib/cmdlib.py +++

[PATCH master 4/5] hypervisors: start instances with max available mem

2012-01-09 Thread Guido Trotter
If we have available more than MINMEM but less than MAXMEM, start a new instance with that value, rather than MAXMEM. Signed-off-by: Guido Trotter ultrot...@google.com --- lib/hypervisor/hv_base.py | 18 ++ lib/hypervisor/hv_fake.py |4 ++-- lib/hypervisor/hv_kvm.py |4

[PATCH master 5/5] LUInstanceStartup: check for minimum memory

2012-01-09 Thread Guido Trotter
Signed-off-by: Guido Trotter ultrot...@google.com --- lib/cmdlib.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 5a6c05c..f410efc 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -6550,7 +6550,7 @@ class

Re: [PATCH master] Fix KVM migration finalization

2012-01-09 Thread Guido Trotter
LGTM Thanks, Guido On Mon, Jan 9, 2012 at 5:08 PM, Andrea Spadaccini spadac...@google.com wrote: KVM execution must be resumed (_CONT_CMD) if we are done with non-live migration, not with live migration. Signed-off-by: Andrea Spadaccini spadac...@google.com ---  lib/hypervisor/hv_kvm.py

Re: [PATCH master 1/4] gnt-instance set-mem

2012-01-09 Thread Andrea Spadaccini
Hi Guido, +**set-mem** [--force] [--submit] {*instance*} {*memory*} + +Set the run-time memory of an instance to the specified amount. You might want to specify that the memory amount is measured in MB. Andrea

Re: [PATCH master 1/4] gnt-instance set-mem

2012-01-09 Thread Andrea Spadaccini
Hi Guido, +ganeti-devel +**set-mem** [--force] [--submit] {*instance*} {*memory*} + +Set the run-time memory of an instance to the specified amount. You might want to specify that the memory amount is measured in MB. Sure. Changed to: Set the run-time memory of an instance to the

Re: [PATCH master 1/4] gnt-instance set-mem

2012-01-09 Thread Guido Trotter
On Mon, Jan 9, 2012 at 6:27 PM, Andrea Spadaccini spadac...@google.com wrote: You might want to specify that the memory amount is measured in MB. Sure. Changed to: Set the run-time memory of an instance to the specified amount, in MiB. Ah it's MiB. So the error message in