Updated Branches:
  refs/heads/disk_io_throttling 4c04bc7b9 -> f2e5591b7


CLOUDSTACK-1301: disk I/O throttling minor change


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f2e5591b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f2e5591b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f2e5591b

Branch: refs/heads/disk_io_throttling
Commit: f2e5591b710d04cc86815044f5823e73a4a58944
Parents: 4c04bc7
Author: Wei Zhou <[email protected]>
Authored: Wed May 29 18:12:46 2013 +0200
Committer: Wei Zhou <[email protected]>
Committed: Wed May 29 18:12:46 2013 +0200

----------------------------------------------------------------------
 setup/db/db/schema-410to420.sql |    7 ++++---
 ui/scripts/instances.js         |    4 ++--
 2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f2e5591b/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index 7684a7c..4805c46 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -263,6 +263,10 @@ ALTER TABLE `cloud`.`nics` ADD COLUMN `display_nic` 
tinyint(1) NOT NULL DEFAULT
 
 ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `display_offering` tinyint(1) 
NOT NULL DEFAULT 1 COMMENT 'Should disk offering be displayed to the end user';
 
+ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `bytes_rate` bigint(20) 
unsigned DEFAULT 0;
+
+ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `iops_rate` bigint(20) unsigned 
DEFAULT 0;
+
 CREATE TABLE `cloud`.`volume_details` (
   `id` bigint unsigned NOT NULL auto_increment,
   `volume_id` bigint unsigned NOT NULL COMMENT 'volume id',
@@ -1795,11 +1799,8 @@ CREATE TABLE `cloud_usage`.`usage_vm_disk` (
 ) ENGINE=InnoDB CHARSET=utf8;
 
 INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 
'management-server', 'vm.disk.stats.interval', 0, 'Interval (in seconds) to 
report vm disk statistics.');
-
 INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 
'management-server', 'vm.disk.throttling.iops_rate', 0, 'Default disk I/O rate 
in requests per second allowed in User vm\'s disk. ');
 INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 
'management-server', 'vm.disk.throttling.bytes_rate', 0, 'Default disk I/O rate 
in bytes per second allowed in User vm\'s disk. ');
-ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `bytes_rate` bigint(20) 
unsigned DEFAULT 0;
-ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `iops_rate` bigint(20) unsigned 
DEFAULT 0;
 
 -- Re-enable foreign key checking, at the end of the upgrade path
 SET foreign_key_checks = 1;                    

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f2e5591b/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 6a589ba..99b1a0f 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -1669,8 +1669,8 @@
                   networkkbswrite: (jsonObj.networkkbswrite == null)? "N/A": 
cloudStack.converters.convertBytes(jsonObj.networkkbswrite * 1024),
                   diskkbsread: (jsonObj.diskkbsread == null)? "N/A": 
cloudStack.converters.convertBytes(jsonObj.diskkbsread * 1024),
                   diskkbswrite: (jsonObj.diskkbswrite == null)? "N/A": 
cloudStack.converters.convertBytes(jsonObj.diskkbswrite * 1024),
-                  diskioread: (jsonObj.diskioread == null)? "N/A": 
cloudStack.converters.convertBytes(jsonObj.diskioread * 1024),
-                  diskiowrite: (jsonObj.diskiowrite == null)? "N/A": 
cloudStack.converters.convertBytes(jsonObj.diskiowrite * 1024)
+                  diskioread: (jsonObj.diskioread == null)? "N/A": 
jsonObj.diskioread,
+                  diskiowrite: (jsonObj.diskiowrite == null)? "N/A": 
jsonObj.diskiowrite
                   }
                 });
               }

Reply via email to