[
https://issues.apache.org/jira/browse/CLOUDSTACK-10085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16237219#comment-16237219
]
ASF GitHub Bot commented on CLOUDSTACK-10085:
---------------------------------------------
DaanHoogland closed pull request #2270: CLOUDSTACK-10085 : Upload volume from
local fails when global config max.account.seconday.storage is set to -1
URL: https://github.com/apache/cloudstack/pull/2270
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
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 37cb72830b4..eb6f220f7ca 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.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.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 @@ private synchronized void
checkSecondaryStorageResourceLimit(TemplateOrVolumePos
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";
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Upload volume from local fails when global config
> max.account.seconday.storage is set to -1
> -------------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-10085
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10085
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Reporter: Nitesh Sarda
> Priority: Major
>
> *ISSUE*
> Upload volume from local fails when global config
> max.account.seconday.storage is set to -1
> *STEPS TO REPRODUCE*
> * Download any volume on your local machine.
> * Change value of global configuration max.account.seconday.storage to -1.
> * Restart Management server.
> * Try to upload a volume from UI using "Upload from Local" option. Upload
> will fail.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)