leolleeooleo opened a new issue, #6411: URL: https://github.com/apache/cloudstack/issues/6411
https://github.com/apache/cloudstack/blob/1ead6c1bac9584c19b4d55b8fb0c3f795aad289a/services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java#L3280 This shoule consider if Account Secondary Storage limits is `Resource.RESOURCE_UNLIMITED` or greater than `defaultMaxAccountSecondaryStorageInGB`. And if upload to project shoule use `defaultMaxProjectSecondaryStorageInGB` or Project Secondary Storage limits. ##### ISSUE TYPE * Bug Report ##### COMPONENT NAME ~~~ secondary-storage ~~~ ##### CLOUDSTACK VERSION ~~~ 4.16.0.0 ~~~ ##### CONFIGURATION Global Settings: max.account.secondary.storage = 10 max.project.secondary.storage = 400 ##### SUMMARY Configure account Secondary Storage limits to -1 or 150 GB. Upload Template to user or project always fail when image size is greater than Global Settings `max.account.secondary.storage`. ##### STEPS TO REPRODUCE ~~~ Upload Template ~~~ <!-- You can also paste gist.github.com links for larger files --> ##### EXPECTED RESULTS ~~~ Upload successful ~~~ ##### ACTUAL RESULTS Template b6e6df36-c7f4-4c24-868d-4d846469cae3 failed to upload. Error details: Maximum number of resources of type secondary_storage for account has exceeded ~~~ 2022-05-25 02:15:29,162 ERROR [storage.resource.NfsSecondaryStorageResource] (nioEventLoopGroup-3-2:null) accountDirSizeInGb: 0 defaultMaxAccountSecondaryStor ageInGB: 10 contentLengthInGB:24 2022-05-25 02:15:29,163 ERROR [storage.resource.HttpUploadServerHandler] (nioEventLoopGroup-3-2:null) post request validation failed com.cloud.exception.InvalidParameterValueException: Maximum number of resources of type secondary_storage for account has exceeded at org.apache.cloudstack.storage.resource.NfsSecondaryStorageResource.checkSecondaryStorageResourceLimit(NfsSecondaryStorageResource.java:3286) at org.apache.cloudstack.storage.resource.NfsSecondaryStorageResource.createUploadEntity(NfsSecondaryStorageResource.java:3224) at org.apache.cloudstack.storage.resource.HttpUploadServerHandler.channelRead0(HttpUploadServerHandler.java:162) at org.apache.cloudstack.storage.resource.HttpUploadServerHandler.channelRead0(HttpUploadServerHandler.java:65) at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:312) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:299) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:415) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1304) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:921) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:135) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:646) at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:546) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:500) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:131) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:829) ~~~ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
