Bug 1911386 - "Error when closing file" shows after image uploaded successfully
Summary: "Error when closing file" shows after image uploaded successfully
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Storage
Version: 2.6.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 2.6.1
Assignee: Arnon Gilboa
QA Contact: Alex Kalenyuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-29 03:26 UTC by Guohua Ouyang
Modified: 2021-04-07 08:46 UTC (History)
8 users (show)

Fixed In Version: kubevirt 2.6.1-175
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-07 08:46:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt kubevirt pull 4966 0 None closed Prevent virtctl file double-close on successful upload 2021-02-18 21:30:23 UTC
Github kubevirt kubevirt pull 5033 0 None open [release-0.36] Prevent virtctl file double-close on successful upload 2021-02-18 21:31:04 UTC
Red Hat Product Errata RHEA-2021:1126 0 None None None 2021-04-07 08:46:36 UTC

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


Note You need to log in before you can comment on or make changes to this bug.