root / qa / ganeti-qa.py @ 4dc76b24
History | View | Annotate | Download (8.6 kB)
1 | a8083063 | Iustin Pop | #!/usr/bin/python
|
---|---|---|---|
2 | a8083063 | Iustin Pop | #
|
3 | a8083063 | Iustin Pop | |
4 | cec9845c | Michael Hanselmann | # Copyright (C) 2007 Google Inc.
|
5 | a8083063 | Iustin Pop | #
|
6 | a8083063 | Iustin Pop | # This program is free software; you can redistribute it and/or modify
|
7 | a8083063 | Iustin Pop | # it under the terms of the GNU General Public License as published by
|
8 | a8083063 | Iustin Pop | # the Free Software Foundation; either version 2 of the License, or
|
9 | a8083063 | Iustin Pop | # (at your option) any later version.
|
10 | a8083063 | Iustin Pop | #
|
11 | a8083063 | Iustin Pop | # This program is distributed in the hope that it will be useful, but
|
12 | a8083063 | Iustin Pop | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 | a8083063 | Iustin Pop | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14 | a8083063 | Iustin Pop | # General Public License for more details.
|
15 | a8083063 | Iustin Pop | #
|
16 | a8083063 | Iustin Pop | # You should have received a copy of the GNU General Public License
|
17 | a8083063 | Iustin Pop | # along with this program; if not, write to the Free Software
|
18 | a8083063 | Iustin Pop | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
19 | a8083063 | Iustin Pop | # 02110-1301, USA.
|
20 | a8083063 | Iustin Pop | |
21 | a8083063 | Iustin Pop | |
22 | cec9845c | Michael Hanselmann | """Script for doing QA on Ganeti.
|
23 | 94508060 | Michael Hanselmann |
|
24 | 94508060 | Michael Hanselmann | """
|
25 | a8083063 | Iustin Pop | |
26 | a8083063 | Iustin Pop | import sys |
27 | c68d1f43 | Michael Hanselmann | import datetime |
28 | c68d1f43 | Michael Hanselmann | import optparse |
29 | a8083063 | Iustin Pop | |
30 | cec9845c | Michael Hanselmann | import qa_cluster |
31 | cec9845c | Michael Hanselmann | import qa_config |
32 | cec9845c | Michael Hanselmann | import qa_daemon |
33 | cec9845c | Michael Hanselmann | import qa_env |
34 | cec9845c | Michael Hanselmann | import qa_instance |
35 | cec9845c | Michael Hanselmann | import qa_node |
36 | 8947cf2b | Michael Hanselmann | import qa_os |
37 | a47f574c | Oleksiy Mishchenko | import qa_rapi |
38 | d74c2ca1 | Michael Hanselmann | import qa_tags |
39 | 1672a0d1 | Michael Hanselmann | import qa_utils |
40 | a8083063 | Iustin Pop | |
41 | a8083063 | Iustin Pop | |
42 | cec9845c | Michael Hanselmann | def RunTest(fn, *args): |
43 | a8083063 | Iustin Pop | """Runs a test after printing a header.
|
44 | a8083063 | Iustin Pop |
|
45 | a8083063 | Iustin Pop | """
|
46 | cec9845c | Michael Hanselmann | if fn.__doc__:
|
47 | cec9845c | Michael Hanselmann | desc = fn.__doc__.splitlines()[0].strip()
|
48 | a8083063 | Iustin Pop | else:
|
49 | cec9845c | Michael Hanselmann | desc = '%r' % fn
|
50 | a8083063 | Iustin Pop | |
51 | c68d1f43 | Michael Hanselmann | now = str(datetime.datetime.now())
|
52 | a8083063 | Iustin Pop | |
53 | a8083063 | Iustin Pop | print
|
54 | a8083063 | Iustin Pop | print '---', now, ('-' * (55 - len(now))) |
55 | a8083063 | Iustin Pop | print desc
|
56 | a8083063 | Iustin Pop | print '-' * 60 |
57 | a8083063 | Iustin Pop | |
58 | cec9845c | Michael Hanselmann | return fn(*args)
|
59 | a8083063 | Iustin Pop | |
60 | a8083063 | Iustin Pop | |
61 | b1ffe1eb | Michael Hanselmann | def RunEnvTests(): |
62 | b1ffe1eb | Michael Hanselmann | """Run several environment tests.
|
63 | a8083063 | Iustin Pop |
|
64 | a8083063 | Iustin Pop | """
|
65 | b1ffe1eb | Michael Hanselmann | if not qa_config.TestEnabled('env'): |
66 | b1ffe1eb | Michael Hanselmann | return
|
67 | a8083063 | Iustin Pop | |
68 | b1ffe1eb | Michael Hanselmann | RunTest(qa_env.TestSshConnection) |
69 | b1ffe1eb | Michael Hanselmann | RunTest(qa_env.TestIcmpPing) |
70 | b1ffe1eb | Michael Hanselmann | RunTest(qa_env.TestGanetiCommands) |
71 | a8083063 | Iustin Pop | |
72 | 94508060 | Michael Hanselmann | |
73 | b1ffe1eb | Michael Hanselmann | def SetupCluster(): |
74 | b1ffe1eb | Michael Hanselmann | """Initializes the cluster.
|
75 | a8083063 | Iustin Pop |
|
76 | b1ffe1eb | Michael Hanselmann | """
|
77 | a5b9d725 | Iustin Pop | if qa_config.TestEnabled('create-cluster'): |
78 | a5b9d725 | Iustin Pop | RunTest(qa_cluster.TestClusterInit) |
79 | a5b9d725 | Iustin Pop | RunTest(qa_node.TestNodeAddAll) |
80 | b1ffe1eb | Michael Hanselmann | if qa_config.TestEnabled('node-info'): |
81 | b1ffe1eb | Michael Hanselmann | RunTest(qa_node.TestNodeInfo) |
82 | b1ffe1eb | Michael Hanselmann | |
83 | b1ffe1eb | Michael Hanselmann | |
84 | b1ffe1eb | Michael Hanselmann | def RunClusterTests(): |
85 | b1ffe1eb | Michael Hanselmann | """Runs tests related to gnt-cluster.
|
86 | 180bdd1f | Michael Hanselmann |
|
87 | b1ffe1eb | Michael Hanselmann | """
|
88 | cec9845c | Michael Hanselmann | if qa_config.TestEnabled('cluster-verify'): |
89 | cec9845c | Michael Hanselmann | RunTest(qa_cluster.TestClusterVerify) |
90 | e9e35aaa | Michael Hanselmann | |
91 | caea3b32 | Iustin Pop | if qa_config.TestEnabled('cluster-rename'): |
92 | caea3b32 | Iustin Pop | RunTest(qa_cluster.TestClusterRename) |
93 | caea3b32 | Iustin Pop | |
94 | cec9845c | Michael Hanselmann | if qa_config.TestEnabled('cluster-info'): |
95 | 62843684 | Michael Hanselmann | RunTest(qa_cluster.TestClusterVersion) |
96 | cec9845c | Michael Hanselmann | RunTest(qa_cluster.TestClusterInfo) |
97 | 283f9d4c | Michael Hanselmann | RunTest(qa_cluster.TestClusterGetmaster) |
98 | 283f9d4c | Michael Hanselmann | |
99 | cec9845c | Michael Hanselmann | if qa_config.TestEnabled('cluster-copyfile'): |
100 | cec9845c | Michael Hanselmann | RunTest(qa_cluster.TestClusterCopyfile) |
101 | a8083063 | Iustin Pop | |
102 | 830da270 | Michael Hanselmann | if qa_config.TestEnabled('cluster-command'): |
103 | 830da270 | Michael Hanselmann | RunTest(qa_cluster.TestClusterCommand) |
104 | 830da270 | Michael Hanselmann | |
105 | cec9845c | Michael Hanselmann | if qa_config.TestEnabled('cluster-burnin'): |
106 | cec9845c | Michael Hanselmann | RunTest(qa_cluster.TestClusterBurnin) |
107 | a8083063 | Iustin Pop | |
108 | cec9845c | Michael Hanselmann | if qa_config.TestEnabled('cluster-master-failover'): |
109 | cec9845c | Michael Hanselmann | RunTest(qa_cluster.TestClusterMasterFailover) |
110 | a8083063 | Iustin Pop | |
111 | a47f574c | Oleksiy Mishchenko | if qa_rapi.Enabled():
|
112 | a47f574c | Oleksiy Mishchenko | RunTest(qa_rapi.TestVersion) |
113 | a47f574c | Oleksiy Mishchenko | RunTest(qa_rapi.TestEmptyCluster) |
114 | 8947cf2b | Michael Hanselmann | |
115 | b1ffe1eb | Michael Hanselmann | def RunOsTests(): |
116 | b1ffe1eb | Michael Hanselmann | """Runs all tests related to gnt-os.
|
117 | 5d640672 | Michael Hanselmann |
|
118 | b1ffe1eb | Michael Hanselmann | """
|
119 | b1ffe1eb | Michael Hanselmann | if not qa_config.TestEnabled('os'): |
120 | b1ffe1eb | Michael Hanselmann | return
|
121 | b1ffe1eb | Michael Hanselmann | |
122 | b1ffe1eb | Michael Hanselmann | RunTest(qa_os.TestOsList) |
123 | b1ffe1eb | Michael Hanselmann | RunTest(qa_os.TestOsDiagnose) |
124 | b1ffe1eb | Michael Hanselmann | RunTest(qa_os.TestOsValid) |
125 | b1ffe1eb | Michael Hanselmann | RunTest(qa_os.TestOsInvalid) |
126 | b1ffe1eb | Michael Hanselmann | RunTest(qa_os.TestOsPartiallyValid) |
127 | b1ffe1eb | Michael Hanselmann | |
128 | b1ffe1eb | Michael Hanselmann | |
129 | b1ffe1eb | Michael Hanselmann | def RunCommonInstanceTests(instance): |
130 | b1ffe1eb | Michael Hanselmann | """Runs a few tests that are common to all disk types.
|
131 | b1ffe1eb | Michael Hanselmann |
|
132 | b1ffe1eb | Michael Hanselmann | """
|
133 | b1ffe1eb | Michael Hanselmann | if qa_config.TestEnabled('instance-shutdown'): |
134 | b1ffe1eb | Michael Hanselmann | RunTest(qa_instance.TestInstanceShutdown, instance) |
135 | b1ffe1eb | Michael Hanselmann | RunTest(qa_instance.TestInstanceStartup, instance) |
136 | a8083063 | Iustin Pop | |
137 | b1ffe1eb | Michael Hanselmann | if qa_config.TestEnabled('instance-list'): |
138 | b1ffe1eb | Michael Hanselmann | RunTest(qa_instance.TestInstanceList) |
139 | 283f9d4c | Michael Hanselmann | |
140 | b1ffe1eb | Michael Hanselmann | if qa_config.TestEnabled('instance-info'): |
141 | b1ffe1eb | Michael Hanselmann | RunTest(qa_instance.TestInstanceInfo, instance) |
142 | e9e35aaa | Michael Hanselmann | |
143 | c0f74c55 | Iustin Pop | if qa_config.TestEnabled('instance-modify'): |
144 | c0f74c55 | Iustin Pop | RunTest(qa_instance.TestInstanceModify, instance) |
145 | c0f74c55 | Iustin Pop | |
146 | 4379b1fa | Michael Hanselmann | if qa_config.TestEnabled('instance-console'): |
147 | 4379b1fa | Michael Hanselmann | RunTest(qa_instance.TestInstanceConsole, instance) |
148 | 4379b1fa | Michael Hanselmann | |
149 | b1ffe1eb | Michael Hanselmann | if qa_config.TestEnabled('instance-reinstall'): |
150 | b1ffe1eb | Michael Hanselmann | RunTest(qa_instance.TestInstanceShutdown, instance) |
151 | b1ffe1eb | Michael Hanselmann | RunTest(qa_instance.TestInstanceReinstall, instance) |
152 | b1ffe1eb | Michael Hanselmann | RunTest(qa_instance.TestInstanceStartup, instance) |
153 | a8083063 | Iustin Pop | |
154 | 8a4e8898 | Michael Hanselmann | if qa_config.TestEnabled('instance-reboot'): |
155 | 8a4e8898 | Michael Hanselmann | RunTest(qa_instance.TestInstanceReboot, instance) |
156 | 8a4e8898 | Michael Hanselmann | |
157 | d74c2ca1 | Michael Hanselmann | if qa_config.TestEnabled('tags'): |
158 | d74c2ca1 | Michael Hanselmann | RunTest(qa_tags.TestInstanceTags, instance) |
159 | d74c2ca1 | Michael Hanselmann | |
160 | b1ffe1eb | Michael Hanselmann | if qa_config.TestEnabled('node-volumes'): |
161 | b1ffe1eb | Michael Hanselmann | RunTest(qa_node.TestNodeVolumes) |
162 | 23269c5b | Michael Hanselmann | |
163 | a47f574c | Oleksiy Mishchenko | if qa_rapi.Enabled():
|
164 | a47f574c | Oleksiy Mishchenko | RunTest(qa_rapi.TestInstance, instance) |
165 | 23269c5b | Michael Hanselmann | |
166 | b1ffe1eb | Michael Hanselmann | def RunExportImportTests(instance, pnode): |
167 | b1ffe1eb | Michael Hanselmann | """Tries to export and import the instance.
|
168 | a8083063 | Iustin Pop |
|
169 | b1ffe1eb | Michael Hanselmann | """
|
170 | b1ffe1eb | Michael Hanselmann | if qa_config.TestEnabled('instance-export'): |
171 | b1ffe1eb | Michael Hanselmann | expnode = qa_config.AcquireNode(exclude=pnode) |
172 | b1ffe1eb | Michael Hanselmann | try:
|
173 | b1ffe1eb | Michael Hanselmann | name = RunTest(qa_instance.TestInstanceExport, instance, expnode) |
174 | b1ffe1eb | Michael Hanselmann | |
175 | b1ffe1eb | Michael Hanselmann | RunTest(qa_instance.TestBackupList, expnode) |
176 | b1ffe1eb | Michael Hanselmann | |
177 | b1ffe1eb | Michael Hanselmann | if qa_config.TestEnabled('instance-import'): |
178 | b1ffe1eb | Michael Hanselmann | newinst = qa_config.AcquireInstance() |
179 | 5d640672 | Michael Hanselmann | try:
|
180 | b1ffe1eb | Michael Hanselmann | RunTest(qa_instance.TestInstanceImport, pnode, newinst, |
181 | b1ffe1eb | Michael Hanselmann | expnode, name) |
182 | b1ffe1eb | Michael Hanselmann | RunTest(qa_instance.TestInstanceRemove, newinst) |
183 | 5d640672 | Michael Hanselmann | finally:
|
184 | b1ffe1eb | Michael Hanselmann | qa_config.ReleaseInstance(newinst) |
185 | b1ffe1eb | Michael Hanselmann | finally:
|
186 | b1ffe1eb | Michael Hanselmann | qa_config.ReleaseNode(expnode) |
187 | 5d640672 | Michael Hanselmann | |
188 | 283f9d4c | Michael Hanselmann | |
189 | b1ffe1eb | Michael Hanselmann | def RunDaemonTests(instance, pnode): |
190 | b1ffe1eb | Michael Hanselmann | """Test the ganeti-watcher script.
|
191 | 9df6d173 | Michael Hanselmann |
|
192 | b1ffe1eb | Michael Hanselmann | """
|
193 | b1ffe1eb | Michael Hanselmann | automatic_restart = \ |
194 | b1ffe1eb | Michael Hanselmann | qa_config.TestEnabled('instance-automatic-restart')
|
195 | b1ffe1eb | Michael Hanselmann | consecutive_failures = \ |
196 | b1ffe1eb | Michael Hanselmann | qa_config.TestEnabled('instance-consecutive-failures')
|
197 | a8083063 | Iustin Pop | |
198 | b1ffe1eb | Michael Hanselmann | if automatic_restart or consecutive_failures: |
199 | b1ffe1eb | Michael Hanselmann | qa_daemon.PrintCronWarning() |
200 | 5d640672 | Michael Hanselmann | |
201 | b1ffe1eb | Michael Hanselmann | if automatic_restart:
|
202 | b1ffe1eb | Michael Hanselmann | RunTest(qa_daemon.TestInstanceAutomaticRestart, pnode, instance) |
203 | e9e35aaa | Michael Hanselmann | |
204 | b1ffe1eb | Michael Hanselmann | if consecutive_failures:
|
205 | 6623a5c1 | Michael Hanselmann | RunTest(qa_daemon.TestInstanceConsecutiveFailures, pnode, instance) |
206 | e9e35aaa | Michael Hanselmann | |
207 | 9df6d173 | Michael Hanselmann | |
208 | b1ffe1eb | Michael Hanselmann | def RunHardwareFailureTests(instance, pnode, snode): |
209 | b1ffe1eb | Michael Hanselmann | """Test cluster internal hardware failure recovery.
|
210 | a8083063 | Iustin Pop |
|
211 | b1ffe1eb | Michael Hanselmann | """
|
212 | b1ffe1eb | Michael Hanselmann | if qa_config.TestEnabled('instance-failover'): |
213 | b1ffe1eb | Michael Hanselmann | RunTest(qa_instance.TestInstanceFailover, instance) |
214 | b1ffe1eb | Michael Hanselmann | |
215 | 7910e7a5 | Michael Hanselmann | if qa_config.TestEnabled('instance-replace-disks'): |
216 | 76f59a32 | Michael Hanselmann | othernode = qa_config.AcquireNode(exclude=[pnode, snode]) |
217 | 7910e7a5 | Michael Hanselmann | try:
|
218 | 7910e7a5 | Michael Hanselmann | RunTest(qa_instance.TestReplaceDisks, |
219 | 7910e7a5 | Michael Hanselmann | instance, pnode, snode, othernode) |
220 | 7910e7a5 | Michael Hanselmann | finally:
|
221 | 7910e7a5 | Michael Hanselmann | qa_config.ReleaseNode(othernode) |
222 | 7910e7a5 | Michael Hanselmann | |
223 | b1ffe1eb | Michael Hanselmann | if qa_config.TestEnabled('node-evacuate'): |
224 | b1ffe1eb | Michael Hanselmann | RunTest(qa_node.TestNodeEvacuate, pnode, snode) |
225 | b1ffe1eb | Michael Hanselmann | |
226 | b1ffe1eb | Michael Hanselmann | if qa_config.TestEnabled('node-failover'): |
227 | b1ffe1eb | Michael Hanselmann | RunTest(qa_node.TestNodeFailover, pnode, snode) |
228 | b1ffe1eb | Michael Hanselmann | |
229 | b1ffe1eb | Michael Hanselmann | if qa_config.TestEnabled('instance-disk-failure'): |
230 | b1ffe1eb | Michael Hanselmann | RunTest(qa_instance.TestInstanceMasterDiskFailure, |
231 | b1ffe1eb | Michael Hanselmann | instance, pnode, snode) |
232 | b1ffe1eb | Michael Hanselmann | RunTest(qa_instance.TestInstanceSecondaryDiskFailure, |
233 | b1ffe1eb | Michael Hanselmann | instance, pnode, snode) |
234 | b1ffe1eb | Michael Hanselmann | |
235 | b1ffe1eb | Michael Hanselmann | |
236 | b1ffe1eb | Michael Hanselmann | def main(): |
237 | b1ffe1eb | Michael Hanselmann | """Main program.
|
238 | b1ffe1eb | Michael Hanselmann |
|
239 | b1ffe1eb | Michael Hanselmann | """
|
240 | a39ec11a | Michael Hanselmann | parser = optparse.OptionParser(usage="%prog [options] <config-file>")
|
241 | b1ffe1eb | Michael Hanselmann | parser.add_option('--yes-do-it', dest='yes_do_it', |
242 | b1ffe1eb | Michael Hanselmann | action="store_true",
|
243 | b1ffe1eb | Michael Hanselmann | help="Really execute the tests")
|
244 | b1ffe1eb | Michael Hanselmann | (qa_config.options, args) = parser.parse_args() |
245 | 5d640672 | Michael Hanselmann | |
246 | a39ec11a | Michael Hanselmann | if len(args) == 1: |
247 | a39ec11a | Michael Hanselmann | (config_file, ) = args |
248 | b1ffe1eb | Michael Hanselmann | else:
|
249 | a39ec11a | Michael Hanselmann | parser.error("Wrong number of arguments.")
|
250 | a8083063 | Iustin Pop | |
251 | b1ffe1eb | Michael Hanselmann | if not qa_config.options.yes_do_it: |
252 | b1ffe1eb | Michael Hanselmann | print ("Executing this script irreversibly destroys any Ganeti\n" |
253 | b1ffe1eb | Michael Hanselmann | "configuration on all nodes involved. If you really want\n"
|
254 | b1ffe1eb | Michael Hanselmann | "to start testing, supply the --yes-do-it option.")
|
255 | b1ffe1eb | Michael Hanselmann | sys.exit(1)
|
256 | e9e35aaa | Michael Hanselmann | |
257 | b1ffe1eb | Michael Hanselmann | qa_config.Load(config_file) |
258 | a8083063 | Iustin Pop | |
259 | b1ffe1eb | Michael Hanselmann | RunEnvTests() |
260 | b1ffe1eb | Michael Hanselmann | SetupCluster() |
261 | b1ffe1eb | Michael Hanselmann | RunClusterTests() |
262 | b1ffe1eb | Michael Hanselmann | RunOsTests() |
263 | 4b62db14 | Michael Hanselmann | |
264 | d74c2ca1 | Michael Hanselmann | if qa_config.TestEnabled('tags'): |
265 | d74c2ca1 | Michael Hanselmann | RunTest(qa_tags.TestClusterTags) |
266 | d74c2ca1 | Michael Hanselmann | |
267 | 102b115b | Michael Hanselmann | if qa_config.TestEnabled('node-readd'): |
268 | 102b115b | Michael Hanselmann | master = qa_config.GetMasterNode() |
269 | 102b115b | Michael Hanselmann | pnode = qa_config.AcquireNode(exclude=master) |
270 | 102b115b | Michael Hanselmann | try:
|
271 | 102b115b | Michael Hanselmann | RunTest(qa_node.TestNodeReadd, pnode) |
272 | 102b115b | Michael Hanselmann | finally:
|
273 | 102b115b | Michael Hanselmann | qa_config.ReleaseNode(pnode) |
274 | 102b115b | Michael Hanselmann | |
275 | b1ffe1eb | Michael Hanselmann | pnode = qa_config.AcquireNode() |
276 | b1ffe1eb | Michael Hanselmann | try:
|
277 | d74c2ca1 | Michael Hanselmann | if qa_config.TestEnabled('tags'): |
278 | d74c2ca1 | Michael Hanselmann | RunTest(qa_tags.TestNodeTags, pnode) |
279 | d74c2ca1 | Michael Hanselmann | |
280 | a47f574c | Oleksiy Mishchenko | if qa_rapi.Enabled():
|
281 | a47f574c | Oleksiy Mishchenko | RunTest(qa_rapi.TestNode, pnode) |
282 | a47f574c | Oleksiy Mishchenko | |
283 | b1ffe1eb | Michael Hanselmann | if qa_config.TestEnabled('instance-add-plain-disk'): |
284 | b1ffe1eb | Michael Hanselmann | instance = RunTest(qa_instance.TestInstanceAddWithPlainDisk, pnode) |
285 | b1ffe1eb | Michael Hanselmann | RunCommonInstanceTests(instance) |
286 | b1ffe1eb | Michael Hanselmann | RunExportImportTests(instance, pnode) |
287 | b1ffe1eb | Michael Hanselmann | RunDaemonTests(instance, pnode) |
288 | b1ffe1eb | Michael Hanselmann | RunTest(qa_instance.TestInstanceRemove, instance) |
289 | b1ffe1eb | Michael Hanselmann | del instance
|
290 | 9df6d173 | Michael Hanselmann | |
291 | 7d7609a3 | Michael Hanselmann | multinode_tests = [ |
292 | 7d7609a3 | Michael Hanselmann | ('instance-add-drbd-disk',
|
293 | 7d7609a3 | Michael Hanselmann | qa_instance.TestInstanceAddWithDrbdDisk), |
294 | 7d7609a3 | Michael Hanselmann | ] |
295 | 7d7609a3 | Michael Hanselmann | |
296 | 7d7609a3 | Michael Hanselmann | for name, func in multinode_tests: |
297 | 7d7609a3 | Michael Hanselmann | if qa_config.TestEnabled(name):
|
298 | 7d7609a3 | Michael Hanselmann | snode = qa_config.AcquireNode(exclude=pnode) |
299 | 7d7609a3 | Michael Hanselmann | try:
|
300 | 7d7609a3 | Michael Hanselmann | instance = RunTest(func, pnode, snode) |
301 | 7d7609a3 | Michael Hanselmann | RunCommonInstanceTests(instance) |
302 | 7d7609a3 | Michael Hanselmann | RunExportImportTests(instance, pnode) |
303 | 7d7609a3 | Michael Hanselmann | RunHardwareFailureTests(instance, pnode, snode) |
304 | 7d7609a3 | Michael Hanselmann | RunTest(qa_instance.TestInstanceRemove, instance) |
305 | 7d7609a3 | Michael Hanselmann | del instance
|
306 | 7d7609a3 | Michael Hanselmann | finally:
|
307 | 7d7609a3 | Michael Hanselmann | qa_config.ReleaseNode(snode) |
308 | a8083063 | Iustin Pop | |
309 | a8083063 | Iustin Pop | finally:
|
310 | b1ffe1eb | Michael Hanselmann | qa_config.ReleaseNode(pnode) |
311 | a8083063 | Iustin Pop | |
312 | a5b9d725 | Iustin Pop | if qa_config.TestEnabled('create-cluster'): |
313 | a5b9d725 | Iustin Pop | RunTest(qa_node.TestNodeRemoveAll) |
314 | a8083063 | Iustin Pop | |
315 | cec9845c | Michael Hanselmann | if qa_config.TestEnabled('cluster-destroy'): |
316 | cec9845c | Michael Hanselmann | RunTest(qa_cluster.TestClusterDestroy) |
317 | a8083063 | Iustin Pop | |
318 | cec9845c | Michael Hanselmann | |
319 | cec9845c | Michael Hanselmann | if __name__ == '__main__': |
320 | cec9845c | Michael Hanselmann | main() |