mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	Revert "CLOUDSTACK-1301: Add VM Disk I/O Throttling"
This reverts commit 6dad8adf8fc22417f0242126b8f52ee081f74f49.
This commit is contained in:
		
							parent
							
								
									b4969c4af5
								
							
						
					
					
						commit
						f714d26039
					
				| @ -37,8 +37,6 @@ public class VolumeTO implements InternalIdentity { | ||||
|     private long deviceId; | ||||
|     private String chainInfo; | ||||
|     private String guestOsType; | ||||
|     private long bytesRate; | ||||
|     private long iopsRate; | ||||
| 
 | ||||
|     public VolumeTO(long id, Volume.Type type, StoragePoolType poolType, String poolUuid, String name, String mountPoint, String path, long size, String chainInfo) { | ||||
|         this.id = id; | ||||
| @ -135,20 +133,4 @@ public class VolumeTO implements InternalIdentity { | ||||
|     public String toString() { | ||||
|         return new StringBuilder("Vol[").append(id).append("|").append(type).append("|").append(path).append("|").append(size).append("]").toString(); | ||||
|     } | ||||
|      | ||||
|     public void setBytesRate(long bytesRate) { | ||||
|         this.bytesRate = bytesRate; | ||||
|     } | ||||
|      | ||||
|     public long getBytesRate() { | ||||
|         return bytesRate; | ||||
|     } | ||||
|      | ||||
|     public void setIopsRate(long iopsRate) { | ||||
|         this.iopsRate = iopsRate; | ||||
|     } | ||||
|      | ||||
|     public long getIopsRate() { | ||||
|         return iopsRate; | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -52,12 +52,4 @@ public interface DiskOffering extends InfrastructureEntity, Identity, InternalId | ||||
|     boolean isCustomized(); | ||||
| 
 | ||||
|     void setDiskSize(long diskSize); | ||||
|      | ||||
|     void setBytesRate(long bytesRate); | ||||
|      | ||||
|     long getBytesRate(); | ||||
|      | ||||
|     void setIopsRate(long iopsRate); | ||||
|      | ||||
|     long getIopsRate(); | ||||
| } | ||||
|  | ||||
| @ -35,8 +35,6 @@ public class DiskProfile { | ||||
|     private Long templateId; | ||||
|     private long volumeId; | ||||
|     private String path; | ||||
|     private long bytesRate; | ||||
|     private long iopsRate; | ||||
| 
 | ||||
|     private HypervisorType hyperType; | ||||
| 
 | ||||
| @ -156,20 +154,4 @@ public class DiskProfile { | ||||
|     public void setSize(long size) { | ||||
|     	this.size = size; | ||||
|     } | ||||
|      | ||||
|     public void setBytesRate(long bytesRate) { | ||||
|         this.bytesRate = bytesRate; | ||||
|     } | ||||
|      | ||||
|     public long getBytesRate() { | ||||
|         return bytesRate; | ||||
|     } | ||||
|      | ||||
|     public void setIopsRate(long iopsRate) { | ||||
|         this.iopsRate = iopsRate; | ||||
|     } | ||||
|      | ||||
|     public long getIopsRate() { | ||||
|         return iopsRate; | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -61,12 +61,6 @@ public class CreateDiskOfferingCmd extends BaseCmd { | ||||
| 
 | ||||
|     @Parameter(name=ApiConstants.STORAGE_TYPE, type=CommandType.STRING, description="the storage type of the disk offering. Values are local and shared.") | ||||
|     private String storageType = ServiceOffering.StorageType.shared.toString(); | ||||
|      | ||||
|     @Parameter(name="bytesRate", type=CommandType.LONG, required=false, description="bytes rate of the disk offering") | ||||
|     private Long bytesRate; | ||||
| 
 | ||||
|     @Parameter(name="iopsRate", type=CommandType.LONG, required=false, description="io requests rate of the disk offering") | ||||
|     private Long iopsRate; | ||||
| 
 | ||||
|     @Parameter(name=ApiConstants.DISPLAY_OFFERING, type=CommandType.BOOLEAN, description="an optional field, whether to display the offering to the end user or not.") | ||||
|     private Boolean displayOffering; | ||||
| @ -98,14 +92,6 @@ public class CreateDiskOfferingCmd extends BaseCmd { | ||||
|     public Long getDomainId(){ | ||||
|         return domainId; | ||||
|     } | ||||
|      | ||||
|     public Long getBytesRate() { | ||||
|         return bytesRate; | ||||
|     } | ||||
|      | ||||
|     public Long getIopsRate() { | ||||
|         return iopsRate; | ||||
|     } | ||||
| 
 | ||||
|     public String getStorageType() { | ||||
|         return storageType; | ||||
| @ -128,7 +114,7 @@ public class CreateDiskOfferingCmd extends BaseCmd { | ||||
|     public long getEntityOwnerId() { | ||||
|         return Account.ACCOUNT_ID_SYSTEM; | ||||
|     } | ||||
|      | ||||
| 
 | ||||
|     @Override | ||||
|     public void execute(){ | ||||
|         DiskOffering offering = _configService.createDiskOffering(this); | ||||
|  | ||||
| @ -93,12 +93,6 @@ public class CreateServiceOfferingCmd extends BaseCmd { | ||||
|     @Parameter(name = ApiConstants.SERVICE_OFFERING_DETAILS, type = CommandType.MAP, description = "details for planner, used to store specific parameters") | ||||
|     private Map<String, String> details; | ||||
| 
 | ||||
|     @Parameter(name="bytesRate", type=CommandType.LONG, required=false, description="bytes rate of the disk offering") | ||||
|     private Long bytesRate; | ||||
| 
 | ||||
|     @Parameter(name="iopsRate", type=CommandType.LONG, required=false, description="io requests rate of the disk offering") | ||||
|     private Long iopsRate; | ||||
| 
 | ||||
|     ///////////////////////////////////////////////////// | ||||
|     /////////////////// Accessors /////////////////////// | ||||
|     ///////////////////////////////////////////////////// | ||||
| @ -177,14 +171,6 @@ public class CreateServiceOfferingCmd extends BaseCmd { | ||||
|         return params; | ||||
|     } | ||||
| 
 | ||||
|     public long getBytesRate() { | ||||
|        return bytesRate; | ||||
|     } | ||||
| 
 | ||||
|     public long getIopsRate() { | ||||
|         return iopsRate; | ||||
|     } | ||||
| 
 | ||||
|     ///////////////////////////////////////////////////// | ||||
|     /////////////// API Implementation/////////////////// | ||||
|     ///////////////////////////////////////////////////// | ||||
|  | ||||
| @ -57,12 +57,6 @@ public class DiskOfferingResponse extends BaseResponse { | ||||
| 
 | ||||
|     @SerializedName("storagetype") @Param(description="the storage type for this disk offering") | ||||
|     private String storageType; | ||||
|      | ||||
|     @SerializedName("diskBytesRate") @Param(description="bytes rate of the disk offering") | ||||
|     private Long bytesRate; | ||||
| 
 | ||||
|     @SerializedName("diskIORate") @Param(description="io requests rate of the disk offering") | ||||
|     private Long iopsRate; | ||||
| 
 | ||||
|     @SerializedName("displayoffering") @Param(description="whether to display the offering to the end user or not.") | ||||
|     private Boolean displayOffering; | ||||
| @ -155,12 +149,4 @@ public class DiskOfferingResponse extends BaseResponse { | ||||
|     public void setStorageType(String storageType) { | ||||
|         this.storageType = storageType; | ||||
|     } | ||||
|      | ||||
|     public void setBytesRate(long bytesRate) { | ||||
|         this.bytesRate = bytesRate; | ||||
|     } | ||||
|      | ||||
|     public void setIopsRate(long iopsRate) { | ||||
|         this.iopsRate = iopsRate; | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -86,12 +86,6 @@ public class ServiceOfferingResponse extends BaseResponse { | ||||
| 
 | ||||
|     @SerializedName(ApiConstants.NETWORKRATE) @Param(description="data transfer rate in megabits per second allowed.") | ||||
|     private Integer networkRate; | ||||
|      | ||||
|     @SerializedName("diskBytesRate") @Param(description="bytes rate of the service offering") | ||||
|     private Long bytesRate; | ||||
| 
 | ||||
|     @SerializedName("diskIORate") @Param(description="io requests rate of the service offering") | ||||
|     private Long iopsRate; | ||||
| 
 | ||||
|     @SerializedName(ApiConstants.DEPLOYMENT_PLANNER) @Param(description="deployment strategy used to deploy VM.") | ||||
|     private String deploymentPlanner; | ||||
| @ -254,12 +248,4 @@ public class ServiceOfferingResponse extends BaseResponse { | ||||
|     public void setVolatileVm(boolean isVolatile) { | ||||
|         this.isVolatile = isVolatile; | ||||
|     } | ||||
|      | ||||
|     public void setBytesRate(long bytesRate) { | ||||
|         this.bytesRate = bytesRate; | ||||
|     } | ||||
|      | ||||
|     public void setIopsRate(long iopsRate) { | ||||
|         this.iopsRate = iopsRate; | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -110,12 +110,6 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity | ||||
|     @Param(description = "shared or local storage") | ||||
|     private String storageType; | ||||
| 
 | ||||
|     @SerializedName("diskBytesRate") @Param(description="bytes rate of the disk offering") | ||||
|     private Long bytesRate; | ||||
| 
 | ||||
|     @SerializedName("diskIORate") @Param(description="io requests rate of the disk offering") | ||||
|     private Long iopsRate; | ||||
| 
 | ||||
|     @SerializedName(ApiConstants.HYPERVISOR) | ||||
|     @Param(description = "Hypervisor the volume belongs to") | ||||
|     private String hypervisor; | ||||
| @ -264,14 +258,6 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity | ||||
|         this.storageType = storageType; | ||||
|     } | ||||
| 
 | ||||
|     public void setBytesRate(long bytesRate) { | ||||
|         this.bytesRate = bytesRate; | ||||
|     } | ||||
| 
 | ||||
|     public void setIopsRate(long iopsRate) { | ||||
|         this.iopsRate = iopsRate; | ||||
|     } | ||||
| 
 | ||||
|     public void setHypervisor(String hypervisor) { | ||||
|         this.hypervisor = hypervisor; | ||||
|     } | ||||
|  | ||||
| @ -463,8 +463,6 @@ label.disable.vpn=Disable VPN | ||||
| label.disabled=Disabled | ||||
| label.disabling.vpn.access=Disabling VPN Access | ||||
| label.disk.allocated=Disk Allocated | ||||
| label.disk.bytes.rate=Disk Rate (BPS) | ||||
| label.disk.iops.rate=Disk Rate (IOPS) | ||||
| label.disk.offering=Disk Offering | ||||
| label.disk.read.bytes=Disk Read (Bytes) | ||||
| label.disk.read.io=Disk Read (IO) | ||||
|  | ||||
| @ -29,8 +29,6 @@ public class AttachVolumeCommand extends Command { | ||||
| 	String volumeName; | ||||
| 	Long deviceId; | ||||
| 	String chainInfo; | ||||
|     long bytesRate; | ||||
|     long iopsRate; | ||||
| 
 | ||||
| 	protected AttachVolumeCommand() { | ||||
| 	} | ||||
| @ -98,20 +96,4 @@ public class AttachVolumeCommand extends Command { | ||||
|     public String getChainInfo() { | ||||
|     	return chainInfo; | ||||
|     } | ||||
|      | ||||
|     public void setBytesRate(long bytesRate) { | ||||
|         this.bytesRate = bytesRate; | ||||
|     } | ||||
|      | ||||
|     public long getBytesRate() { | ||||
|         return bytesRate; | ||||
|     } | ||||
|      | ||||
|     public void setIopsRate(long iopsRate) { | ||||
|         this.iopsRate = iopsRate; | ||||
|     } | ||||
|      | ||||
|     public long getIopsRate() { | ||||
|         return iopsRate; | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -99,13 +99,6 @@ public class DiskOfferingVO implements DiskOffering { | ||||
| 
 | ||||
|     @Column(name="sort_key") | ||||
|     int sortKey; | ||||
|      | ||||
|     @Column(name="bytes_rate") | ||||
|     long bytesRate; | ||||
| 
 | ||||
|     @Column(name="iops_rate") | ||||
|     long iopsRate; | ||||
| 
 | ||||
| 
 | ||||
|     @Column(name="display_offering") | ||||
|     boolean displayOffering; | ||||
| @ -334,21 +327,4 @@ public class DiskOfferingVO implements DiskOffering { | ||||
|     public void setDisplayOffering(boolean displayOffering) { | ||||
|         this.displayOffering = displayOffering; | ||||
|     } | ||||
| 
 | ||||
|     public void setBytesRate(long bytesRate) { | ||||
|        this.bytesRate = bytesRate; | ||||
|     } | ||||
| 
 | ||||
|     public long getBytesRate() { | ||||
|        return bytesRate; | ||||
|     } | ||||
| 
 | ||||
|     public void setIopsRate(long iopsRate) { | ||||
|         this.iopsRate = iopsRate; | ||||
|     } | ||||
| 
 | ||||
|     public long getIopsRate() { | ||||
|         return iopsRate; | ||||
|     } | ||||
| 
 | ||||
| } | ||||
|  | ||||
| @ -1393,8 +1393,6 @@ ServerResource { | ||||
|             VolumeTO volume = new VolumeTO(cmd.getVolumeId(), dskch.getType(), | ||||
|                     pool.getType(), pool.getUuid(), pool.getPath(), | ||||
|                     vol.getName(), vol.getName(), disksize, null); | ||||
|             volume.setBytesRate(dskch.getBytesRate()); | ||||
|             volume.setIopsRate(dskch.getIopsRate()); | ||||
|             return new CreateAnswer(cmd, volume); | ||||
|         } catch (CloudRuntimeException e) { | ||||
|             s_logger.debug("Failed to create volume: " + e.toString()); | ||||
| @ -2610,7 +2608,7 @@ ServerResource { | ||||
|                     cmd.getPoolUuid()); | ||||
|             KVMPhysicalDisk disk = primary.getPhysicalDisk(cmd.getVolumePath()); | ||||
|             attachOrDetachDisk(conn, cmd.getAttach(), cmd.getVmName(), disk, | ||||
|                     cmd.getDeviceId().intValue(), cmd.getBytesRate(), cmd.getIopsRate()); | ||||
|                     cmd.getDeviceId().intValue()); | ||||
|         } catch (LibvirtException e) { | ||||
|             return new AttachVolumeAnswer(cmd, e.toString()); | ||||
|         } catch (InternalErrorException e) { | ||||
| @ -3478,11 +3476,6 @@ ServerResource { | ||||
|                 } | ||||
| 
 | ||||
|             } | ||||
|              | ||||
|             if (volume.getBytesRate() > 0) | ||||
|                 disk.setBytesRate(volume.getBytesRate()); | ||||
|             if (volume.getIopsRate() > 0) | ||||
|                 disk.setIopsRate(volume.getIopsRate()); | ||||
| 
 | ||||
|             vm.getDevices().addDevice(disk); | ||||
|         } | ||||
| @ -3617,7 +3610,7 @@ ServerResource { | ||||
| 
 | ||||
|     protected synchronized String attachOrDetachDisk(Connect conn, | ||||
|             boolean attach, String vmName, KVMPhysicalDisk attachingDisk, | ||||
|             int devId, long bytesRate, long iopsRate) throws LibvirtException, InternalErrorException { | ||||
|             int devId) throws LibvirtException, InternalErrorException { | ||||
|         List<DiskDef> disks = null; | ||||
|         Domain dm = null; | ||||
|         DiskDef diskdef = null; | ||||
| @ -3657,10 +3650,6 @@ ServerResource { | ||||
|                     diskdef.defBlockBasedDisk(attachingDisk.getPath(), devId, | ||||
|                             DiskDef.diskBus.VIRTIO); | ||||
|                 } | ||||
|                 if (bytesRate > 0) | ||||
|                     diskdef.setBytesRate(bytesRate); | ||||
|                 if (iopsRate > 0) | ||||
|                     diskdef.setIopsRate(iopsRate); | ||||
|             } | ||||
| 
 | ||||
|             String xml = diskdef.toString(); | ||||
|  | ||||
| @ -105,21 +105,6 @@ public class LibvirtDomainXMLParser { | ||||
|                                 DiskDef.diskBus.valueOf(bus.toUpperCase())); | ||||
|                     } | ||||
|                 } | ||||
|                  | ||||
|                 NodeList iotune = disk.getElementsByTagName("iotune"); | ||||
|                 if ((iotune != null) && (iotune.getLength() !=0)) { | ||||
|                     String bytesRateStr = getTagValue("total_bytes_sec", (Element)iotune.item(0)); | ||||
|                     if (bytesRateStr != null) { | ||||
|                         Long bytesRate = Long.parseLong(bytesRateStr); | ||||
|                         def.setBytesRate(bytesRate); | ||||
|                     } | ||||
|                     String iopsRateStr = getTagValue("total_iops_sec", (Element)iotune.item(0)); | ||||
|                     if (iopsRateStr != null) { | ||||
|                         Long iopsRate = Long.parseLong(iopsRateStr); | ||||
|                         def.setIopsRate(iopsRate); | ||||
|                     } | ||||
|                 } | ||||
| 
 | ||||
|                 diskDefs.add(def); | ||||
|             } | ||||
| 
 | ||||
|  | ||||
| @ -22,8 +22,6 @@ import java.util.List; | ||||
| import java.util.Map; | ||||
| import java.util.UUID; | ||||
| 
 | ||||
| import com.cloud.utils.script.Script; | ||||
| 
 | ||||
| public class LibvirtVMDef { | ||||
|     private String _hvsType; | ||||
|     private String _domName; | ||||
| @ -441,8 +439,6 @@ public class LibvirtVMDef { | ||||
|         private boolean _readonly = false; | ||||
|         private boolean _shareable = false; | ||||
|         private boolean _deferAttach = false; | ||||
|         private Long _bytesRate; | ||||
|         private Long _iopsRate; | ||||
| 
 | ||||
|         public void setDeviceType(deviceType deviceType) { | ||||
|             _deviceType = deviceType; | ||||
| @ -587,14 +583,6 @@ public class LibvirtVMDef { | ||||
|             char suffix = this._diskLabel.charAt(this._diskLabel.length() - 1); | ||||
|             return suffix - 'a'; | ||||
|         } | ||||
|          | ||||
|         public void setBytesRate(Long bytesRate) { | ||||
|             _bytesRate = bytesRate; | ||||
|         } | ||||
|          | ||||
|         public void setIopsRate(Long iopsRate) { | ||||
|             _iopsRate = iopsRate; | ||||
|         } | ||||
| 
 | ||||
|         @Override | ||||
|         public String toString() { | ||||
| @ -639,28 +627,6 @@ public class LibvirtVMDef { | ||||
|                 diskBuilder.append(" bus='" + _bus + "'"); | ||||
|             } | ||||
|             diskBuilder.append("/>\n"); | ||||
|              | ||||
|             String libvirtVersion = Script.runSimpleBashScript("virsh version |grep API | awk '{print $4}'"); | ||||
|             String qemuVersion = Script.runSimpleBashScript("virsh version |grep hypervisor | awk '{print $4}'"); | ||||
|             if ((_deviceType != deviceType.CDROM) && (libvirtVersion != null) && (qemuVersion != null)  | ||||
|                     && (((_bytesRate != null) && (_bytesRate > 0)) || ((_iopsRate != null) && (_iopsRate > 0)))) { // not CDROM, from libvirt 0.9.8 and QEMU 1.1.0 | ||||
|                 String[] libvirtVersions = libvirtVersion.split("\\."); | ||||
|                 String[] qemuVersions = qemuVersion.split("\\."); | ||||
|                 if (((libvirtVersions != null) && (libvirtVersions.length == 3) && ((Integer.valueOf(libvirtVersions[0]) > 0) | ||||
|                         || ((Integer.valueOf(libvirtVersions[0]) == 0) && (Integer.valueOf(libvirtVersions[1]) > 9)) | ||||
|                         || ((Integer.valueOf(libvirtVersions[0]) == 0) && (Integer.valueOf(libvirtVersions[1]) == 9) && (Integer.valueOf(libvirtVersions[1]) >= 8)))) | ||||
|                         && ((qemuVersions != null) && (qemuVersions.length == 3) && ((Integer.valueOf(qemuVersions[0]) > 1) | ||||
|                         || ((Integer.valueOf(qemuVersions[0]) == 1) && (Integer.valueOf(qemuVersions[1]) > 1)) | ||||
|                         || ((Integer.valueOf(qemuVersions[0]) == 1) && (Integer.valueOf(qemuVersions[1]) == 1) && (Integer.valueOf(qemuVersions[1]) >= 0))))) { | ||||
|                     diskBuilder.append("<iotune>\n"); | ||||
|                     if ((_bytesRate != null) && (_bytesRate > 0)) | ||||
|                         diskBuilder.append("<total_bytes_sec>" + _bytesRate + "</total_bytes_sec>\n"); | ||||
|                     if ((_iopsRate != null) && (_iopsRate > 0)) | ||||
|                         diskBuilder.append("<total_iops_sec>" + _iopsRate + "</total_iops_sec>\n"); | ||||
|                     diskBuilder.append("</iotune>\n"); | ||||
|                 } | ||||
|             } | ||||
|              | ||||
|             diskBuilder.append("</disk>\n"); | ||||
|             return diskBuilder.toString(); | ||||
|         } | ||||
|  | ||||
| @ -76,8 +76,6 @@ public class DiskOfferingJoinDaoImpl extends GenericDaoBase<DiskOfferingJoinVO, | ||||
|         diskOfferingResponse.setCustomized(offering.isCustomized()); | ||||
|         diskOfferingResponse.setStorageType(offering.isUseLocalStorage() ? ServiceOffering.StorageType.local.toString() : ServiceOffering.StorageType.shared.toString()); | ||||
|         diskOfferingResponse.setObjectName("diskoffering"); | ||||
|         diskOfferingResponse.setBytesRate(offering.getBytesRate()); | ||||
|         diskOfferingResponse.setIopsRate(offering.getIopsRate()); | ||||
|         return diskOfferingResponse; | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -76,8 +76,6 @@ public class ServiceOfferingJoinDaoImpl extends GenericDaoBase<ServiceOfferingJo | ||||
|         offeringResponse.setHostTag(offering.getHostTag()); | ||||
|         offeringResponse.setDeploymentPlanner(offering.getDeploymentPlanner()); | ||||
|         offeringResponse.setObjectName("serviceoffering"); | ||||
|         offeringResponse.setBytesRate(offering.getBytesRate()); | ||||
|         offeringResponse.setIopsRate(offering.getIopsRate()); | ||||
| 
 | ||||
|         return offeringResponse; | ||||
|     } | ||||
|  | ||||
| @ -160,8 +160,6 @@ public class VolumeJoinDaoImpl extends GenericDaoBase<VolumeJoinVO, Long> implem | ||||
|             } | ||||
|             volResponse.setStorageType(volume.isUseLocalStorage() ? ServiceOffering.StorageType.local.toString() : ServiceOffering.StorageType.shared | ||||
|                     .toString()); | ||||
|             volResponse.setBytesRate(volume.getBytesRate()); | ||||
|             volResponse.setIopsRate(volume.getIopsRate()); | ||||
|         } | ||||
|         Long poolId = volume.getPoolId(); | ||||
|         String poolName = (poolId == null) ? "none" : volume.getPoolName(); | ||||
|  | ||||
| @ -64,12 +64,6 @@ public class DiskOfferingJoinVO extends BaseViewVO implements InternalIdentity, | ||||
|     @Column(name="sort_key") | ||||
|     int sortKey; | ||||
| 
 | ||||
|     @Column(name="bytes_rate") | ||||
|     long bytesRate; | ||||
| 
 | ||||
|     @Column(name="iops_rate") | ||||
|     long iopsRate; | ||||
| 
 | ||||
|     @Column(name="type") | ||||
|     Type type; | ||||
| 
 | ||||
| @ -245,21 +239,6 @@ public class DiskOfferingJoinVO extends BaseViewVO implements InternalIdentity, | ||||
|         this.type = type; | ||||
|     } | ||||
| 
 | ||||
|     public void setBytesRate(long bytesRate) { | ||||
|        this.bytesRate = bytesRate; | ||||
|     } | ||||
| 
 | ||||
|     public long getBytesRate() { | ||||
|        return bytesRate; | ||||
|     } | ||||
| 
 | ||||
|     public void setIopsRate(long iopsRate) { | ||||
|         this.iopsRate = iopsRate; | ||||
|     } | ||||
| 
 | ||||
|     public long getIopsRate() { | ||||
|         return iopsRate; | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
|  | ||||
| @ -90,11 +90,6 @@ public class ServiceOfferingJoinVO extends BaseViewVO implements InternalIdentit | ||||
|     @Column(name="sort_key") | ||||
|     int sortKey; | ||||
| 
 | ||||
|     @Column(name="bytes_rate") | ||||
|     long bytesRate; | ||||
| 
 | ||||
|     @Column(name="iops_rate") | ||||
|     long iopsRate; | ||||
| 
 | ||||
|     @Column(name=GenericDao.CREATED_COLUMN) | ||||
|     private Date created; | ||||
| @ -334,20 +329,5 @@ public class ServiceOfferingJoinVO extends BaseViewVO implements InternalIdentit | ||||
|         this.volatileVm = volatileVm; | ||||
|     } | ||||
| 
 | ||||
|     public void setBytesRate(long bytesRate) { | ||||
|         this.bytesRate = bytesRate; | ||||
|     } | ||||
| 
 | ||||
|     public long getBytesRate() { | ||||
|         return bytesRate; | ||||
|     } | ||||
| 
 | ||||
|     public void setIopsRate(long iopsRate) { | ||||
|         this.iopsRate = iopsRate; | ||||
|     } | ||||
| 
 | ||||
|     public long getIopsRate() { | ||||
|         return iopsRate; | ||||
|     } | ||||
| 
 | ||||
| } | ||||
|  | ||||
| @ -184,12 +184,6 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity { | ||||
|     @Column(name="use_local_storage") | ||||
|     private boolean useLocalStorage; | ||||
| 
 | ||||
|     @Column(name="bytes_rate") | ||||
|     long bytesRate; | ||||
| 
 | ||||
|     @Column(name="iops_rate") | ||||
|     long iopsRate; | ||||
| 
 | ||||
|     @Column(name="pool_id") | ||||
|     private long poolId; | ||||
| 
 | ||||
| @ -748,22 +742,6 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity { | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     public void setBytesRate(long bytesRate) { | ||||
|        this.bytesRate = bytesRate; | ||||
|     } | ||||
| 
 | ||||
|     public long getBytesRate() { | ||||
|        return bytesRate; | ||||
|     } | ||||
| 
 | ||||
|     public void setIopsRate(long iopsRate) { | ||||
|         this.iopsRate = iopsRate; | ||||
|     } | ||||
| 
 | ||||
|     public long getIopsRate() { | ||||
|         return iopsRate; | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     public long getPoolId() { | ||||
|         return poolId; | ||||
|  | ||||
| @ -232,8 +232,6 @@ public enum Config { | ||||
| 	VmDiskStatsInterval("Advanced", ManagementServer.class, Integer.class, "vm.disk.stats.interval", "0", "Interval (in seconds) to report vm disk statistics.", null), | ||||
| 	VmTransitionWaitInterval("Advanced", ManagementServer.class, Integer.class, "vm.tranisition.wait.interval", "3600", "Time (in seconds) to wait before taking over a VM in transition state", null), | ||||
| 	VmDestroyForcestop("Advanced", ManagementServer.class, Boolean.class, "vm.destroy.forcestop", "false", "On destroy, force-stop takes this value ", null), | ||||
|         VmDiskThrottlingIORate("Advanced", ManagementServer.class, Integer.class, "vm.disk.throttling.iops_rate", "0", "Default disk I/O rate in requests per second allowed in User vm's disk.", null), | ||||
|         VmDiskThrottlingBytesRate("Advanced", ManagementServer.class, Integer.class, "vm.disk.throttling.bytes_rate", "0", "Default disk I/O rate in bytes per second allowed in User vm's disk.", null), | ||||
| 
 | ||||
| 	ControlCidr("Advanced", ManagementServer.class, String.class, "control.cidr", "169.254.0.0/16", "Changes the cidr for the control network traffic.  Defaults to using link local.  Must be unique within pods", null), | ||||
| 	ControlGateway("Advanced", ManagementServer.class, String.class, "control.gateway", "169.254.0.1", "gateway for the control network traffic", null), | ||||
|  | ||||
| @ -84,7 +84,7 @@ public interface ConfigurationManager extends ConfigurationService, Manager { | ||||
|      * @return ID | ||||
|      */ | ||||
|     ServiceOfferingVO createServiceOffering(long userId, boolean isSystem, VirtualMachine.Type vm_typeType, String name, int cpu, int ramSize, int speed, String displayText, boolean localStorageRequired, | ||||
|             boolean offerHA, boolean limitResourceUse, boolean volatileVm, String tags, Long domainId, String hostTag, Integer networkRate, String deploymentPlanner, Map<String, String> details, Long bytesRate, Long iopsRate); | ||||
|             boolean offerHA, boolean limitResourceUse, boolean volatileVm, String tags, Long domainId, String hostTag, Integer networkRate, String deploymentPlanner, Map<String, String> details); | ||||
| 
 | ||||
|     /** | ||||
|      * Creates a new disk offering | ||||
| @ -99,7 +99,7 @@ public interface ConfigurationManager extends ConfigurationService, Manager { | ||||
|      * @param isDisplayOfferingEnabled | ||||
|      * @return newly created disk offering | ||||
|      */ | ||||
|     DiskOfferingVO createDiskOffering(Long domainId, String name, String description, Long numGibibytes, String tags, boolean isCustomized, boolean localStorageRequired, boolean isDisplayOfferingEnabled, Long bytesRate, Long iopsRate); | ||||
|     DiskOfferingVO createDiskOffering(Long domainId, String name, String description, Long numGibibytes, String tags, boolean isCustomized, boolean localStorageRequired, boolean isDisplayOfferingEnabled); | ||||
| 
 | ||||
|     /** | ||||
|      * Creates a new pod | ||||
|  | ||||
| @ -2031,8 +2031,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati | ||||
|         return createServiceOffering(userId, cmd.getIsSystem(), vmType, cmd.getServiceOfferingName(), | ||||
|                 cpuNumber.intValue(), memory.intValue(), cpuSpeed.intValue(), cmd.getDisplayText(), | ||||
|                 localStorageRequired, offerHA, limitCpuUse, volatileVm, cmd.getTags(), cmd.getDomainId(), | ||||
|                 cmd.getHostTag(), cmd.getNetworkRate(), cmd.getDeploymentPlanner(), cmd.getDetails(), | ||||
|                 cmd.getBytesRate(), cmd.getIopsRate()); | ||||
|                 cmd.getHostTag(), cmd.getNetworkRate(), cmd.getDeploymentPlanner(), cmd.getDetails()); | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
| @ -2040,16 +2039,11 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati | ||||
|     public ServiceOfferingVO createServiceOffering(long userId, boolean isSystem, VirtualMachine.Type vm_type, | ||||
|             String name, int cpu, int ramSize, int speed, String displayText, boolean localStorageRequired, | ||||
|             boolean offerHA, boolean limitResourceUse, boolean volatileVm,  String tags, Long domainId, String hostTag, | ||||
|             Integer networkRate, String deploymentPlanner, Map<String, String> details, Long bytesRate, Long iopsRate) { | ||||
|             Integer networkRate, String deploymentPlanner, Map<String, String> details) { | ||||
|         tags = cleanupTags(tags); | ||||
|         ServiceOfferingVO offering = new ServiceOfferingVO(name, cpu, ramSize, speed, networkRate, null, offerHA, limitResourceUse, volatileVm, displayText, localStorageRequired, false, tags, isSystem, vm_type, | ||||
|                 domainId, hostTag, deploymentPlanner); | ||||
| 
 | ||||
|         if ((bytesRate != null) && (bytesRate > 0)) | ||||
|             offering.setBytesRate(bytesRate); | ||||
|         if ((iopsRate != null) && (iopsRate > 0)) | ||||
|             offering.setIopsRate(iopsRate); | ||||
| 
 | ||||
|         if ((offering = _serviceOfferingDao.persist(offering)) != null) { | ||||
|             if (details != null) { | ||||
|                 _serviceOfferingDetailsDao.persist(offering.getId(), details); | ||||
| @ -2135,7 +2129,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati | ||||
| 
 | ||||
|     @Override | ||||
|     @ActionEvent(eventType = EventTypes.EVENT_DISK_OFFERING_CREATE, eventDescription = "creating disk offering") | ||||
|     public DiskOfferingVO createDiskOffering(Long domainId, String name, String description, Long numGibibytes, String tags, boolean isCustomized, boolean localStorageRequired, boolean isDisplayOfferingEnabled, Long bytesRate, Long iopsRate) { | ||||
|     public DiskOfferingVO createDiskOffering(Long domainId, String name, String description, Long numGibibytes, String tags, boolean isCustomized, boolean localStorageRequired, boolean isDisplayOfferingEnabled) { | ||||
|         long diskSize = 0;// special case for custom disk offerings | ||||
|         if (numGibibytes != null && (numGibibytes <= 0)) { | ||||
|             throw new InvalidParameterValueException("Please specify a disk size of at least 1 Gb."); | ||||
| @ -2155,10 +2149,6 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati | ||||
|         DiskOfferingVO newDiskOffering = new DiskOfferingVO(domainId, name, description, diskSize, tags, isCustomized); | ||||
|         newDiskOffering.setUseLocalStorage(localStorageRequired); | ||||
|         newDiskOffering.setDisplayOffering(isDisplayOfferingEnabled); | ||||
|         if (bytesRate != null && (bytesRate > 0)) | ||||
|             newDiskOffering.setBytesRate(bytesRate); | ||||
|         if (iopsRate != null && (iopsRate > 0)) | ||||
|             newDiskOffering.setIopsRate(iopsRate); | ||||
|         UserContext.current().setEventDetails("Disk offering id=" + newDiskOffering.getId()); | ||||
|         DiskOfferingVO offering = _diskOfferingDao.persist(newDiskOffering); | ||||
|         if (offering != null) { | ||||
| @ -2199,9 +2189,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         Long bytesRate = cmd.getBytesRate(); | ||||
|         Long iopsRate = cmd.getIopsRate(); | ||||
|         return createDiskOffering(domainId, name, description, numGibibytes, tags, isCustomized, localStorageRequired, isDisplayOfferingEnabled, bytesRate, iopsRate); | ||||
|         return createDiskOffering(domainId, name, description, numGibibytes, tags, isCustomized, localStorageRequired, isDisplayOfferingEnabled); | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|  | ||||
| @ -35,8 +35,6 @@ import com.cloud.exception.ConnectionException; | ||||
| import com.cloud.exception.StorageUnavailableException; | ||||
| import com.cloud.host.Host; | ||||
| import com.cloud.hypervisor.Hypervisor.HypervisorType; | ||||
| import com.cloud.service.ServiceOfferingVO; | ||||
| import com.cloud.storage.DiskOfferingVO; | ||||
| import com.cloud.storage.Storage.ImageFormat; | ||||
| import com.cloud.utils.Pair; | ||||
| import com.cloud.vm.DiskProfile; | ||||
| @ -124,8 +122,4 @@ public interface StorageManager extends StorageService { | ||||
|     DataStore createLocalStorage(Host host, StoragePoolInfo poolInfo) throws ConnectionException; | ||||
| 
 | ||||
|     BigDecimal getStorageOverProvisioningFactor(Long dcId); | ||||
| 
 | ||||
|     Long getDiskBytesRate(ServiceOfferingVO offering, DiskOfferingVO diskOffering); | ||||
| 
 | ||||
|     Long getDiskIORate(ServiceOfferingVO offering, DiskOfferingVO diskOffering); | ||||
| } | ||||
|  | ||||
| @ -127,7 +127,6 @@ import com.cloud.resource.ResourceState; | ||||
| import com.cloud.server.ManagementServer; | ||||
| import com.cloud.server.StatsCollector; | ||||
| import com.cloud.service.dao.ServiceOfferingDao; | ||||
| import com.cloud.service.ServiceOfferingVO; | ||||
| import com.cloud.storage.Storage.ImageFormat; | ||||
| import com.cloud.storage.Storage.StoragePoolType; | ||||
| import com.cloud.storage.Volume.Type; | ||||
| @ -143,7 +142,6 @@ import com.cloud.storage.dao.VMTemplateS3Dao; | ||||
| import com.cloud.storage.dao.VMTemplateSwiftDao; | ||||
| import com.cloud.storage.dao.VolumeDao; | ||||
| import com.cloud.storage.dao.VolumeHostDao; | ||||
| import com.cloud.storage.DiskOfferingVO; | ||||
| import com.cloud.storage.download.DownloadMonitor; | ||||
| import com.cloud.storage.listener.StoragePoolMonitor; | ||||
| import com.cloud.storage.listener.VolumeStateListener; | ||||
| @ -1885,36 +1883,4 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     // get bytesRate from disk_offering and vm.disk.throttling.bytes_rate | ||||
|     @Override | ||||
|     public Long getDiskBytesRate(ServiceOfferingVO offering, DiskOfferingVO diskOffering) { | ||||
|         if ((offering != null) && (offering.getBytesRate() > 0)) { | ||||
|             return offering.getBytesRate(); | ||||
|         } else if ((diskOffering != null) && (diskOffering.getBytesRate() > 0)) { | ||||
|             return diskOffering.getBytesRate(); | ||||
|         } else { | ||||
|             Long bytesRate = Long.parseLong(_configDao.getValue(Config.VmDiskThrottlingBytesRate.key())); | ||||
|             if (bytesRate > 0)  { | ||||
|                 return bytesRate; | ||||
|             } | ||||
|         } | ||||
|         return 0L; | ||||
|     } | ||||
| 
 | ||||
|     // get iopsRate from disk_offering and vm.disk.throttling.io_rate | ||||
|     @Override | ||||
|     public Long getDiskIORate(ServiceOfferingVO offering, DiskOfferingVO diskOffering) { | ||||
|         if ((offering != null) && (offering.getIopsRate() > 0)) { | ||||
|             return offering.getIopsRate(); | ||||
|         } else if ((diskOffering != null) && (diskOffering.getIopsRate() > 0)) { | ||||
|             return diskOffering.getIopsRate(); | ||||
|         } else { | ||||
|             Long iopsRate = Long.parseLong(_configDao.getValue(Config.VmDiskThrottlingIORate.key())); | ||||
|             if (iopsRate > 0)  { | ||||
|                 return iopsRate; | ||||
|             } | ||||
|         } | ||||
|         return 0L; | ||||
|     } | ||||
| 
 | ||||
| } | ||||
|  | ||||
| @ -115,7 +115,6 @@ import com.cloud.server.ManagementServer; | ||||
| import com.cloud.service.ServiceOfferingVO; | ||||
| import com.cloud.service.dao.ServiceOfferingDao; | ||||
| import com.cloud.storage.Storage.ImageFormat; | ||||
| import com.cloud.storage.StorageManager; | ||||
| import com.cloud.storage.Storage.StoragePoolType; | ||||
| import com.cloud.storage.Volume.Event; | ||||
| import com.cloud.storage.Volume.Type; | ||||
| @ -337,9 +336,6 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager { | ||||
|                 diskOffering.getUseLocalStorage(), | ||||
|                 diskOffering.isRecreatable(), null); | ||||
|         dskCh.setHyperType(dataDiskHyperType); | ||||
|         dskCh.setBytesRate(storageMgr.getDiskBytesRate(null, diskOffering)); | ||||
|         dskCh.setIopsRate(storageMgr.getDiskIORate(null, diskOffering)); | ||||
| 
 | ||||
|         DataCenterVO destPoolDataCenter = _dcDao.findById(destPoolDcId); | ||||
|         HostPodVO destPoolPod = _podDao.findById(destPoolPodId); | ||||
|          | ||||
| @ -515,8 +511,6 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager { | ||||
|         DataCenterVO dc = _dcDao.findById(volume.getDataCenterId()); | ||||
|         DiskProfile dskCh = new DiskProfile(volume, diskOffering, | ||||
|                 snapshot.getHypervisorType()); | ||||
|         dskCh.setBytesRate(storageMgr.getDiskBytesRate(null, diskOffering)); | ||||
|         dskCh.setIopsRate(storageMgr.getDiskIORate(null, diskOffering)); | ||||
| 
 | ||||
|         // Determine what pod to store the volume in | ||||
|         while ((pod = _resourceMgr.findPod(null, null, dc, account.getId(), | ||||
| @ -617,8 +611,6 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager { | ||||
|         DiskProfile dskCh = createDiskCharacteristics(volume, template, dc, | ||||
|                 diskOffering); | ||||
|         dskCh.setHyperType(vm.getHypervisorType()); | ||||
|         dskCh.setBytesRate(storageMgr.getDiskBytesRate(offering, diskOffering)); | ||||
|         dskCh.setIopsRate(storageMgr.getDiskIORate(offering, diskOffering)); | ||||
|         // Find a suitable storage to create volume on | ||||
|         StoragePool destPool = storageMgr.findStoragePool(dskCh, dc, pod, | ||||
|                 clusterId, null, vm, avoidPools); | ||||
| @ -663,8 +655,6 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager { | ||||
|         } | ||||
| 
 | ||||
|         dskCh.setHyperType(hyperType); | ||||
|         dskCh.setBytesRate(storageMgr.getDiskBytesRate(offering, diskOffering)); | ||||
|         dskCh.setIopsRate(storageMgr.getDiskIORate(offering, diskOffering)); | ||||
|          | ||||
|         final HashSet<StoragePool> avoidPools = new HashSet<StoragePool>( | ||||
|                 avoids); | ||||
| @ -2242,12 +2232,7 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager { | ||||
| 
 | ||||
|         for (VolumeVO vol : vols) { | ||||
|             PrimaryDataStoreInfo pool = (PrimaryDataStoreInfo)this.dataStoreMgr.getDataStore(vol.getPoolId(), DataStoreRole.Primary); | ||||
|             ServiceOfferingVO offering = _offeringDao.findById(vm.getServiceOfferingId()); | ||||
|             DiskOfferingVO diskOffering = _diskOfferingDao.findById(vol.getDiskOfferingId()); | ||||
|             VolumeTO newVolume = new VolumeTO(vol, pool); | ||||
|             newVolume.setBytesRate(storageMgr.getDiskBytesRate(offering, diskOffering)); | ||||
|             newVolume.setIopsRate(storageMgr.getDiskIORate(offering, diskOffering)); | ||||
|             vm.addDisk(newVolume); | ||||
|             vm.addDisk(new VolumeTO(vol, pool)); | ||||
|         } | ||||
| 
 | ||||
|         if (vm.getType() == VirtualMachine.Type.User) { | ||||
| @ -2477,12 +2462,7 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager { | ||||
|                 pool = (StoragePool)dataStoreMgr.getDataStore(result.second().getId(), DataStoreRole.Primary); | ||||
|                 vol = result.first(); | ||||
|             } | ||||
|             ServiceOfferingVO offering = _offeringDao.findById(vm.getServiceOfferingId()); | ||||
|             DiskOfferingVO diskOffering = _diskOfferingDao.findById(vol.getDiskOfferingId()); | ||||
|             VolumeTO newVolume = new VolumeTO(vol, pool); | ||||
|             newVolume.setBytesRate(storageMgr.getDiskBytesRate(offering, diskOffering)); | ||||
|             newVolume.setIopsRate(storageMgr.getDiskIORate(offering, diskOffering)); | ||||
|             vm.addDisk(newVolume); | ||||
|             vm.addDisk(new VolumeTO(vol, pool)); | ||||
|         } | ||||
|     } | ||||
|      | ||||
|  | ||||
| @ -967,12 +967,6 @@ public class DatabaseConfig { | ||||
|         } | ||||
|         DiskOfferingVO diskOffering = new DiskOfferingVO(domainId, name, displayText, diskSpace , tags, false); | ||||
|         diskOffering.setUseLocalStorage(local); | ||||
|         Long bytesRate = Long.parseLong(_currentObjectParams.get("bytesRate")); | ||||
|         if (bytesRate != null && (bytesRate > 0)) | ||||
|             diskOffering.setBytesRate(bytesRate); | ||||
|         Long iopsRate = Long.parseLong(_currentObjectParams.get("iopsRate")); | ||||
|         if (iopsRate != null && (iopsRate > 0)) | ||||
|             diskOffering.setIopsRate(iopsRate); | ||||
|         DiskOfferingDaoImpl offering = ComponentContext.inject(DiskOfferingDaoImpl.class); | ||||
|         try { | ||||
|             offering.persist(diskOffering); | ||||
|  | ||||
| @ -1328,7 +1328,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac | ||||
|             throw new CloudRuntimeException("Unable to migrate vm: " + e.toString()); | ||||
|         } | ||||
| 
 | ||||
|         VirtualMachineProfile<T> profile = new VirtualMachineProfileImpl<T>(vm); | ||||
|         VirtualMachineProfile<VMInstanceVO> profile = new VirtualMachineProfileImpl<VMInstanceVO>(vm); | ||||
|         boolean migrationResult = false; | ||||
|         try { | ||||
|             migrationResult = this.volumeMgr.storageMigration(profile, destPool); | ||||
|  | ||||
| @ -489,7 +489,7 @@ public class MockConfigurationManagerImpl extends ManagerBase implements Configu | ||||
|      */ | ||||
|     @Override | ||||
|     public ServiceOfferingVO createServiceOffering(long userId, boolean isSystem, Type vm_typeType, String name, int cpu, int ramSize, int speed, String displayText, boolean localStorageRequired, boolean offerHA, | ||||
|             boolean limitResourceUse, boolean volatileVm, String tags, Long domainId, String hostTag, Integer networkRate, String deploymentPlanner, Map<String, String> details, Long bytesRate, Long iopsRate) { | ||||
|             boolean limitResourceUse, boolean volatileVm, String tags, Long domainId, String hostTag, Integer networkRate, String deploymentPlanner, Map<String, String> details) { | ||||
|         // TODO Auto-generated method stub | ||||
|         return null; | ||||
|     } | ||||
| @ -654,7 +654,7 @@ public class MockConfigurationManagerImpl extends ManagerBase implements Configu | ||||
|      * @see com.cloud.configuration.ConfigurationManager#createDiskOffering(java.lang.Long, java.lang.String, java.lang.String, java.lang.Long, java.lang.String, boolean, boolean, boolean) | ||||
|      */ | ||||
|     @Override | ||||
|     public DiskOfferingVO createDiskOffering(Long domainId, String name, String description, Long numGibibytes, String tags, boolean isCustomized, boolean localStorageRequired, boolean isDisplayOfferingEnabled, Long bytesRate, Long iopsRate) { | ||||
|     public DiskOfferingVO createDiskOffering(Long domainId, String name, String description, Long numGibibytes, String tags, boolean isCustomized, boolean localStorageRequired, boolean isDisplayOfferingEnabled) { | ||||
|         // TODO Auto-generated method stub | ||||
|         return null; | ||||
|     } | ||||
|  | ||||
| @ -290,10 +290,6 @@ 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', | ||||
| @ -766,8 +762,6 @@ CREATE VIEW `cloud`.`volume_view` AS | ||||
|         disk_offering.display_text disk_offering_display_text, | ||||
|         disk_offering.use_local_storage, | ||||
|         disk_offering.system_use, | ||||
|         disk_offering.bytes_rate, | ||||
|         disk_offering.iops_rate, | ||||
|         storage_pool.id pool_id, | ||||
|         storage_pool.uuid pool_uuid, | ||||
|         storage_pool.name pool_name, | ||||
| @ -1076,8 +1070,6 @@ CREATE VIEW `cloud`.`service_offering_view` AS | ||||
|         disk_offering.removed, | ||||
|         disk_offering.use_local_storage, | ||||
|         disk_offering.system_use, | ||||
|         disk_offering.bytes_rate, | ||||
|         disk_offering.iops_rate, | ||||
|         service_offering.cpu, | ||||
|         service_offering.speed, | ||||
|         service_offering.ram_size, | ||||
| @ -1384,8 +1376,6 @@ CREATE VIEW `cloud`.`disk_offering_view` AS | ||||
|         disk_offering.removed, | ||||
|         disk_offering.use_local_storage, | ||||
|         disk_offering.system_use, | ||||
|         disk_offering.bytes_rate, | ||||
|         disk_offering.iops_rate, | ||||
|         disk_offering.sort_key, | ||||
|         disk_offering.type, | ||||
| 	disk_offering.display_offering, | ||||
| @ -1626,8 +1616,6 @@ CREATE VIEW `cloud`.`volume_view` AS | ||||
|         disk_offering.display_text disk_offering_display_text, | ||||
|         disk_offering.use_local_storage, | ||||
|         disk_offering.system_use, | ||||
|         disk_offering.bytes_rate, | ||||
|         disk_offering.iops_rate, | ||||
|         storage_pool.id pool_id, | ||||
|         storage_pool.uuid pool_uuid, | ||||
|         storage_pool.name pool_name, | ||||
| @ -1858,8 +1846,7 @@ 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. '); | ||||
| 
 | ||||
| 
 | ||||
| -- Re-enable foreign key checking, at the end of the upgrade path | ||||
| SET foreign_key_checks = 1; | ||||
|  | ||||
| @ -469,8 +469,6 @@ dictionary = { | ||||
| 'label.disable.vpn': '<fmt:message key="label.disable.vpn" />', | ||||
| 'label.disabling.vpn.access': '<fmt:message key="label.disabling.vpn.access" />', | ||||
| 'label.disk.allocated': '<fmt:message key="label.disk.allocated" />', | ||||
| 'label.disk.bytes.rate': '<fmt:message key="label.disk.bytes.rate" />', | ||||
| 'label.disk.iops.rate': '<fmt:message key="label.disk.iops.rate" />', | ||||
| 'label.disk.read.bytes': '<fmt:message key="label.disk.read.bytes" />', | ||||
| 'label.disk.read.io': '<fmt:message key="label.disk.read.io" />', | ||||
| 'label.disk.offering': '<fmt:message key="label.disk.offering" />', | ||||
|  | ||||
| @ -109,20 +109,6 @@ | ||||
|                       number: true | ||||
|                     } | ||||
|                   }, | ||||
|                   diskBytesRate: { | ||||
|                 	  label: 'label.disk.bytes.rate', | ||||
|                       validation: { | ||||
|                         required: false, //optional
 | ||||
|                         number: true | ||||
|                       } | ||||
|                   }, | ||||
|                   diskIORate: { | ||||
|                 	  label: 'label.disk.iops.rate', | ||||
|                       validation: { | ||||
|                         required: false, //optional
 | ||||
|                         number: true | ||||
|                       } | ||||
|                   }, | ||||
|                   offerHA: { | ||||
|                     label: 'label.offer.ha', | ||||
|                     docID: 'helpComputeOfferingHA', | ||||
| @ -241,16 +227,6 @@ | ||||
| 									  networkrate: args.data.networkRate | ||||
| 									}); | ||||
| 								} | ||||
|                 if(args.data.diskBytesRate != null && args.data.diskBytesRate.length > 0) { | ||||
|                                                                   $.extend(data, { | ||||
|                                                                           bytesRate: args.data.diskBytesRate | ||||
|                                                                         }); | ||||
|                                                                 } | ||||
|                 if(args.data.diskIORate != null && args.data.diskIORate.length > 0) { | ||||
|                                                                   $.extend(data, { | ||||
|                                                                           iopsRate: args.data.diskIORate | ||||
|                                                                         }); | ||||
|                                                                 } | ||||
| 
 | ||||
|                 $.extend(data, { | ||||
|                   offerha: (args.data.offerHA == "on") | ||||
| @ -420,8 +396,6 @@ | ||||
|                       } | ||||
|                     }, | ||||
|                     networkrate: { label: 'label.network.rate' }, | ||||
|                     diskBytesRate: { label: 'label.disk.bytes.rate' }, | ||||
|                     diskIORate: { label: 'label.disk.iops.rate' }, | ||||
|                     offerha: { | ||||
|                       label: 'label.offer.ha', | ||||
|                       converter: cloudStack.converters.toBooleanText | ||||
| @ -560,20 +534,6 @@ | ||||
|                       number: true | ||||
|                     } | ||||
|                   }, | ||||
|                   diskBytesRate: { | ||||
|                 	  label: 'label.disk.bytes.rate', | ||||
|                       validation: { | ||||
|                         required: false, //optional
 | ||||
|                         number: true | ||||
|                       } | ||||
|                   }, | ||||
|                   diskIORate: { | ||||
|                 	  label: 'label.disk.iops.rate', | ||||
|                       validation: { | ||||
|                         required: false, //optional
 | ||||
|                         number: true | ||||
|                       } | ||||
|                   }, | ||||
|                   offerHA: { | ||||
|                     label: 'label.offer.ha', | ||||
|                     docID: 'helpSystemOfferingHA', | ||||
| @ -642,16 +602,6 @@ | ||||
| 									  networkrate: args.data.networkRate | ||||
| 									});								 | ||||
| 								} | ||||
|                 if(args.data.diskBytesRate != null && args.data.diskBytesRate.length > 0) { | ||||
|                                                                   $.extend(data, { | ||||
|                                                                           bytesRate: args.data.diskBytesRate | ||||
|                                                                         }); | ||||
|                                                                 } | ||||
|                 if(args.data.diskIORate != null && args.data.diskIORate.length > 0) { | ||||
|                                                                   $.extend(data, { | ||||
|                                                                           iopsRate: args.data.diskIORate | ||||
|                                                                         }); | ||||
|                                                                 } | ||||
| 
 | ||||
| 								$.extend(data, { | ||||
| 								  offerha: (args.data.offerHA == "on") | ||||
| @ -831,8 +781,6 @@ | ||||
|                       } | ||||
|                     }, | ||||
|                     networkrate: { label: 'label.network.rate' }, | ||||
|                     diskBytesRate: { label: 'label.disk.bytes.rate' }, | ||||
|                     diskIORate: { label: 'label.disk.iops.rate' }, | ||||
|                     offerha: { | ||||
|                       label: 'label.offer.ha', | ||||
|                       converter: cloudStack.converters.toBooleanText | ||||
| @ -892,20 +840,6 @@ | ||||
|                 else | ||||
|                   return "N/A"; | ||||
|               } | ||||
|             }, | ||||
|             diskBytesRate: { | ||||
|           	  label: 'label.disk.bytes.rate', | ||||
|                 validation: { | ||||
|                   required: false, //optional
 | ||||
|                   number: true | ||||
|                 } | ||||
|             }, | ||||
|             diskIORate: { | ||||
|           	  label: 'label.disk.iops.rate', | ||||
|                 validation: { | ||||
|                   required: false, //optional
 | ||||
|                   number: true | ||||
|                 } | ||||
|             } | ||||
|           }, | ||||
| 
 | ||||
| @ -977,20 +911,6 @@ | ||||
|                     dependsOn: 'isCustomized', | ||||
|                     validation: { required: true, number: true } | ||||
|                   }, | ||||
|                   diskBytesRate: { | ||||
|                 	  label: 'label.disk.bytes.rate', | ||||
|                       validation: { | ||||
|                         required: false, //optional
 | ||||
|                         number: true | ||||
|                       } | ||||
|                   }, | ||||
|                   diskIORate: { | ||||
|                 	  label: 'label.disk.iops.rate', | ||||
|                       validation: { | ||||
|                         required: false, //optional
 | ||||
|                         number: true | ||||
|                       } | ||||
|                   }, | ||||
|                   tags: { | ||||
|                     label: 'label.storage.tags', | ||||
|                     docID: 'helpDiskOfferingStorageTags' | ||||
| @ -1164,8 +1084,6 @@ | ||||
|                           return "N/A"; | ||||
|                       } | ||||
|                     }, | ||||
|                     diskBytesRate: { label: 'label.disk.bytes.rate' }, | ||||
|                     diskIORate: { label: 'label.disk.iops.rate' }, | ||||
|                     tags: { label: 'label.storage.tags' }, | ||||
|                     domain: { label: 'label.domain' }, | ||||
|                     storagetype: { label: 'label.storage.type' } | ||||
|  | ||||
| @ -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": jsonObj.diskioread, | ||||
|                   diskiowrite: (jsonObj.diskiowrite == null)? "N/A": jsonObj.diskiowrite | ||||
|                   diskioread: (jsonObj.diskioread == null)? "N/A": cloudStack.converters.convertBytes(jsonObj.diskioread * 1024), | ||||
|                   diskiowrite: (jsonObj.diskiowrite == null)? "N/A": cloudStack.converters.convertBytes(jsonObj.diskiowrite * 1024) | ||||
|                   } | ||||
|                 }); | ||||
|               } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user