Commit 432e8e2f authored by Iustin Pop's avatar Iustin Pop
Browse files

Add new spindle_count node parameter



Currently this is not handled by Ganeti, just recorded.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 2a27dac3
......@@ -973,9 +973,11 @@ IPOLICY_ALL_KEYS = (IPOLICY_ISPECS |
# Node parameter names
ND_OOB_PROGRAM = "oob_program"
ND_SPINDLE_COUNT = "spindle_count"
NDS_PARAMETER_TYPES = {
ND_OOB_PROGRAM: VTYPE_MAYBE_STRING,
ND_SPINDLE_COUNT: VTYPE_INT,
}
NDS_PARAMETERS = frozenset(NDS_PARAMETER_TYPES.keys())
......@@ -1817,6 +1819,7 @@ BEC_DEFAULTS = {
NDC_DEFAULTS = {
ND_OOB_PROGRAM: None,
ND_SPINDLE_COUNT: 1,
}
DISK_LD_DEFAULTS = {
......
......@@ -99,8 +99,8 @@ vm_capable
Node Parameters
~~~~~~~~~~~~~~~
These parameters are node specific and can be preseeded on node-group
and cluster level.
The ``ndparams`` refer to node parameters. These can be set as defaults
on cluster and node group levels, but they take effect for nodes only.
Currently we support the following node parameters:
......@@ -109,6 +109,13 @@ oob_program
the `Ganeti Node OOB Management Framework <design-oob.rst>`_ design
document.
spindle_count
This should reflect the I/O performance of local attached storage
(e.g. for "file", "plain" and "drbd" disk templates). It doesn't
have to match the actual spindle count of (any eventual) mechanical
hard-drives, its meaning is site-local and just the relative values
matter.
Hypervisor State Parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
#!/usr/bin/python
#
# Copyright (C) 2006, 2007, 2010, 2011 Google Inc.
# Copyright (C) 2006, 2007, 2010, 2011, 2012 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -200,6 +200,7 @@ class TestConfigRunner(unittest.TestCase):
def testGetNdParamsModifiedNode(self):
my_ndparams = {
constants.ND_OOB_PROGRAM: "/bin/node-oob",
constants.ND_SPINDLE_COUNT: 1,
}
cfg = self._get_object()
......
#!/usr/bin/python
#
# Copyright (C) 2006, 2007, 2008, 2010 Google Inc.
# Copyright (C) 2006, 2007, 2008, 2010, 2012 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -78,7 +78,8 @@ class TestClusterObject(unittest.TestCase):
},
}
ndparams = {
constants.ND_OOB_PROGRAM: "/bin/cluster-oob"
constants.ND_OOB_PROGRAM: "/bin/cluster-oob",
constants.ND_SPINDLE_COUNT: 1
}
self.fake_cl = objects.Cluster(hvparams=hvparams, os_hvp=os_hvp,
......@@ -161,7 +162,8 @@ class TestClusterObject(unittest.TestCase):
ndparams={},
group="testgroup")
group_ndparams = {
constants.ND_OOB_PROGRAM: "/bin/group-oob"
constants.ND_OOB_PROGRAM: "/bin/group-oob",
constants.ND_SPINDLE_COUNT: 10,
}
fake_group = objects.NodeGroup(name="testgroup",
ndparams=group_ndparams)
......@@ -170,7 +172,8 @@ class TestClusterObject(unittest.TestCase):
def testFillNdParamsNode(self):
node_ndparams = {
constants.ND_OOB_PROGRAM: "/bin/node-oob"
constants.ND_OOB_PROGRAM: "/bin/node-oob",
constants.ND_SPINDLE_COUNT: 2,
}
fake_node = objects.Node(name="test",
ndparams=node_ndparams,
......@@ -182,13 +185,15 @@ class TestClusterObject(unittest.TestCase):
def testFillNdParamsAll(self):
node_ndparams = {
constants.ND_OOB_PROGRAM: "/bin/node-oob"
constants.ND_OOB_PROGRAM: "/bin/node-oob",
constants.ND_SPINDLE_COUNT: 5,
}
fake_node = objects.Node(name="test",
ndparams=node_ndparams,
group="testgroup")
group_ndparams = {
constants.ND_OOB_PROGRAM: "/bin/group-oob"
constants.ND_OOB_PROGRAM: "/bin/group-oob",
constants.ND_SPINDLE_COUNT: 4,
}
fake_group = objects.NodeGroup(name="testgroup",
ndparams=group_ndparams)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment