[
https://issues.apache.org/jira/browse/CLOUDSTACK-1761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13610392#comment-13610392
]
ASF subversion and git services commented on CLOUDSTACK-1761:
-------------------------------------------------------------
Commit fc121c2b81433ffdf68c537633dc2d03f5ceb2c9 in branch refs/heads/4.1 from
Chip Childers <[email protected]>
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=fc121c2 ]
CLOUDSTACK-1761 - Available local storage disk capacity incorrectly reported in
KVM to manager. This adds collection of available storage to KVM, not
just used.
Bugfix-for: 4.0.2, 4.1, master
Submitted-by: Ted Smith <[email protected]>
Signed-off-by: Marcus Sorensen <[email protected]> 1363966235 -0600
> Available local storage disk capacity incorrectly reported in KVM to manager.
> -----------------------------------------------------------------------------
>
> Key: CLOUDSTACK-1761
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-1761
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: KVM
> Affects Versions: 4.0.0, 4.0.1, 4.1.0, 4.2.0
> Environment: Ubuntu 12.04, 4.0.0/4.0.1 agent, 4.0.0 manager.
> Reporter: Ted Smith
> Priority: Critical
> Labels: bug
> Fix For: 4.0.1, 4.1.0, 4.2.0
>
> Attachments: CLOUDSTACK-1761.patch
>
>
> Currently the client is reporting the amount of disk space that has been used
> when first connecting to the manager instead of the amount of bytes available.
> Output of availableBytes from management-server.log:
> "capacityBytes":4956273893376,"availableBytes":318101676032
> Output of df from physical host with local storage enabled:
> /dev/mapper/somehostname003-root 4840111224 310646138 4285003000 7% /
> I'm fairly certain it is related to the two code snippets below. One of them
> is passing getUsed and the other is expecting availableBytes.
> From
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
> try {
> KVMStoragePool localStoragePool = _storagePoolMgr
> .createStoragePool(_localStorageUUID, "localhost", -1,
> _localStoragePath, "",
> StoragePoolType.Filesystem);
> com.cloud.agent.api.StoragePoolInfo pi = new
> com.cloud.agent.api.StoragePoolInfo(
> localStoragePool.getUuid(), cmd.getPrivateIpAddress(),
> _localStoragePath, _localStoragePath,
> StoragePoolType.Filesystem,
> localStoragePool.getCapacity(),
> localStoragePool.getUsed());
> sscmd = new StartupStorageCommand();
> sscmd.setPoolInfo(pi);
> sscmd.setGuid(pi.getUuid());
> sscmd.setDataCenter(_dcId);
> sscmd.setResourceType(Storage.StorageResourceType.STORAGE_POOL);
> }
> ---------------------------------------------------------------------------------------------------------------------------------
> From api/src/com/cloud/agent/api/StoragePoolInfo.java
> public StoragePoolInfo(String uuid, String host, String hostPath,
> String localPath, StoragePoolType poolType, long
> capacityBytes,
> long availableBytes) {
> super();
> this.uuid = uuid;
> this.host = host;
> this.localPath = localPath;
> this.hostPath = hostPath;
> this.poolType = poolType;
> this.capacityBytes = capacityBytes;
> this.availableBytes = availableBytes;
> }
> public StoragePoolInfo(String uuid, String host, String hostPath,
> String localPath, StoragePoolType poolType, long capacityBytes,
> long availableBytes, Map<String, String> details) {
> this(uuid, host, hostPath, localPath, poolType, capacityBytes,
> availableBytes);
> this.details = details;
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira