-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Backend was closed" error during backup image transfer #23
Labels
bug
Issue is a bug or fix for a bug
Comments
barpavel
changed the title
"Backend was closed" during backup image trnsfer phase.
"Backend was closed" error during backup image transfer
Jan 17, 2022
nirs
added a commit
to nirs/ovirt-imageio
that referenced
this issue
Jan 17, 2022
When using a thread pool we try to reuse the connection backend by passing the connection backend to the first worker instead of cloning it. This introduce some issues: - The backend is closed twice: once by the worker, and again by the connection. This is safe since closing backend twice does nothing, but dirty. Will break if we try to use the backend after a copy. - With very small images, the first worker may close the original backend before another worker try to clone it. This is unlikely to happen with real images but can break the tests. Fix the issues by introducing a backend wrapper, overriding close() to disconnect from the wrapped backend instead of closing it. This ensures that dst is never closed before it is cloned, and that it is closed exactly once. Another approach to fix this is to close the initial backend used for preparing a copy, pass the backends open argument to io.copy(), and open new backends in the workers without all the hacks. This requires lot of work, so I'm staring with this minimal change. Fixes oVirt#23 Signed-off-by: Nir Soffer <nsoffer@redhat.com>
This is an old issue that was hidden by the nbd backend that In 4df9f1c we change the nbd |
vjuranek
pushed a commit
that referenced
this issue
Jan 18, 2022
When using a thread pool we try to reuse the connection backend by passing the connection backend to the first worker instead of cloning it. This introduce some issues: - The backend is closed twice: once by the worker, and again by the connection. This is safe since closing backend twice does nothing, but dirty. Will break if we try to use the backend after a copy. - With very small images, the first worker may close the original backend before another worker try to clone it. This is unlikely to happen with real images but can break the tests. Fix the issues by introducing a backend wrapper, overriding close() to disconnect from the wrapped backend instead of closing it. This ensures that dst is never closed before it is cloned, and that it is closed exactly once. Another approach to fix this is to close the initial backend used for preparing a copy, pass the backends open argument to io.copy(), and open new backends in the workers without all the hacks. This requires lot of work, so I'm staring with this minimal change. Fixes #23 Signed-off-by: Nir Soffer <nsoffer@redhat.com>
This was referenced Jan 18, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When executing image download as part of the backup (happens both during a full backup and during a separate
./backup_vm.py ... download ...
command) receiving the following error:Scenario: cold backup, either:
start
+download
+stop
).start
, thendownload
.The flow actually works, even the output image is created:
-rw-r--r--. 1 pbar pbar 196624 Jan 17 10:53 f626c162-7ab6-4acf-9c3c-69eebab8b990.202201171053.full.qcow2
It works fine for VMs containing 1 disk, but in case there are several disks, only the 1st image is copied. The exception breaks the loop that should have continued for the remaining disks.
Logs are attached.
After some Google Chat at the
RHV Storage
room here are a few conclusions from Vojtech & Nir:engine.log
engine-ovirt-imageio.log
example.log
vdsm.log
vdsm-ovirt-imageio.log
The text was updated successfully, but these errors were encountered: