Revision 432e8e2f
b/lib/constants.py | ||
---|---|---|
973 | 973 |
|
974 | 974 |
# Node parameter names |
975 | 975 |
ND_OOB_PROGRAM = "oob_program" |
976 |
ND_SPINDLE_COUNT = "spindle_count" |
|
976 | 977 |
|
977 | 978 |
NDS_PARAMETER_TYPES = { |
978 | 979 |
ND_OOB_PROGRAM: VTYPE_MAYBE_STRING, |
980 |
ND_SPINDLE_COUNT: VTYPE_INT, |
|
979 | 981 |
} |
980 | 982 |
|
981 | 983 |
NDS_PARAMETERS = frozenset(NDS_PARAMETER_TYPES.keys()) |
... | ... | |
1817 | 1819 |
|
1818 | 1820 |
NDC_DEFAULTS = { |
1819 | 1821 |
ND_OOB_PROGRAM: None, |
1822 |
ND_SPINDLE_COUNT: 1, |
|
1820 | 1823 |
} |
1821 | 1824 |
|
1822 | 1825 |
DISK_LD_DEFAULTS = { |
b/man/ganeti.rst | ||
---|---|---|
99 | 99 |
Node Parameters |
100 | 100 |
~~~~~~~~~~~~~~~ |
101 | 101 |
|
102 |
These parameters are node specific and can be preseeded on node-group
|
|
103 |
and cluster level.
|
|
102 |
The ``ndparams`` refer to node parameters. These can be set as defaults
|
|
103 |
on cluster and node group levels, but they take effect for nodes only.
|
|
104 | 104 |
|
105 | 105 |
Currently we support the following node parameters: |
106 | 106 |
|
... | ... | |
109 | 109 |
the `Ganeti Node OOB Management Framework <design-oob.rst>`_ design |
110 | 110 |
document. |
111 | 111 |
|
112 |
spindle_count |
|
113 |
This should reflect the I/O performance of local attached storage |
|
114 |
(e.g. for "file", "plain" and "drbd" disk templates). It doesn't |
|
115 |
have to match the actual spindle count of (any eventual) mechanical |
|
116 |
hard-drives, its meaning is site-local and just the relative values |
|
117 |
matter. |
|
118 |
|
|
112 | 119 |
|
113 | 120 |
Hypervisor State Parameters |
114 | 121 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
b/test/ganeti.config_unittest.py | ||
---|---|---|
1 | 1 |
#!/usr/bin/python |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2006, 2007, 2010, 2011 Google Inc. |
|
4 |
# Copyright (C) 2006, 2007, 2010, 2011, 2012 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
200 | 200 |
def testGetNdParamsModifiedNode(self): |
201 | 201 |
my_ndparams = { |
202 | 202 |
constants.ND_OOB_PROGRAM: "/bin/node-oob", |
203 |
constants.ND_SPINDLE_COUNT: 1, |
|
203 | 204 |
} |
204 | 205 |
|
205 | 206 |
cfg = self._get_object() |
b/test/ganeti.objects_unittest.py | ||
---|---|---|
1 | 1 |
#!/usr/bin/python |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2006, 2007, 2008, 2010 Google Inc. |
|
4 |
# Copyright (C) 2006, 2007, 2008, 2010, 2012 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
78 | 78 |
}, |
79 | 79 |
} |
80 | 80 |
ndparams = { |
81 |
constants.ND_OOB_PROGRAM: "/bin/cluster-oob" |
|
81 |
constants.ND_OOB_PROGRAM: "/bin/cluster-oob", |
|
82 |
constants.ND_SPINDLE_COUNT: 1 |
|
82 | 83 |
} |
83 | 84 |
|
84 | 85 |
self.fake_cl = objects.Cluster(hvparams=hvparams, os_hvp=os_hvp, |
... | ... | |
161 | 162 |
ndparams={}, |
162 | 163 |
group="testgroup") |
163 | 164 |
group_ndparams = { |
164 |
constants.ND_OOB_PROGRAM: "/bin/group-oob" |
|
165 |
constants.ND_OOB_PROGRAM: "/bin/group-oob", |
|
166 |
constants.ND_SPINDLE_COUNT: 10, |
|
165 | 167 |
} |
166 | 168 |
fake_group = objects.NodeGroup(name="testgroup", |
167 | 169 |
ndparams=group_ndparams) |
... | ... | |
170 | 172 |
|
171 | 173 |
def testFillNdParamsNode(self): |
172 | 174 |
node_ndparams = { |
173 |
constants.ND_OOB_PROGRAM: "/bin/node-oob" |
|
175 |
constants.ND_OOB_PROGRAM: "/bin/node-oob", |
|
176 |
constants.ND_SPINDLE_COUNT: 2, |
|
174 | 177 |
} |
175 | 178 |
fake_node = objects.Node(name="test", |
176 | 179 |
ndparams=node_ndparams, |
... | ... | |
182 | 185 |
|
183 | 186 |
def testFillNdParamsAll(self): |
184 | 187 |
node_ndparams = { |
185 |
constants.ND_OOB_PROGRAM: "/bin/node-oob" |
|
188 |
constants.ND_OOB_PROGRAM: "/bin/node-oob", |
|
189 |
constants.ND_SPINDLE_COUNT: 5, |
|
186 | 190 |
} |
187 | 191 |
fake_node = objects.Node(name="test", |
188 | 192 |
ndparams=node_ndparams, |
189 | 193 |
group="testgroup") |
190 | 194 |
group_ndparams = { |
191 |
constants.ND_OOB_PROGRAM: "/bin/group-oob" |
|
195 |
constants.ND_OOB_PROGRAM: "/bin/group-oob", |
|
196 |
constants.ND_SPINDLE_COUNT: 4, |
|
192 | 197 |
} |
193 | 198 |
fake_group = objects.NodeGroup(name="testgroup", |
194 | 199 |
ndparams=group_ndparams) |
Also available in: Unified diff