Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1777805

Summary: Improve logging during block size detections
Product: [oVirt] ovirt-distribution Reporter: Vojtech Juranek <vjuranek>
Component: ioprocessAssignee: Pavel Bar <pbar>
ioprocess sub component: General QA Contact: Pavel Stehlik <pstehlik>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: low    
Priority: low CC: bugs, nsoffer, tnisan
Version: 4.3.7   
Target Milestone: ovirt-4.4.3   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-13 10:33:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vojtech Juranek 2019-11-28 11:07:48 UTC
Description of problem:

When we detect block size, we create probe file and try to write possible block sizes there. After that, we remove the file. If it fails during this process, we get general exception like "Operation not permitted" (see e.g. BZ #1777726), but it's not clear, where exactly it failed (writing file, deleting file). It would be nice to provide more precise exception (e.g. "Failed to remove file $FILENAME: Operation not permitted"), as that admin can easily determine, where the problem is.

Comment 1 Nir Soffer 2020-02-01 21:38:46 UTC
The error message comes from ioprocess so it can be improved only there.

Comment 2 Nir Soffer 2020-05-26 11:47:47 UTC
Fixing the exception message is not enough since we delete the file after 
a successful probing, and we need to know about failing to delete a probe
file.

The simplest solution is to log detailed warnings in exp_probe_block_size()
open_probe() and close_probe(). These logs are written to iprocess stderr
and logged by vdsm. This should provide all the info we need to debug
issues.

If we want to pass a detailed error message for each of these unlikely
errors, we need to pass the GError** err from the API all down to
probe_open() use g_set_error().

I would start with logging warnings and spend our time on something
which bring more value to users.

Comment 3 Nir Soffer 2020-07-07 08:16:10 UTC
ioprocess with this fix was not released yet so we cannot 
test it yet.

Comment 4 Tal Nisan 2020-10-13 10:33:05 UTC
No need for verification, this is only logs addition