Red Hat Bugzilla – Bug 143131
a gnbd unexport directly following an unimport can fail
Last modified: 2009-04-16 15:57:27 EDT
Description of problem:
I have the importer remove all imported GNBDs and then right
afterwards have the exporter remove all it's exported GNBDs. The
gnbd_export -R ends up failing sometimes with this error:
gnbd_export: ERROR remove request failed : Success
gnbd0: shutting down socket
exitting GNBD_DO_IT ioctl
It's still there:
[root@morph-01 root]# gnbd_export -l
Server : sda
file : /dev/sda
sectors : 4294950912
readonly : no
cached : yes
timeout : no
If a wait a little while the remove will then work.
[root@morph-01 root]# gnbd_export -R
gnbd_export: removed GNBD sda
Version-Release number of selected component (if applicable):
gnbd_export DEVEL.1103064972 (built Dec 14 2004 16:57:46)
Gah!! I can't see this one either. But 20 to 1 says that the issue is
that when you remove the device, It closes the connection to the
server, but the server process isn't instantly cleaned up. It has to
see that the client logged out, and shut inself down. This takes a
second... or less. If the server tries to remove the device while
this is happening, It should error out with "device or resource busy".
I fixed the error printing code so that it will actually print the
correct errno message. Personally, I would call this good enough. If
it is taking more than a couple of seconds to remove, or if the error
message doesn't now say "device or recouse busy" or something to that
effect, then I need to fix something.
Otherwise, I don't see this as an issue.
I guess we're calling this fixed enough.