Bug 780080 (SOA-2447) - FileSystemConnector behaves strangely on NFS
Summary: FileSystemConnector behaves strangely on NFS
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-2447
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: EDS
Version: 5.1.0.ER3
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 5.1.0.ER4
Assignee: Van Halbert
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-20 13:43 UTC by Jiri Pechanec
Modified: 2010-11-10 11:13 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Linux qa01.qa.atl2.redhat.com 2.6.9-78.0.1.ELsmp #1 SMP Tue Jul 22 18:11:48 EDT 2008 i686 i686 i386 GNU/Linux java version "1.6.0_21" Java(TM) SE Runtime Environment (build 1.6.0_21-b06) Java HotSpot(TM) Client VM (build 17.0-b16, mixed mode)
Last Closed: 2010-11-10 11:13:28 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SOA-2447 0 None None None Never

Description Jiri Pechanec 2010-10-20 13:43:05 UTC
Link type: Superset, Source: SOA-2447, Destination: SOA-2441
project_key: SOA

Some of FileSystemConnector tests are failing on NFS drive.

Several tests are failing
Example
  <testcase classname="org.modeshape.connector.filesystem.FileSystemConnectorWritableTest" name="shouldBeAbleToCreateFileWithContent" time="3.818">
    <failure type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError:
        at org.modeshape.connector.filesystem.FileSystemConnectorWritableTest.assertContents(FileSystemConnectorWritableTest.java:598)
        at org.modeshape.connector.filesystem.FileSystemConnectorWritableTest.shouldBeAbleToCreateFileWithContent(FileSystemConnectorWritableTest.java:135)
</failure>
  </testcase>

Moreover an exception is printed to standard error
org.modeshape.graph.connector.RepositorySourceException: Error moving temporary data file to path "/tmp/modeshape5274288099061789508.tmp to /qa/services/hudson/hudson_workspace/workspace/soa-modeshape-single/modeshape/extensions/modeshape-connector-filesystem/target/repositories/test/testFile" in workspace "test" in Test Repository
        at org.modeshape.connector.filesystem.FileSystemWorkspace.putNode(FileSystemWorkspace.java:309)
        at org.modeshape.graph.connector.base.PathWorkspace$PutCommand.apply(PathWorkspace.java:270)
        at org.modeshape.graph.connector.base.PathWorkspace.commit(PathWorkspace.java:204)
        at org.modeshape.graph.connector.base.PathTransaction$WorkspaceChanges.commit(PathTransaction.java:896)
        at org.modeshape.graph.connector.base.PathTransaction.commit(PathTransaction.java:787)
        at org.modeshape.graph.connector.base.Connection.execute(Connection.java:130)
        at org.modeshape.graph.Graph.execute(Graph.java:283)
        at org.modeshape.graph.Graph$5.process(Graph.java:226)
        at org.modeshape.graph.request.RequestBuilder.createNode(RequestBuilder.java:289)
        at org.modeshape.graph.Graph$13.submit(Graph.java:1342)
        at org.modeshape.graph.Graph$13.submit(Graph.java:1335)
        at org.modeshape.graph.Graph$CreateAction.and(Graph.java:7995)


I have tweaked FileSystemWorkspace source code a little bit and I have found that in method putNode there is a condition
if (!temp.renameTo(parentFile)) {
that is evaluated to true. I have added an information lines to be printed in the condition
                    System.err.println("UPDATE ERROR " + temp.getCanonicalPath() + " " + parentFile.getCanonicalPath());
                    System.err.println("UPDATE " + temp.exists());
                    System.err.println("UPDATE " + parentFile.exists());
                    System.err.println("UPDATE " + parentFile.getParentFile().exists());

Which gives me result
UPDATE ERROR /tmp/modeshape5274288099061789508.tmp /qa/services/hudson/hudson_workspace/workspace/soa-modeshape-single/modeshape/extensions/modeshape-connector-filesystem/target/repositories/test/testFile
UPDATE true
UPDATE false
UPDATE true

and when I tried to execute 'mv /tmp/modeshape5274288099061789508.tmp /qa/services/hudson/hudson_workspace/workspace/soa-modeshape-single/modeshape/extensions/modeshape-connector-filesystem/target/repositories/test/testFile' then the command was executed successfully.

Comment 1 Jiri Pechanec 2010-10-20 14:16:40 UTC
I probably now the explanation - the temp file is generate din /tmp directory but the target (repository) is on mounted mount point. According to documentation - 'The rename operation might not be able to move a file from one filesystem to another'

I see current implementation as serious limitation as it would require to have tmp mountpoint on the same filesystem the repository.

Comment 2 Jiri Pechanec 2010-10-20 14:17:20 UTC
Affects Testing: Added: [Blocks Testing]


Comment 3 Van Halbert 2010-10-20 14:51:09 UTC
Link: Added: This issue depends MODE-973


Comment 4 Jiri Pechanec 2010-10-20 15:09:25 UTC
Link: Added: This issue incorporates SOA-2441


Comment 5 Len DiMaggio 2010-10-20 18:44:51 UTC
Just wondering - are you seeing the same (or different) issues if you try to access a file through a symbolic link?

Comment 6 Van Halbert 2010-10-27 14:57:41 UTC
ModeShape committed changes on Oct. 20 to the 2.2.x branch.   This should be in ER4.

Comment 7 Jiri Pechanec 2010-11-10 11:13:28 UTC
Verified in ER4


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