Revision 944bf548
b/lib/backend.py | ||
---|---|---|
1948 | 1948 |
logging.error("Disk import command '%s' returned error: %s" |
1949 | 1949 |
" output: %s", command, result.fail_reason, |
1950 | 1950 |
result.output) |
1951 |
final_result.append(False) |
|
1952 |
else: |
|
1953 |
final_result.append(True) |
|
1954 |
else: |
|
1955 |
final_result.append(True) |
|
1951 |
final_result.append("error importing disk %d: %s, %s" % |
|
1952 |
(idx, result.fail_reason, result.output[-100])) |
|
1956 | 1953 |
|
1957 |
return final_result |
|
1954 |
if final_result: |
|
1955 |
return False, "; ".join(final_result) |
|
1956 |
return True, None |
|
1958 | 1957 |
|
1959 | 1958 |
|
1960 | 1959 |
def ListExports(): |
b/lib/cmdlib.py | ||
---|---|---|
4947 | 4947 |
import_result = self.rpc.call_instance_os_import(pnode_name, iobj, |
4948 | 4948 |
src_node, src_images, |
4949 | 4949 |
cluster_name) |
4950 |
import_result.Raise() |
|
4951 |
for idx, result in enumerate(import_result.data): |
|
4952 |
if not result: |
|
4953 |
self.LogWarning("Could not import the image %s for instance" |
|
4954 |
" %s, disk %d, on node %s" % |
|
4955 |
(src_images[idx], instance, idx, pnode_name)) |
|
4950 |
msg = import_result.RemoteFailMsg() |
|
4951 |
if msg: |
|
4952 |
self.LogWarning("Error while importing the disk images for instance" |
|
4953 |
" %s on node %s: %s" % (instance, pnode_name, msg)) |
|
4956 | 4954 |
else: |
4957 | 4955 |
# also checked in the prereq part |
4958 | 4956 |
raise errors.ProgrammerError("Unknown OS initialization mode '%s'" |
Also available in: Unified diff