Bug 1911386

Summary: "Error when closing file" shows after image uploaded successfully
Product: Container Native Virtualization (CNV) Reporter: Guohua Ouyang <gouyang>
Component: StorageAssignee: Arnon Gilboa <agilboa>
Status: CLOSED ERRATA QA Contact: Alex Kalenyuk <akalenyu>
Severity: high Docs Contact:
Priority: high    
Version: 2.6.0CC: akalenyu, alitke, cnv-qe-bugs, gouyang, mrashish, ngavrilo, yadu, ycui
Target Milestone: ---Keywords: AutomationBlocker
Target Release: 2.6.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kubevirt 2.6.1-175 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-07 08:46:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Guohua Ouyang 2020-12-29 03:26:50 UTC
Description of problem:
$ virtctl image-upload dv rhel7 --size=10Gi --image-path=./cirros.img --storage-class=nfs  --access-mode=ReadWriteOnce --insecure -n openshift-virtualization-os-images
DataVolume openshift-virtualization-os-images/rhel7 created
Waiting for PVC rhel7 upload pod to be ready...
Pod now ready
Uploading data to https://cdi-uploadproxy-openshift-cnv.apps.sys01.cnv-qe.rhcloud.com

 12.13 MiB / 12.13 MiB [===================================================================================================] 100.00% 26s

Uploading data completed successfully, waiting for processing to complete, you can hit ctrl-c without interrupting the progress
Processing completed successfully
Uploading ./cirros.img completed successfully
{"component":"","level":"error","msg":"Error when closing file","pos":"os_helper.go:34","reason":"close ./cirros.img: file already closed","timestamp":"2020-12-29T01:28:23.403845Z"}


Version-Release number of selected component (if applicable):
$ virtctl version -c
Client Version: version.Info{GitVersion:"v0.36.0", GitCommit:"398cd404dba9ced6c298824a1bf681d387dd3a1c", GitTreeState:"clean", BuildDate:"2020-12-16T15:01:21Z", GoVersion:"go1.13.14", Compiler:"gc", Platform:"linux/amd64"}


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
"{"component":"","level":"error","msg":"Error when closing file","pos":"os_helper.go:34","reason":"close ./cirros.img: file already closed","timestamp":"2020-12-29T01:28:23.403845Z"}"  shows after upload finished.

Expected results:
No such error shows.

Additional info:

Comment 2 Natalie Gavrielov 2021-01-18 13:01:59 UTC
Targeting to 2.6.1, we don't consider this as a blocker anymore.

Comment 3 Kevin Alon Goldblatt 2021-02-08 13:15:52 UTC
Hi. From your comment ""{"component":"","level":"error","msg":"Error when closing file","pos":"os_helper.go:34","reason":"close ./cirros.img: file already closed","timestamp":"2020-12-29T01:28:23.403845Z"}"  shows after upload finished."

Where is the error reported. In a log? event?

Comment 4 Alex Kalenyuk 2021-02-08 13:24:58 UTC
(In reply to Kevin Alon Goldblatt from comment #3)
> Hi. From your comment ""{"component":"","level":"error","msg":"Error when
> closing file","pos":"os_helper.go:34","reason":"close ./cirros.img: file
> already closed","timestamp":"2020-12-29T01:28:23.403845Z"}"  shows after
> upload finished."
> 
> Where is the error reported. In a log? event?

It's the output from the virtctl command

Comment 5 Adam Litke 2021-02-18 21:31:04 UTC
Added backport PR

Comment 6 Arnon Gilboa 2021-03-17 08:14:06 UTC
merged into kubevirt:release-0.36

Comment 12 errata-xmlrpc 2021-04-07 08:46:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (CNV 2.6.1 Images), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:1126