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
db915bd1
Commit
db915bd1
authored
17 years ago
by
Michael Hanselmann
Browse files
Options
Downloads
Patches
Plain Diff
Check for instances on “gnt-cluster destroy”.
Reviewed-by: iustinp
parent
739ecd56
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/cmdlib.py
+5
-1
5 additions, 1 deletion
lib/cmdlib.py
with
5 additions
and
1 deletion
lib/cmdlib.py
+
5
−
1
View file @
db915bd1
...
@@ -590,9 +590,13 @@ class LUDestroyCluster(NoHooksLU):
...
@@ -590,9 +590,13 @@ class LUDestroyCluster(NoHooksLU):
master
=
self
.
sstore
.
GetMasterNode
()
master
=
self
.
sstore
.
GetMasterNode
()
nodelist
=
self
.
cfg
.
GetNodeList
()
nodelist
=
self
.
cfg
.
GetNodeList
()
if
len
(
nodelist
)
>
0
and
nodelist
!=
[
master
]
:
if
len
(
nodelist
)
!=
1
or
nodelist
[
0
]
!=
master
:
raise
errors
.
OpPrereqError
,
(
"
There are still %d node(s) in
"
raise
errors
.
OpPrereqError
,
(
"
There are still %d node(s) in
"
"
this cluster.
"
%
(
len
(
nodelist
)
-
1
))
"
this cluster.
"
%
(
len
(
nodelist
)
-
1
))
instancelist
=
self
.
cfg
.
GetInstanceList
()
if
instancelist
:
raise
errors
.
OpPrereqError
,
(
"
There are still %d instance(s) in
"
"
this cluster.
"
%
len
(
instancelist
))
def
Exec
(
self
,
feedback_fn
):
def
Exec
(
self
,
feedback_fn
):
"""
Destroys the cluster.
"""
Destroys the cluster.
...
...
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