Martin Sivák has uploaded a new change for review. Change subject: engine: Use proper units in Storage QoS when talking to VDSM ......................................................................
engine: Use proper units in Storage QoS when talking to VDSM The engine used Mbps and VDSM expects B/s. This patch changes the engine side to use MB/s (as is more common when dealing with storage) and properly translates that to Bytes when sending the value to VDSM. Change-Id: I2644e9e029c8b6ebe4b5b7626f7b1ed6b6b5aea4 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1145621 Signed-off-by: Martin Sivák <[email protected]> --- M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/qos/StorageQos.java M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java 3 files changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/06/33906/1 diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/qos/StorageQos.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/qos/StorageQos.java index a7210ed..3984675 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/qos/StorageQos.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/qos/StorageQos.java @@ -14,6 +14,8 @@ private static final long serialVersionUID = 1122123549710787758L; + /* All Throughput values are in MiBs per second */ + @ConfiguredRange(min = 0, maxConfigValue = ConfigValues.MaxThroughputUpperBoundQosValue, message = "ACTION_TYPE_FAILED_QOS_OUT_OF_RANGE_VALUES") private Integer maxThroughput; diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java index e47cc77..5d853a1 100644 --- a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java +++ b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java @@ -389,13 +389,17 @@ // build map Map<String, Integer> ioTuneMap = new HashMap<>(); if (storageQos.getMaxThroughput() != null) { - ioTuneMap.put(VdsProperties.TotalBytesSec, storageQos.getMaxThroughput()); + // Convert MiB/s to B/s vdsm is expecting + ioTuneMap.put(VdsProperties.TotalBytesSec, storageQos.getMaxThroughput() * 1024 * 1024); } if (storageQos.getMaxReadThroughput() != null) { - ioTuneMap.put(VdsProperties.ReadBytesSec, storageQos.getMaxReadThroughput()); + // Convert MiB/s to B/s vdsm is expecting + + ioTuneMap.put(VdsProperties.ReadBytesSec, storageQos.getMaxReadThroughput() * 1024 * 1024); } if (storageQos.getMaxWriteThroughput() != null) { - ioTuneMap.put(VdsProperties.WriteBytesSec, storageQos.getMaxWriteThroughput()); + // Convert MiB/s to B/s vdsm is expecting + ioTuneMap.put(VdsProperties.WriteBytesSec, storageQos.getMaxWriteThroughput() * 1024 * 1024); } if (storageQos.getMaxIops() != null) { ioTuneMap.put(VdsProperties.TotalIopsSec, storageQos.getMaxIops()); diff --git a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java index 2cea001..6ef02b5 100644 --- a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java +++ b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java @@ -3878,7 +3878,7 @@ @DefaultStringValue("Write") String writeStorageQosPopup(); - @DefaultStringValue("Mbps") + @DefaultStringValue("MB/s") String mbpsLabelStorageQosPopup(); @DefaultStringValue("Count") -- To view, visit http://gerrit.ovirt.org/33906 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2644e9e029c8b6ebe4b5b7626f7b1ed6b6b5aea4 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Sivák <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
