Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-ganeti
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
itminedu
snf-ganeti
Commits
90e722d1
Commit
90e722d1
authored
16 years ago
by
Iustin Pop
Browse files
Options
Downloads
Patches
Plain Diff
burnin: Add activate/deactivate disks
Reviewed-by: imsnah
parent
cfacfd6e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/burnin
+20
-0
20 additions, 0 deletions
tools/burnin
with
20 additions
and
0 deletions
tools/burnin
+
20
−
0
View file @
90e722d1
...
...
@@ -157,6 +157,9 @@ class Burner(object):
parser
.
add_option
(
"
--no-reboot
"
,
dest
=
"
do_reboot
"
,
help
=
"
Skip instance reboot
"
,
action
=
"
store_false
"
,
default
=
True
)
parser
.
add_option
(
"
--no-activate-disks
"
,
dest
=
"
do_activate_disks
"
,
help
=
"
Skip disk activation/deactivation
"
,
action
=
"
store_false
"
,
default
=
True
)
parser
.
add_option
(
"
--no-nics
"
,
dest
=
"
nics
"
,
help
=
"
No network interfaces
"
,
action
=
"
store_const
"
,
const
=
[],
default
=
[{}])
...
...
@@ -486,6 +489,20 @@ class Burner(object):
Log
(
"
- Reboot instance %s with type
'
%s
'"
%
(
instance
,
reboot_type
))
self
.
ExecOp
(
op
)
def
ActivateDisks
(
self
):
"""
Activate and deactivate disks of the instances.
"""
for
instance
in
self
.
instances
:
op_act
=
opcodes
.
OpActivateInstanceDisks
(
instance_name
=
instance
)
op_deact
=
opcodes
.
OpDeactivateInstanceDisks
(
instance_name
=
instance
)
Log
(
"
- Activate disks of online instance %s
"
%
(
instance
,))
self
.
ExecOp
(
op_act
)
self
.
StopInstance
(
instance
)
Log
(
"
- Activate disks of offline instance %s
"
%
(
instance
,))
self
.
ExecOp
(
op_act
)
Log
(
"
- Deactivate disks of offline instance %s
"
%
(
instance
,))
self
.
ExecOp
(
op_deact
)
self
.
StartInstance
(
instance
)
def
BurninCluster
(
self
):
"""
Test a cluster intensively.
...
...
@@ -531,6 +548,9 @@ class Burner(object):
if
opts
.
do_reboot
:
self
.
Reboot
()
if
opts
.
do_activate_disks
:
self
.
ActivateDisks
()
if
opts
.
do_startstop
:
self
.
StopStart
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment