Skip to content

[CLOUDSTACK-10039] Adding IOPS/GB offering#2231

Closed
syed wants to merge 1 commit into
apache:mainfrom
syed:disk-offering-iops-per-gig
Closed

[CLOUDSTACK-10039] Adding IOPS/GB offering#2231
syed wants to merge 1 commit into
apache:mainfrom
syed:disk-offering-iops-per-gig

Conversation

@syed
Copy link
Copy Markdown
Contributor

@syed syed commented Aug 8, 2017

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

We want to add a disk offering where we can specify the Min/Max IOPS as a function of size. The idea is the larger volume you create, the greater your IOPS will be (this is similar to the way GCE handles IOPS). We also have added limits to the IOPS (min and max) so that once the volume goes beyond a certain size, the IOPS won't change and are capped to the given values.

The following parameters are added to the createDiskOffering API:

  1. `miniopspergb' : Minimum IOPS/GB for the offering
  2. maxiopspergb: Maximum IOPS/GB for the offering
  3. highestminiops: The highest miniops value that is allowed for this offering
  4. highestmaxiops: The highest maxiops value that is allowed for this offering

@wido
Copy link
Copy Markdown
Contributor

wido commented Aug 10, 2017

Could you resolve the conflict @syed ?

@syed syed force-pushed the disk-offering-iops-per-gig branch from d4ea9d1 to 4b94afb Compare August 15, 2017 17:07
@syed
Copy link
Copy Markdown
Contributor Author

syed commented Aug 15, 2017

@wido I've resolved the conflicts. I am still trying to see if I can get the DB changes to be idempotently added. However the way Cloudstack reads the db script is really weird. Right now its a WIP

@syed syed force-pushed the disk-offering-iops-per-gig branch from 971decb to 2de3b1b Compare August 21, 2017 20:41
@cloudmonger
Copy link
Copy Markdown

ACS CI BVT Run

Sumarry:
Build Number 1126
Hypervisor xenserver
NetworkType Advanced
Passed=109
Failed=5
Skipped=12

Link to logs Folder (search by build_no): https://www.dropbox.com/sh/r2si930m8xxzavs/AAAzNrnoF1fC3auFrvsKo_8-a?dl=0

Failed tests:

  • test_router_dnsservice.py

  • test_router_dns_guestipquery Failed

  • test_routers_network_ops.py

  • test_01_isolate_network_FW_PF_default_routes_egress_true Failing since 124 runs

  • test_02_isolate_network_FW_PF_default_routes_egress_false Failing since 124 runs

  • test_01_RVR_Network_FW_PF_SSH_default_routes_egress_true Failing since 120 runs

  • test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false Failing since 120 runs

Skipped tests:
test_vm_nic_adapter_vmxnet3
test_01_verify_libvirt
test_02_verify_libvirt_after_restart
test_03_verify_libvirt_attach_disk
test_04_verify_guest_lspci
test_05_change_vm_ostype_restart
test_06_verify_guest_lspci_again
test_static_role_account_acls
test_11_ss_nfs_version_on_ssvm
test_nested_virtualization_vmware
test_3d_gpu_support
test_deploy_vgpu_enabled_vm

Passed test suits:
test_deploy_vm_with_userdata.py
test_affinity_groups_projects.py
test_portable_publicip.py
test_vm_snapshots.py
test_over_provisioning.py
test_global_settings.py
test_scale_vm.py
test_service_offerings.py
test_routers_iptables_default_policy.py
test_loadbalance.py
test_routers.py
test_reset_vm_on_reboot.py
test_deploy_vms_with_varied_deploymentplanners.py
test_network.py
test_router_dns.py
test_non_contigiousvlan.py
test_login.py
test_deploy_vm_iso.py
test_list_ids_parameter.py
test_public_ip_range.py
test_multipleips_per_nic.py
test_metrics_api.py
test_regions.py
test_affinity_groups.py
test_network_acl.py
test_pvlan.py
test_volumes.py
test_nic.py
test_deploy_vm_root_resize.py
test_resource_detail.py
test_secondary_storage.py
test_vm_life_cycle.py
test_disk_offerings.py

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Aug 31, 2017

@syed can you fix the conflicts?

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Oct 4, 2017

@syed ping

@syed syed force-pushed the disk-offering-iops-per-gig branch from 2de3b1b to 12bd5e8 Compare October 4, 2017 17:22
@syed
Copy link
Copy Markdown
Contributor Author

syed commented Oct 4, 2017

@rhtyd Sorry Rohit, looks like this slipped out of my radar. I've rebased and resolved the conflicts.

@syed syed force-pushed the disk-offering-iops-per-gig branch from 12bd5e8 to 047e83b Compare October 4, 2017 17:30
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Oct 12, 2017

@syed looks like we have new conflicts

@syed
Copy link
Copy Markdown
Contributor Author

syed commented Oct 12, 2017

darn it! I'll resolve it now

@syed syed force-pushed the disk-offering-iops-per-gig branch from 047e83b to 455ecf1 Compare October 12, 2017 15:41
@syed
Copy link
Copy Markdown
Contributor Author

syed commented Oct 12, 2017

@rhtyd Done!

@bwsw
Copy link
Copy Markdown
Contributor

bwsw commented Nov 13, 2017

Cool feature. Recently have thought about it.

@yadvr yadvr added this to the 4.11 milestone Dec 10, 2017
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Jan 3, 2018

@syed can you fix the conflicts?
Additional code review is also requested.

@yadvr yadvr modified the milestones: 4.11, 4.12 Jan 6, 2018
@rafaelweingartner
Copy link
Copy Markdown
Member

Ping @syed

@syed syed force-pushed the disk-offering-iops-per-gig branch from 455ecf1 to 3c95160 Compare February 23, 2018 16:39
@syed
Copy link
Copy Markdown
Contributor Author

syed commented Feb 23, 2018

@rafaelweingartner I've resolved the conflicts. I'd really like to get this in because I think this is the 3rd time rebasing it. If you could do a code review, that would be sublime :)

Copy link
Copy Markdown
Member

@rafaelweingartner rafaelweingartner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@syed thanks for the PR, but we need to work on it.
Can you check some of my inquiries?

DROP PROCEDURE IF EXISTS `cloud`.`ADD_COLUMN_TO_TABLE_IDEMPOTENT`;

DELIMITER //
CREATE PROCEDURE `cloud`.`ADD_COLUMN_TO_TABLE_IDEMPOTENT`(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this being introduced by some other PR?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. This is only for this PR

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm.. Then, I think it is better to coordinate with PR #2449.

throw new InvalidParameterValueException("Cannot set Min/Max IOPS/GB for a fixed size disk offering");
}

if ((isCustomizedIops != null && isCustomizedIops) || minIops != null || maxIops != null) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use BooleanUtils here?

"custom IOPS or fixed IOPS");
}

if (minIopsPerGb != null && maxIopsPerGb != null) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you extract this block to a specific method? Document it, and write unit tests for it?

}
}

if (highestMinIops != null && highestMaxIops != null) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole validation block can also be extracted to a method, documented and unit tested.

newSize = volume.getSize();
}

newSizeInGb = newSize >> 30;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not use bit shift here. It makes things harder to read and understand.

The code is already convoluted enough

newSize = newDiskOffering.getDiskSize();
}

newSizeInGb = newSize >> 30;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bit shift...

Have you checked if there is a library to convert between these bases? If there is none, what about we create an utils method to execute this job?

@@ -0,0 +1,324 @@
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these scripts should not be here, right?

@bwsw
Copy link
Copy Markdown
Contributor

bwsw commented Nov 29, 2018

@syed Hi, do you continue to manage this PR? I think it's very beneficial for 4.12.

@svenvogel
Copy link
Copy Markdown
Contributor

@syed is it useful for solidfire? Is there any progress in this pr?

@syed
Copy link
Copy Markdown
Contributor Author

syed commented Dec 12, 2018 via email

@rafaelweingartner
Copy link
Copy Markdown
Member

@syed I will move this to 5.0.0. The freeze date is coming, and it does not seem that we will be able to add it to 4.12.0.

@rafaelweingartner rafaelweingartner removed this from the 4.12.0.0 milestone Jan 15, 2019
@rafaelweingartner rafaelweingartner added this to the 5.0.0.0 milestone Jan 15, 2019
@yadvr yadvr removed this from the 4.13.0.0 milestone May 27, 2019
@GabrielBrascher GabrielBrascher added this to the 4.15.0.0 milestone Jan 29, 2020
@GabrielBrascher
Copy link
Copy Markdown
Member

@rhtyd @syed @DaanHoogland moving this to 4.15. Still pending review and fixing conflicting files.

@DaanHoogland DaanHoogland marked this pull request as draft May 7, 2020 08:57
@yadvr yadvr modified the milestones: 4.15.0.0, 4.16.0.0 Jul 30, 2020
@GutoVeronezi
Copy link
Copy Markdown
Contributor

@syed this is an interesting feature; Do you intend to continue managing this PR?

@GabrielBrascher
Copy link
Copy Markdown
Member

I think that this PR is no longer necessary due to PR adding support for IOPS burst #3133.

@nvazquez
Copy link
Copy Markdown
Contributor

Hi @syed can you please confirm if this PR is still needed or can be closed by PR3133? In case it is, is it ready for review?

@syed
Copy link
Copy Markdown
Contributor Author

syed commented Jul 14, 2021

Hi @nvazquez Sorry for the delayed response. #3313 is different from this PR. The idea here is to give the operator the ability to expose storage offerings in the style AWS gp2/gp3 where IOPS scales with size. I currently don't have a setup to work on this but would be happy to support if someone picks it up

@nvazquez
Copy link
Copy Markdown
Contributor

Thanks @syed this will need some effort and resolving many conflicts. Do you think you can pick this up sometime soon? Otherwise we can move it for the next milestone

@syed
Copy link
Copy Markdown
Contributor Author

syed commented Jul 16, 2021 via email

@nvazquez nvazquez modified the milestones: 4.16.0.0, 4.17.0.0, unplanned Jul 17, 2021
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Feb 21, 2022

Hi @syed thank you for your PR, given the inactivity in the last 4+ years, I'm closing this. If you happen to work on this feature and can fix conflicts pl re-open or re-raise the PR.

@yadvr yadvr closed this Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.