Bug 143131 - a gnbd unexport directly following an unimport can fail
a gnbd unexport directly following an unimport can fail
Product: Red Hat Cluster Suite
Classification: Red Hat
Component: gnbd (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Ben Marzinski
Cluster QE
Depends On:
  Show dependency treegraph
Reported: 2004-12-16 14:24 EST by Corey Marthaler
Modified: 2009-04-16 15:57 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-01-12 12:22:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Corey Marthaler 2004-12-16 14:24:57 EST
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

From syslog:
gnbd0: shutting down socket
exitting GNBD_DO_IT ioctl

It's still there:
[root@morph-01 root]# gnbd_export -l
Server[1] : 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)

How reproducible:
Comment 1 Ben Marzinski 2005-01-05 13:06:57 EST
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.
Comment 2 Ben Marzinski 2005-01-11 17:29:51 EST
I guess we're calling this fixed enough.
Comment 3 Corey Marthaler 2005-01-12 12:22:24 EST
fix verified. 

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