cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-10085) Upload volume from local fails when global config max.account.seconday.storage is set to -1
Date Thu, 26 Oct 2017 10:58:00 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-10085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16220313#comment-16220313
] 

ASF GitHub Bot commented on CLOUDSTACK-10085:
---------------------------------------------

rafaelweingartner commented on a change in 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#discussion_r147108151
 
 

 ##########
 File path: services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
 ##########
 @@ -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) {
 
 Review comment:
   No problem, but I disagree with this kind of thinking "we are using Java doc very rarely
in our code, so adding Java doc for this straight forward condition will not be much useful".
   
   This is what makes our code base terrible in same (most) places and in my opinion we should
improve bit by bit. Code  (easy to maintain, easy to be extended by newcomers, and easy to
read) is a culture that we have to create.

----------------------------------------------------------------
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:
users@infra.apache.org


> 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
>
> *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)

Mime
View raw message