mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-12 09:17:41 +03:00
F OpenNebula/one#5502: Improve container clean (#1418)
(cherry picked from commit 88d720886537ba2232eed64cd5e771088ab321fa)
This commit is contained in:
parent
d87c885795
commit
9b19609540
@ -129,10 +129,10 @@ class Container
|
||||
end
|
||||
|
||||
# Clean bindpoint
|
||||
FileUtils.rm_rf(@one.bind_folder)
|
||||
FileUtils.rm_rf(@one.bind_folder) if Dir.exist?(@one.bind_folder)
|
||||
|
||||
# Destroy container
|
||||
@client.destroy(@one.vm_name)
|
||||
@client.destroy(@one.vm_name) if @client.list.include?(@one.vm_name)
|
||||
end
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -377,10 +377,7 @@ class Disk
|
||||
break unless device.empty?
|
||||
end
|
||||
|
||||
if device.empty?
|
||||
msg = "Cannot detect block device from #{@mountpoint}"
|
||||
OpenNebula.log_error(msg)
|
||||
end
|
||||
OpenNebula.log("No block device on #{@mountpoint}") if device.empty?
|
||||
|
||||
device
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user