Bug 143131

Summary: a gnbd unexport directly following an unimport can fail
Product: [Retired] Red Hat Cluster Suite Reporter: Corey Marthaler <cmarthal>
Component: gnbdAssignee: Ben Marzinski <bmarzins>
Status: CLOSED CURRENTRELEASE QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: cluster-maint
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-12 17:22:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Corey Marthaler 2004-12-16 19:24:57 UTC
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:
Sometimes

Comment 1 Ben Marzinski 2005-01-05 18:06:57 UTC
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 22:29:51 UTC
I guess we're calling this fixed enough.

Comment 3 Corey Marthaler 2005-01-12 17:22:24 UTC
fix verified.