From 21b7632fe92f8f2ed8899768958d05fc2e27fec7 Mon Sep 17 00:00:00 2001 From: Daniel Clavijo Coca Date: Mon, 25 Mar 2019 12:19:24 -0600 Subject: [PATCH] B #3103 Fix ext4 handling code --- src/vmm_mad/remotes/lib/lxd/mapper/mapper.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/vmm_mad/remotes/lib/lxd/mapper/mapper.rb b/src/vmm_mad/remotes/lib/lxd/mapper/mapper.rb index c39925d2861..e9d036a6822 100644 --- a/src/vmm_mad/remotes/lib/lxd/mapper/mapper.rb +++ b/src/vmm_mad/remotes/lib/lxd/mapper/mapper.rb @@ -481,7 +481,6 @@ def mount_resize_fs(device, directory, fs_type, disk) if o.empty? OpenNebula.log_error("#{err}#{e}") - return false else cmd = "#{COMMANDS[:resize2fs]} #{device}" rc, _o, e = Command.execute(cmd, false) @@ -511,7 +510,11 @@ def reset_fs_uuid(fs_type, device) when /xfs/ cmd = "#{COMMANDS[:xfs_admin]} -U generate #{device}" when /ext/ - Command.execute("#{COMMANDS[:e2fsck]} -f -y #{device}", false) + cmd = "#{COMMANDS[:e2fsck]} -f -y #{device}" + _rc, o, e = Command.execute(cmd, false) + + OpenNebula.log e if o.empty? + cmd = "#{COMMANDS[:tune2fs]} -U random #{device}" else return true