summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-03-08 18:03:49 +0100
committerGitHub <noreply@github.com>2019-03-08 18:03:49 +0100
commitd40b21ac815b8088a5d0b51a6d48b39ed754631a (patch)
tree2913953835e4d6cc4a9c985f48391eb999132501 /core
parent8996b9efbf61db703c73d4cfd872a83fe9d105e6 (diff)
parent060b637b70ed44ac09e400a435ca066c514ef09a (diff)
downloadnextcloud-server-d40b21ac815b8088a5d0b51a6d48b39ed754631a.tar.gz
nextcloud-server-d40b21ac815b8088a5d0b51a6d48b39ed754631a.zip
Merge pull request #14603 from nextcloud/fix/noid/add-setup-check-for-s3-temp-path
Show a setup warning in case S3 object storage is used as primary storage
Diffstat (limited to 'core')
-rw-r--r--core/js/setupchecks.js12
-rw-r--r--core/js/tests/specs/setupchecksSpec.js91
2 files changed, 89 insertions, 14 deletions
diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js
index 3e82e077994..c3b036ddf69 100644
--- a/core/js/setupchecks.js
+++ b/core/js/setupchecks.js
@@ -450,6 +450,18 @@
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
})
}
+ if (!data.isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed) {
+ messages.push({
+ msg: t(
+ 'core',
+ 'This instance uses an S3 based object store as primary storage. The uploaded files are stored temporarily on the server and thus it is recommended to have 50 GB of free space available in the temp directory of PHP. Check the logs for full details about the path and the available space. To improve this please change the temporary directory in the php.ini or make more space available in that path.',
+ {
+ docLink: oc_defaults.docPlaceholderUrl.replace('PLACEHOLDER', 'admin-mysql-utf8mb4'),
+ }
+ ),
+ type: OC.SetupChecks.MESSAGE_TYPE_WARNING
+ })
+ }
} else {
messages.push({
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js
index aa9006d0ab5..0603ac72281 100644
--- a/core/js/tests/specs/setupchecksSpec.js
+++ b/core/js/tests/specs/setupchecksSpec.js
@@ -248,7 +248,8 @@ describe('OC.SetupChecks tests', function() {
appDirsWithDifferentOwner: [],
recommendedPHPModules: [],
pendingBigIntConversionColumns: [],
- isMysqlUsedWithoutUTF8MB4: false
+ isMysqlUsedWithoutUTF8MB4: false,
+ isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true
})
);
@@ -299,7 +300,8 @@ describe('OC.SetupChecks tests', function() {
appDirsWithDifferentOwner: [],
recommendedPHPModules: [],
pendingBigIntConversionColumns: [],
- isMysqlUsedWithoutUTF8MB4: false
+ isMysqlUsedWithoutUTF8MB4: false,
+ isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true
})
);
@@ -351,7 +353,8 @@ describe('OC.SetupChecks tests', function() {
appDirsWithDifferentOwner: [],
recommendedPHPModules: [],
pendingBigIntConversionColumns: [],
- isMysqlUsedWithoutUTF8MB4: false
+ isMysqlUsedWithoutUTF8MB4: false,
+ isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true
})
);
@@ -401,7 +404,8 @@ describe('OC.SetupChecks tests', function() {
appDirsWithDifferentOwner: [],
recommendedPHPModules: [],
pendingBigIntConversionColumns: [],
- isMysqlUsedWithoutUTF8MB4: false
+ isMysqlUsedWithoutUTF8MB4: false,
+ isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true
})
);
@@ -449,7 +453,8 @@ describe('OC.SetupChecks tests', function() {
appDirsWithDifferentOwner: [],
recommendedPHPModules: [],
pendingBigIntConversionColumns: [],
- isMysqlUsedWithoutUTF8MB4: false
+ isMysqlUsedWithoutUTF8MB4: false,
+ isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true
})
);
@@ -499,7 +504,8 @@ describe('OC.SetupChecks tests', function() {
],
recommendedPHPModules: [],
pendingBigIntConversionColumns: [],
- isMysqlUsedWithoutUTF8MB4: false
+ isMysqlUsedWithoutUTF8MB4: false,
+ isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true
})
);
@@ -547,7 +553,8 @@ describe('OC.SetupChecks tests', function() {
appDirsWithDifferentOwner: [],
recommendedPHPModules: [],
pendingBigIntConversionColumns: [],
- isMysqlUsedWithoutUTF8MB4: false
+ isMysqlUsedWithoutUTF8MB4: false,
+ isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true
})
);
@@ -595,7 +602,8 @@ describe('OC.SetupChecks tests', function() {
appDirsWithDifferentOwner: [],
recommendedPHPModules: [],
pendingBigIntConversionColumns: [],
- isMysqlUsedWithoutUTF8MB4: false
+ isMysqlUsedWithoutUTF8MB4: false,
+ isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true
})
);
@@ -643,7 +651,8 @@ describe('OC.SetupChecks tests', function() {
appDirsWithDifferentOwner: [],
recommendedPHPModules: [],
pendingBigIntConversionColumns: [],
- isMysqlUsedWithoutUTF8MB4: false
+ isMysqlUsedWithoutUTF8MB4: false,
+ isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true
})
);
@@ -712,7 +721,8 @@ describe('OC.SetupChecks tests', function() {
appDirsWithDifferentOwner: [],
recommendedPHPModules: [],
pendingBigIntConversionColumns: [],
- isMysqlUsedWithoutUTF8MB4: false
+ isMysqlUsedWithoutUTF8MB4: false,
+ isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true
})
);
@@ -761,7 +771,8 @@ describe('OC.SetupChecks tests', function() {
appDirsWithDifferentOwner: [],
recommendedPHPModules: [],
pendingBigIntConversionColumns: [],
- isMysqlUsedWithoutUTF8MB4: false
+ isMysqlUsedWithoutUTF8MB4: false,
+ isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true
})
);
@@ -810,7 +821,8 @@ describe('OC.SetupChecks tests', function() {
appDirsWithDifferentOwner: [],
recommendedPHPModules: [],
pendingBigIntConversionColumns: [],
- isMysqlUsedWithoutUTF8MB4: false
+ isMysqlUsedWithoutUTF8MB4: false,
+ isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true
})
);
@@ -859,7 +871,8 @@ describe('OC.SetupChecks tests', function() {
appDirsWithDifferentOwner: [],
recommendedPHPModules: [],
pendingBigIntConversionColumns: [],
- isMysqlUsedWithoutUTF8MB4: false
+ isMysqlUsedWithoutUTF8MB4: false,
+ isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true
})
);
@@ -907,7 +920,8 @@ describe('OC.SetupChecks tests', function() {
appDirsWithDifferentOwner: [],
recommendedPHPModules: [],
pendingBigIntConversionColumns: [],
- isMysqlUsedWithoutUTF8MB4: true
+ isMysqlUsedWithoutUTF8MB4: true,
+ isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true
})
);
@@ -919,6 +933,55 @@ describe('OC.SetupChecks tests', function() {
done();
});
});
+
+ it('should return an error if there is not enough free space in the temp directory', function(done) {
+ var async = OC.SetupChecks.checkSetup();
+
+ suite.server.requests[0].respond(
+ 200,
+ {
+ 'Content-Type': 'application/json',
+ },
+ JSON.stringify({
+ hasFileinfoInstalled: true,
+ isGetenvServerWorking: true,
+ isReadOnlyConfig: false,
+ hasWorkingFileLocking: true,
+ hasValidTransactionIsolationLevel: true,
+ suggestedOverwriteCliURL: '',
+ isRandomnessSecure: true,
+ securityDocs: 'https://docs.owncloud.org/myDocs.html',
+ serverHasInternetConnection: true,
+ isMemcacheConfigured: true,
+ forwardedForHeadersWorking: true,
+ isCorrectMemcachedPHPModuleInstalled: true,
+ hasPassedCodeIntegrityCheck: true,
+ isOpcacheProperlySetup: true,
+ hasOpcacheLoaded: true,
+ isSettimelimitAvailable: true,
+ hasFreeTypeSupport: true,
+ missingIndexes: [],
+ cronErrors: [],
+ cronInfo: {
+ diffInSeconds: 0
+ },
+ isMemoryLimitSufficient: true,
+ appDirsWithDifferentOwner: [],
+ recommendedPHPModules: [],
+ pendingBigIntConversionColumns: [],
+ isMysqlUsedWithoutUTF8MB4: false,
+ isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: false
+ })
+ );
+
+ async.done(function( data, s, x ){
+ expect(data).toEqual([{
+ msg: 'This instance uses an S3 based object store as primary storage. The uploaded files are stored temporarily on the server and thus it is recommended to have 50 GB of free space available in the temp directory of PHP. Check the logs for full details about the path and the available space. To improve this please change the temporary directory in the php.ini or make more space available in that path.',
+ type: OC.SetupChecks.MESSAGE_TYPE_WARNING
+ }]);
+ done();
+ });
+ });
});
describe('checkGeneric', function() {