mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-23 17:33:56 +03:00
Possible fix for "Message received: BACKUP SUCCESS 96 -" (?)
This commit is contained in:
parent
f4c42df235
commit
e6652bd08a
@ -91,7 +91,7 @@ begin
|
||||
ds = TransferManager::Datastore.new(:ds_xml => ds_xml)
|
||||
rescue StandardError => e
|
||||
STDERR.puts e.message
|
||||
exit(1)
|
||||
exit(-1)
|
||||
end
|
||||
|
||||
path = Pathname.new(base).cleanpath.to_s
|
||||
@ -139,4 +139,6 @@ if rc.code != 0 || rc.stdout.empty?
|
||||
exit(-1)
|
||||
end
|
||||
|
||||
puts "#{backup_id} #{rc.stdout.split[0]}"
|
||||
STDOUT.puts "#{backup_id} #{rc.stdout.split[0]}"
|
||||
|
||||
exit(0)
|
||||
|
@ -82,7 +82,7 @@ begin
|
||||
|
||||
if !diskid
|
||||
STDERR.puts "Wrong format for disk filename #{parts[2]}"
|
||||
exit(1)
|
||||
exit(-1)
|
||||
end
|
||||
|
||||
last_snap = parts[1].split(',')[-1].split(':')[-1]
|
||||
@ -90,7 +90,7 @@ begin
|
||||
cmd = "cat #{base_path}#{last_snap}/vm.xml"
|
||||
rescue StandardError => e
|
||||
STDERR.puts e.message
|
||||
exit(1)
|
||||
exit(-1)
|
||||
end
|
||||
|
||||
rc = TransferManager::Action.ssh('gather_vm_xml',
|
||||
@ -102,7 +102,7 @@ rc = TransferManager::Action.ssh('gather_vm_xml',
|
||||
|
||||
if rc.code != 0
|
||||
STDERR.puts rc.stderr
|
||||
exit(1)
|
||||
exit(-1)
|
||||
end
|
||||
|
||||
vm = REXML::Document.new(Base64.decode64(rc.stdout)).root
|
||||
@ -113,16 +113,16 @@ disk = vm.elements[xpath]
|
||||
|
||||
if !disk
|
||||
STDERR.puts "Cannot find disk #{diskid[1]} in VM backup info"
|
||||
exit(1)
|
||||
exit(-1)
|
||||
end
|
||||
|
||||
size = disk.elements['//SIZE']
|
||||
|
||||
if !size
|
||||
STDERR.puts "Cannot find size for disk #{diskid[1]} in VM backup info"
|
||||
exit(1)
|
||||
exit(-1)
|
||||
end
|
||||
|
||||
puts size.text
|
||||
STDOUT.puts size.text
|
||||
|
||||
exit 0
|
||||
exit(0)
|
||||
|
Loading…
Reference in New Issue
Block a user