Skip to content

Commit

Permalink
Log more details when unmounting fails (to debug bsc#1090018) (#685)
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Apr 19, 2018
1 parent 6031118 commit 16a5c33
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
7 changes: 7 additions & 0 deletions package/yast2-installation.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Apr 19 13:05:23 UTC 2018 - lslezak@suse.cz

- Log more details when unmounting the target partition fails
(to debug bsc#1090018)
- 4.0.50

-------------------------------------------------------------------
Tue Apr 17 12:37:12 UTC 2018 - igonzalezsosa@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-installation.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#

Name: yast2-installation
Version: 4.0.49
Version: 4.0.50
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
9 changes: 9 additions & 0 deletions src/lib/installation/clients/umount_finish.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

require "y2storage"
require "pathname"
require "shellwords"

module Yast
class UmountFinishClient < Client
Expand Down Expand Up @@ -158,6 +159,14 @@ def main
WFM.Execute(path(".local.umount"), umount_this)
)
if umount_result != true
# run "fuser" to get the details about open files
# (the details are printed on STDERR, redirect it)
fuser = begin
`LC_ALL=C fuser -v -m #{Shellwords.escape(umount_this)} 2>&1`
rescue => e
"fuser failed: #{e}"
end
log.warn("Running processes using #{umount_this}: #{fuser}")
# bnc #395034
# Don't remount them read-only!
if Builtins.contains(
Expand Down

0 comments on commit 16a5c33

Please sign in to comment.