This is an automated email from the ASF dual-hosted git repository.
bhaisaab pushed a commit to branch 4.9
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.9 by this push:
new ca415e7 CLOUDSTACK-9929: Do not gather statistics for CDROM or FLOPPY
devices
ca415e7 is described below
commit ca415e7436e9715a744a7c1383baac0c8b64c41f
Author: Wido den Hollander <[email protected]>
AuthorDate: Mon May 29 12:10:47 2017 +0200
CLOUDSTACK-9929: Do not gather statistics for CDROM or FLOPPY devices
Libvirt / Qemu (KVM) does not collect statistics about these either.
On some systems it might even yield a 'internal error' from libvirt
when attempting to gather block statistics from such devices.
For example Ubuntu 16.04 (Xenial) has a issue with this.
Skip them when looping through all devices.
Signed-off-by: Wido den Hollander <[email protected]>
---
.../com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index c88400b..1db9d67 100644
---
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -3095,6 +3095,9 @@ public class LibvirtComputingResource extends
ServerResourceBase implements Serv
long bytes_rd = 0;
long bytes_wr = 0;
for (final DiskDef disk : disks) {
+ if (disk.getDeviceType() == DeviceType.CDROM ||
disk.getDeviceType() == DeviceType.FLOPPY) {
+ continue;
+ }
final DomainBlockStats blockStats =
dm.blockStats(disk.getDiskLabel());
io_rd += blockStats.rd_req;
io_wr += blockStats.wr_req;
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].