Skip to content
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

[QA] moving files across storages fails #600

Open
jnweiger opened this issue Aug 26, 2022 · 2 comments
Open

[QA] moving files across storages fails #600

jnweiger opened this issue Aug 26, 2022 · 2 comments

Comments

@jnweiger
Copy link
Contributor

jnweiger commented Aug 26, 2022

Seen while testing files_primary_s3-1.3.0 on 10.11

  • set up a server with files_primary_s3 and a scality cloudserver as primary storage.
  • mount an external SFTP storage, add a text file there.
  • move the text file out of the SFTP storage into the top level folder.
  • try move the text file back into the SFTP storage. it always fails. BAD.
    image

  • moving into and out of folders in the primary storage works fine.
  • moving a file that was created in the primary storage into the SFTP mount also works fine.
  • a text file created in an s3 external storage also can be moved out, but not moved back.

Expected behaviour

  • moving files around should work in any case

The server log produces this when the move fails:

{"reqId":"YwlOnqTK0qK1yBWmNkU4NgAAAAU","level":3,"time":"2022-08-26T22:52:15+00:00","remoteAddr":"84.180.181.57","user":"admin","app":"PHP","method":"MOVE","url":"\/ remote.php\/dav\/files\/admin\/hello.txt","message":"Error executing \"GetObject\" on \"http:\/\/localhost:8000\/oc-primary\/urn%3Aoid%3A39\"; AWS HTTP error: Client error: `GET http:\/\/localhost:8000\/oc-primary\/urn%3Aoid%3A39` resulted in a `404 Not Found` response NotFound (client): 404 Not Found (Request-ID: 22ef9ac1d24182 0e195e) - NoSuchKey<\/Code>The specified key does not exist.<\/Message><\/Resource>22ef9ac1d241820e195e<\/RequestId><\/Error> at \/var\/www\/owncloud\/apps-external\/files_primary_s3\/lib\/streamwrapper.php#721"} {"reqId":"YwlOnqTK0qK1yBWmNkU4NgAAAAU","level":3,"time":"2022-08-26T22:52:15+00:00","remoteAddr":"84.180.181.57","user":"admin","app":"PHP","method":"MOVE","url":"\/ remote.php\/dav\/files\/admin\/hello.txt","message":"fopen(s3:\/\/oc-primary\/urn:oid:39): failed to open stream: "OCA\\Files_Primary_S3\\StreamWrapper::stream_ open" call failed at \/var\/www\/owncloud\/apps-external\/files_primary_s3\/lib\/s3storage.php#230"} {"reqId":"YwlOnqTK0qK1yBWmNkU4NgAAAAU","level":3,"time":"2022-08-26T22:52:15+00:00","remoteAddr":"84.180.181.57","user":"admin","app":"PHP","method":"MOVE","url":"\/ remote.php\/dav\/files\/admin\/hello.txt","message":"fread() expects parameter 1 to be resource, bool given at \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Wr apper\/Encryption.php#932"} {"reqId":"YwlOnqTK0qK1yBWmNkU4NgAAAAU","level":3,"time":"2022-08-26T22:52:15+00:00","remoteAddr":"84.180.181.57","user":"admin","app":"PHP","method":"MOVE","url":"\/ remote.php\/dav\/files\/admin\/hello.txt","message":"fclose() expects parameter 1 to be resource, bool given at \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/W rapper\/Encryption.php#933"} {"reqId":"YwlOnqTK0qK1yBWmNkU4NgAAAAU","level":3,"time":"2022-08-26T22:52:15+00:00","remoteAddr":"84.180.181.57","user":"admin","app":"PHP","method":"MOVE","url":"\/ remote.php\/dav\/files\/admin\/hello.txt","message":"Error executing \"GetObject\" on \"http:\/\/localhost:8000\/oc-primary\/urn%3Aoid%3A39\"; AWS HTTP error: Client error: `GET http:\/\/localhost:8000\/oc-primary\/urn%3Aoid%3A39` resulted in a `404 Not Found` response NotFound (client): 404 Not Found (Request-ID: 3e7580c3fb418f d6fc9b) - NoSuchKey<\/Code>The specified key does not exist.<\/Message><\/Resource>3e7580c3fb418fd6fc9b<\/RequestId><\/Error> at \/var\/www\/owncloud\/apps-external\/files_primary_s3\/lib\/streamwrapper.php#721"} {"reqId":"YwlOnqTK0qK1yBWmNkU4NgAAAAU","level":3,"time":"2022-08-26T22:52:15+00:00","remoteAddr":"84.180.181.57","user":"admin","app":"PHP","method":"MOVE","url":"\/ remote.php\/dav\/files\/admin\/hello.txt","message":"fopen(s3:\/\/oc-primary\/urn:oid:39): failed to open stream: "OCA\\Files_Primary_S3\\StreamWrapper::stream_ open" call failed at \/var\/www\/owncloud\/apps-external\/files_primary_s3\/lib\/s3storage.php#230"} {"reqId":"YwlOnqTK0qK1yBWmNkU4NgAAAAU","level":3,"time":"2022-08-26T22:52:15+00:00","remoteAddr":"84.180.181.57","user":"admin","app":"PHP","method":"MOVE","url":"\/ remote.php\/dav\/files\/admin\/hello.txt","message":"fclose() expects parameter 1 to be resource, bool given at \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/C ommon.php#595"} {"reqId":"YwlOnqTK0qK1yBWmNkU4NgAAAAU","level":0,"time":"2022-08-26T22:52:15+00:00","remoteAddr":"84.180.181.57","user":"admin","app":"webdav","method":"MOVE","url": "\/remote.php\/dav\/files\/admin\/hello.txt","message":"Exception: HTTP\/1.1 403 There was an error while renaming the file or directory: {\"Exception\":\"Sabre\\\\D AV\\\\Exception\\\\Forbidden\",\"Message\":\"There was an error while renaming the file or directory\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\ /composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Tree.php(160): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory->moveInto()\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/compose r\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(612): Sabre\\\\DAV\\\\Tree->move()\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/W ildcardEmitterTrait.php(89): Sabre\\\\DAV\\\\CorePlugin->httpMove()\\n#3 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(47 2): Sabre\\\\DAV\\\\Server->emit()\\n#4 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(253): Sabre\\\\DAV\\\\Server->invok eMethod()\\n#5 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Server.php(349): Sabre\\\\DAV\\\\Server->start()\\n#6 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\ /appinfo\\\/v2\\\/remote.php(31): OCA\\\\DAV\\\\Server->exec()\\n#7 \\\/var\\\/www\\\/owncloud\\\/remote.php(165): require_once('\\\/var\\\/www\\\/ownclo...')\\n#8 { main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Directory.php\",\"Line\":498}"}
@jnweiger
Copy link
Contributor Author

Same issue also seen with objectstore as primary storage: https://github.com/owncloud/objectstore/issues/161

@DeepDiver1975
Copy link
Member

needs retest with 1.6.0 once we have it ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants