This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/master by this push:
new a50a461 CLOUDSTACK-10085 : Upload volume from local fails when global
config max.account.seconday.storage is set to -1
a50a461 is described below
commit a50a461c8e6f5775835a07146aecc2aa9696594a
Author: Nitesh Sarda <[email protected]>
AuthorDate: Wed Oct 25 16:15:54 2017 +0530
CLOUDSTACK-10085 : Upload volume from local fails when global config
max.account.seconday.storage is set to -1
---
.../cloudstack/storage/resource/NfsSecondaryStorageResource.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git
a/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
b/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
index 37cb728..eb6f220 100644
---
a/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
+++
b/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
@@ -35,9 +35,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
-
import javax.naming.ConfigurationException;
-
import com.amazonaws.services.s3.model.S3ObjectSummary;
import com.cloud.agent.api.Answer;
import com.cloud.agent.api.CheckHealthAnswer;
@@ -76,6 +74,7 @@ import com.cloud.exception.InternalErrorException;
import com.cloud.exception.InvalidParameterValueException;
import com.cloud.host.Host;
import com.cloud.host.Host.Type;
+import com.cloud.configuration.Resource;
import com.cloud.hypervisor.Hypervisor.HypervisorType;
import com.cloud.resource.ServerResourceBase;
import com.cloud.storage.DataStoreRole;
@@ -2809,7 +2808,7 @@ public class NfsSecondaryStorageResource extends
ServerResourceBase implements S
int accountDirSizeInGB = getSizeInGB(accountTemplateDirSize +
accountSnapshotDirSize + accountVolumeDirSize);
int defaultMaxAccountSecondaryStorageInGB =
Integer.parseInt(cmd.getDefaultMaxAccountSecondaryStorage());
- if ((accountDirSizeInGB + contentLengthInGB) >
defaultMaxAccountSecondaryStorageInGB) {
+ if (defaultMaxAccountSecondaryStorageInGB !=
Resource.RESOURCE_UNLIMITED && (accountDirSizeInGB + contentLengthInGB) >
defaultMaxAccountSecondaryStorageInGB) {
s_logger.error("accountDirSizeInGb: " + accountDirSizeInGB + "
defaultMaxAccountSecondaryStorageInGB: " +
defaultMaxAccountSecondaryStorageInGB + " contentLengthInGB:"
+ contentLengthInGB);
String errorMessage = "Maximum number of resources of type
secondary_storage for account has exceeded";
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].