projects
/
invirt/packages/invirt-remote.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d320324
)
Add a safety check to the janitor to make sure we only delete old_ LV.
author
Evan Broder
<broder@mit.edu>
Wed, 12 Aug 2009 03:01:15 +0000
(23:01 -0400)
committer
Evan Broder
<broder@mit.edu>
Wed, 12 Aug 2009 03:01:15 +0000
(23:01 -0400)
svn path=/trunk/packages/invirt-remote/; revision=2438
host/usr/sbin/invirt-janitor
patch
|
blob
|
history
diff --git
a/host/usr/sbin/invirt-janitor
b/host/usr/sbin/invirt-janitor
index
e631972
..
6edcca9
100755
(executable)
--- a/
host/usr/sbin/invirt-janitor
+++ b/
host/usr/sbin/invirt-janitor
@@
-40,6
+40,14
@@
def cleanup():
lv_path = '/dev/xenvg/%s' % lv
try:
+ # If the LV name doesn't start with old_, we probably
+ # don't actually want to be deleting it.
+ #
+ # Put it in the try block because we still want to delete
+ # the state file.
+ if not lv.startswith('old_'):
+ continue
+
syslog.syslog(syslog.LOG_INFO, "Cleaning up LV '%s'" % lv_path)
# In a perfect world, this should be erroring out with