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
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
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
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|
---
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
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
---
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
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
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
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
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
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
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 +-
---
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
---
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 @@
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
+++
---
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
+++
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 +-
---
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
+++
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(-)
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
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
---
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
@@
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
---
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,
+
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
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
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
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
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
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
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
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
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
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
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
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(-)
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
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 --
---
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
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
---
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
+++
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
---
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
+++
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
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
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
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
---
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
@@
… 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
---
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
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
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
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
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
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
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
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
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.
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
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
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
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
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
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
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
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
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
---
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
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
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
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
+++
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
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
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
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
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
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
78 matches
Mail list logo