Open butonic opened 6 years ago
@butonic
Please provide more information on the objectstore used
I was using @DeepDiver1975 s scality docker image: deepdiver/s3server:7.1
@phil-davis can you check if we generally have a scenario testing to restore a version of a previously shared file?
@davitol can you try to reproduce
@davitol can you try to reproduce
I cannot reproduce it. I tried with Scality and it seems to work for me. The file is restore. But I have seen that previews are not properly refresh using scality. The Thumbnail and the content of the file.txt do not match
@davitol please verify again with latest versions
Tested with 10.0.10 EE tarball (files_primary_s3: 1.0.0) and keeps failing:
{"reqId":"9glHC12mlycQqly5meLb","level":4,"time":"2018-10-19T10:33:57+00:00","remoteAddr":"172.29.0.1","user":"foo","app":"webdav","method":"COPY","url":"\/remote.php\/dav\/meta\/23\/v\/39383436303035353336393236353939393939395247303031202031","message":"Exception: Error executing \"CopyObject\" on \"http:\/\/s3server:8000\/owncloud\/urn%3Aoid%3A23\"; AWS HTTP error: Client error response [url] http:\/\/s3server:8000\/owncloud\/urn%3Aoid%3A23 [status code] 400 [reason phrase] Bad Request InvalidRequest (client): This copy request is illegal because it is trying to copy an object to itself without changing the object's metadata, storage class, website redirect location or encryption attributes. - <?xml version=\"1.0\" encoding=\"UTF-8\"?><Error><Code>InvalidRequest<\/Code><Message>This copy request is illegal because it is trying to copy an object to itself without changing the object's metadata, storage class, website redirect location or encryption attributes.<\/Message><Resource><\/Resource><RequestId>59ddcfbcf348955ad375<\/RequestId><\/Error>: {\"Exception\":\"Aws\\\\S3\\\\Exception\\\\S3Exception\",\"Message\":\"Error executing \\\"CopyObject\\\" on \\\"http:\\\/\\\/s3server:8000\\\/owncloud\\\/urn%3Aoid%3A23\\\"; AWS HTTP error: Client error response [url] http:\\\/\\\/s3server:8000\\\/owncloud\\\/urn%3Aoid%3A23 [status code] 400 [reason phrase] Bad Request InvalidRequest (client): This copy request is illegal because it is trying to copy an object to itself without changing the object's metadata, storage class, website redirect location or encryption attributes. - <?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><Error><Code>InvalidRequest<\\\/Code><Message>This copy request is illegal because it is trying to copy an object to itself without changing the object's metadata, storage class, website redirect location or encryption attributes.<\\\/Message><Resource><\\\/Resource><RequestId>59ddcfbcf348955ad375<\\\/RequestId><\\\/Error>\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_primary_s3\\\/vendor\\\/aws\\\/aws-sdk-php\\\/src\\\/WrappedHttpHandler.php(100): Aws\\\\WrappedHttpHandler->parseError(Array, Object(GuzzleHttp\\\\Psr7\\\\Request), Object(Aws\\\\Command), Array)\\n#1 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_primary_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/Promise.php(203): Aws\\\\WrappedHttpHandler->Aws\\\\{closure}(Array)\\n#2 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_primary_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/Promise.php(174): GuzzleHttp\\\\Promise\\\\Promise::callHandler(2, Array, Array)\\n#3 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_primary_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/RejectedPromise.php(40): GuzzleHttp\\\\Promise\\\\Promise::GuzzleHttp\\\\Promise\\\\{closure}(Array)\\n#4 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_primary_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/TaskQueue.php(47): GuzzleHttp\\\\Promise\\\\RejectedPromise::GuzzleHttp\\\\Promise\\\\{closure}()\\n#5 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_primary_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/Promise.php(246): GuzzleHttp\\\\Promise\\\\TaskQueue->run(true)\\n#6 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_primary_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/Promise.php(223): GuzzleHttp\\\\Promise\\\\Promise->invokeWaitFn()\\n#7 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_primary_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/Promise.php(267): GuzzleHttp\\\\Promise\\\\Promise->waitIfPending()\\n#8 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_primary_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/Promise.php(225): GuzzleHttp\\\\Promise\\\\Promise->invokeWaitList()\\n#9 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_primary_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/Promise.php(62): GuzzleHttp\\\\Promise\\\\Promise->waitIfPending()\\n#10 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_primary_s3\\\/vendor\\\/aws\\\/aws-sdk-php\\\/src\\\/AwsClientTrait.php(58): GuzzleHttp\\\\Promise\\\\Promise->wait()\\n#11 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_primary_s3\\\/vendor\\\/aws\\\/aws-sdk-php\\\/src\\\/AwsClientTrait.php(77): Aws\\\\AwsClient->execute(Object(Aws\\\\Command))\\n#12 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_primary_s3\\\/lib\\\/s3storage.php(244): Aws\\\\AwsClient->__call('copyObject', Array)\\n#13 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/ObjectStore\\\/ObjectStoreStorage.php(500): OCA\\\\Files_Primary_S3\\\\S3Storage->restoreVersion('urn:oid:23', '393834363030353...')\\n#14 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(500): OC\\\\Files\\\\ObjectStore\\\\ObjectStoreStorage->restoreVersion('files\\\/Pepe.txt', '393834363030353...')\\n#15 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(500): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->__call('restoreVersion', Array)\\n#16 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(500): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->__call('restoreVersion', Array)\\n#17 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(500): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->__call('restoreVersion', Array)\\n#18 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(500): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->__call('restoreVersion', Array)\\n#19 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Meta\\\/MetaFileVersionNode.php(111): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->__call('restoreVersion', Array)\\n#20 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Meta\\\/MetaFile.php(98): OC\\\\Files\\\\Meta\\\\MetaFileVersionNode->copy('\\\/foo\\\/files\\\/Pepe...')\\n#21 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/DAV\\\/CopyPlugin.php(87): OCA\\\\DAV\\\\Meta\\\\MetaFile->copy('\\\/foo\\\/files\\\/Pepe...')\\n#22 [internal function]: OCA\\\\DAV\\\\DAV\\\\CopyPlugin->httpCopy(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#23 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#24 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:COPY', Array)\\n#25 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#26 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Server.php(298): Sabre\\\\DAV\\\\Server->exec()\\n#27 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(31): OCA\\\\DAV\\\\Server->exec()\\n#28 \\\/var\\\/www\\\/owncloud\\\/remote.php(165): require_once('\\\/var\\\/www\\\/ownclo...')\\n#29 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/apps\\\/files_primary_s3\\\/vendor\\\/aws\\\/aws-sdk-php\\\/src\\\/WrappedHttpHandler.php\",\"Line\":191}"}
needs an acceptance test in core .....
needs an acceptance test in core .....
I will have a look.
As
admin
create a text file and edit it a few times to create multiple versions Asadmin
share the text file withfoo
Asfoo
try to revert to a previous versionIt should restore the version but this is what is logged
full log:
and the web ui shows a yellow notification:
Failed to revert /New text file.txt to revision May 4, 2018 12:40 PM.