Revision b2e7666a lib/backend.py
b/lib/backend.py | ||
---|---|---|
2073 | 2073 |
return True |
2074 | 2074 |
|
2075 | 2075 |
|
2076 |
def CloseBlockDevices(disks): |
|
2076 |
def CloseBlockDevices(instance_name, disks):
|
|
2077 | 2077 |
"""Closes the given block devices. |
2078 | 2078 |
|
2079 | 2079 |
This means they will be switched to secondary mode (in case of |
2080 | 2080 |
DRBD). |
2081 | 2081 |
|
2082 |
@param instance_name: if the argument is not empty, the symlinks |
|
2083 |
of this instance will be removed |
|
2082 | 2084 |
@type disks: list of L{objects.Disk} |
2083 | 2085 |
@param disks: the list of disks to be closed |
2084 | 2086 |
@rtype: tuple (success, message) |
... | ... | |
2104 | 2106 |
if msg: |
2105 | 2107 |
return (False, "Can't make devices secondary: %s" % ",".join(msg)) |
2106 | 2108 |
else: |
2109 |
if instance_name: |
|
2110 |
_RemoveBlockDevLinks(instance_name) |
|
2107 | 2111 |
return (True, "All devices secondary") |
2108 | 2112 |
|
2109 | 2113 |
|
Also available in: Unified diff