Revision 084f05a5 scripts/gnt-backup
b/scripts/gnt-backup | ||
---|---|---|
74 | 74 |
target_node=opts.node, |
75 | 75 |
shutdown=opts.shutdown) |
76 | 76 |
|
77 |
SubmitOpCode(op) |
|
78 |
|
|
77 |
fin_resu, dlist = SubmitOpCode(op) |
|
78 |
if not isinstance(dlist, list): |
|
79 |
ToStderr("Cannot parse execution results") |
|
80 |
return 1 |
|
81 |
tot_dsk = len(dlist) |
|
82 |
# TODO: handle diskless instances |
|
83 |
if dlist.count(False) == 0: |
|
84 |
# all OK |
|
85 |
rcode = 0 |
|
86 |
elif dlist.count(True) == 0: |
|
87 |
ToStderr("Error: No disks were backed up successfully." |
|
88 |
" The export doesn't have any valid data," |
|
89 |
" it is recommended to retry the operation.") |
|
90 |
rcode = 1 |
|
91 |
else: |
|
92 |
ToStderr("Partial export failure: %d disks backed up, %d disks failed.", |
|
93 |
dlist.count(True), dlist.count(False)) |
|
94 |
rcode = 2 |
|
95 |
if not fin_resu: |
|
96 |
rcode = 1 |
|
97 |
return rcode |
|
79 | 98 |
|
80 | 99 |
def ImportInstance(opts, args): |
81 | 100 |
"""Add an instance to the cluster. |
Also available in: Unified diff