Skip to content

Decouple service (compute) offering and disk offering - #5008

Merged
yadvr merged 80 commits into
mainfrom
decoupleServiceOfferingDiskOffering
Jan 27, 2022
Merged

Decouple service (compute) offering and disk offering#5008
yadvr merged 80 commits into
mainfrom
decoupleServiceOfferingDiskOffering

Conversation

@harikrishna-patnala

@harikrishna-patnalaharikrishna-patnala commented May 10, 2021

Copy link
Copy Markdown
Member

Description

Currently, our compute offerings and disk offerings are tightly coupled with respect to many aspects. For example, if a compute offering is created, a corresponding disk offering entry is also created with the same ID as the reference. Also creating compute offering takes few disk-related parameters which anyway goes to the corresponding disk offering only. I think this design was initially made to address compute offering for the root volume created from a template. Also changing the offering of a volume is tightly coupled with storage tags and has to be done in different APIs either migrateVolume or resizeVolume. Changing of disk offering should be seamless and should consider new storage tags, new size and place the volume in appropriate state as defined in disk offering.

more details are mentioned here https://cwiki.apache.org/confluence/display/CLOUDSTACK/Compute+offering+and+disk+offering+refactoring

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)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

@harikrishna-patnala
harikrishna-patnalaforce-pushed the decoupleServiceOfferingDiskOffering branch from 3453738 to 296a507CompareMay 10, 2021 11:39
@yadvryadvr added this to the 4.16.0.0 milestone May 10, 2021
@harikrishna-patnala

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@harikrishna-patnala a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 574

Comment threadengine/schema/src/main/java/com/cloud/service/ServiceOfferingVO.java Outdated
Comment threadengine/schema/src/main/java/com/cloud/service/ServiceOfferingVO.java Outdated
UniqueNameSearch = createSearchBuilder();
UniqueNameSearch.and("name", UniqueNameSearch.entity().getUniqueName(), SearchCriteria.Op.EQ);
UniqueNameSearch.and("system", UniqueNameSearch.entity().isSystemUse(), SearchCriteria.Op.EQ);
UniqueNameSearch.and("system_use", UniqueNameSearch.entity().isSystemUse(), SearchCriteria.Op.EQ);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As it will be used more times in this class, could it be extracted to a variable?

Comment threadserver/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java Outdated
Comment threadserver/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java Outdated
Comment threadserver/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java Outdated
Comment threadserver/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java Outdated
@harikrishna-patnala
harikrishna-patnalaforce-pushed the decoupleServiceOfferingDiskOffering branch 2 times, most recently from 1b05122 to dd9dcd7CompareJune 18, 2021 05:09
@harikrishna-patnala

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@harikrishna-patnala a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 281

@harikrishna-patnala

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@harikrishna-patnala a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@apacheapache deleted a comment from blueorangutanJun 20, 2021
@apacheapache deleted a comment from blueorangutanJun 20, 2021
@apacheapache deleted a comment from blueorangutanJun 20, 2021
@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 305

@harikrishna-patnala

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test matrix

@blueorangutan

Copy link
Copy Markdown

@harikrishna-patnala a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-1020)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 48456 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5008-t1020-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_accounts.py
Intermittent failure detected: /marvin/tests/smoke/test_domain_service_offerings.py
Intermittent failure detected: /marvin/tests/smoke/test_internal_lb.py
Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermittent failure detected: /marvin/tests/smoke/test_routers_network_ops.py
Intermittent failure detected: /marvin/tests/smoke/test_volumes.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Smoke tests completed. 80 look OK, 8 have error(s)
Only failed tests results shown below:

TestResultTime (s)Test File
test_01_service_offering_hierarchyFailure0.02test_accounts.py
test_01_service_offering_siblingsFailure0.02test_accounts.py
test_01_create_domain_service_offeringError0.08test_domain_service_offerings.py
test_02_edit_domain_service_offeringError0.06test_domain_service_offerings.py
test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80Failure496.71test_internal_lb.py
test_03_vpc_privategw_restart_vpc_cleanupFailure369.17test_privategw_acl.py
test_01_RVR_Network_FW_PF_SSH_default_routes_egress_trueFailure340.16test_routers_network_ops.py
test_02_RVR_Network_FW_PF_SSH_default_routes_egress_falseFailure337.95test_routers_network_ops.py
test_07_resize_failFailure122.81test_volumes.py
test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACLFailure532.97test_vpc_redundant.py
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routersFailure545.35test_vpc_redundant.py
test_05_rvpc_multi_tiersFailure486.30test_vpc_redundant.py
test_05_rvpc_multi_tiersError486.31test_vpc_redundant.py
test_01_vpc_site2site_vpn_multiple_optionsFailure462.84test_vpc_vpn.py

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-1019)
Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
Total time taken: 50472 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5008-t1019-xenserver-71.zip
Intermittent failure detected: /marvin/tests/smoke/test_accounts.py
Intermittent failure detected: /marvin/tests/smoke/test_domain_service_offerings.py
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermittent failure detected: /marvin/tests/smoke/test_routers_network_ops.py
Intermittent failure detected: /marvin/tests/smoke/test_ssvm.py
Intermittent failure detected: /marvin/tests/smoke/test_volumes.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_router_nics.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Intermittent failure detected: /marvin/tests/smoke/test_host_maintenance.py
Smoke tests completed. 83 look OK, 5 have error(s)
Only failed tests results shown below:

TestResultTime (s)Test File
test_01_service_offering_hierarchyFailure0.02test_accounts.py
test_01_service_offering_siblingsFailure0.02test_accounts.py
test_01_create_domain_service_offeringError0.08test_domain_service_offerings.py
test_02_edit_domain_service_offeringError0.06test_domain_service_offerings.py
test_01_RVR_Network_FW_PF_SSH_default_routes_egress_trueError39.91test_routers_network_ops.py
test_02_RVR_Network_FW_PF_SSH_default_routes_egress_falseFailure362.68test_routers_network_ops.py
test_07_resize_failFailure677.33test_volumes.py
test_07_resize_failError677.33test_volumes.py
test_08_resize_volumeError1.07test_volumes.py
test_10_list_volumesFailure373.21test_volumes.py
test_11_attach_volume_with_unstarted_vmError2.19test_volumes.py
ContextSuite context=TestVolumes>:teardownError15.61test_volumes.py
test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACLFailure650.79test_vpc_redundant.py
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routersFailure681.79test_vpc_redundant.py
test_04_rvpc_network_garbage_collector_nicsFailure406.85test_vpc_redundant.py
test_05_rvpc_multi_tiersFailure574.85test_vpc_redundant.py
test_05_rvpc_multi_tiersError574.87test_vpc_redundant.py

@sureshanapartisureshanaparti changed the title Decouple service offering disk offeringDecouple service (compute) offering and disk offeringJun 21, 2021
ProvisioningType provisioningType, boolean localStorageRequired, boolean offerHA, String tags) {
tags = cleanupTags(tags);
DiskOfferingVO diskOfferingVO = new DiskOfferingVO(name, displayText, provisioningType, false, tags, false, false, false, true);
diskOfferingVO.setUniqueName("Cloud.Com-" + name);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this prefix "Cloud.Com-" required or offerings ?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Here we are splitting the service offering and disk offering, so using the same name for both offerings.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Post upgrade, the existing service offerings and related disk offerings have the same name. While creating a new service offering, this prefix may not be required. what do you think?

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.

Is this just for default offerings?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Yes @rhtyd

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-1021)
Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7
Total time taken: 70477 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5008-t1021-vmware-65u2.zip
Intermittent failure detected: /marvin/tests/smoke/test_accounts.py
Intermittent failure detected: /marvin/tests/smoke/test_domain_service_offerings.py
Intermittent failure detected: /marvin/tests/smoke/test_nic.py
Intermittent failure detected: /marvin/tests/smoke/test_reset_vm_on_reboot.py
Intermittent failure detected: /marvin/tests/smoke/test_resource_accounting.py
Intermittent failure detected: /marvin/tests/smoke/test_router_dhcphosts.py
Intermittent failure detected: /marvin/tests/smoke/test_router_dnsservice.py
Intermittent failure detected: /marvin/tests/smoke/test_routers_iptables_default_policy.py
Intermittent failure detected: /marvin/tests/smoke/test_routers_network_ops.py
Intermittent failure detected: /marvin/tests/smoke/test_routers.py
Intermittent failure detected: /marvin/tests/smoke/test_service_offerings.py
Intermittent failure detected: /marvin/tests/smoke/test_snapshots.py
Intermittent failure detected: /marvin/tests/smoke/test_storage_policy.py
Intermittent failure detected: /marvin/tests/smoke/test_vm_deployment_planner.py
Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Intermittent failure detected: /marvin/tests/smoke/test_volumes.py
Smoke tests completed. 75 look OK, 13 have error(s)
Only failed tests results shown below:

TestResultTime (s)Test File
test_01_service_offering_hierarchyFailure0.02test_accounts.py
test_01_service_offering_siblingsFailure0.02test_accounts.py
test_01_create_domain_service_offeringError0.07test_domain_service_offerings.py
test_02_edit_domain_service_offeringError0.05test_domain_service_offerings.py
ContextSuite context=TestResetVmOnReboot>:setupError0.00test_reset_vm_on_reboot.py
ContextSuite context=TestRAMCPUResourceAccounting>:setupError0.00test_resource_accounting.py
ContextSuite context=TestRouterDHCPHosts>:setupError0.00test_router_dhcphosts.py
ContextSuite context=TestRouterDHCPOpts>:setupError0.00test_router_dhcphosts.py
ContextSuite context=TestRouterDnsService>:setupError0.00test_router_dnsservice.py
ContextSuite context=TestRouterIpTablesPolicies>:setupError0.00test_routers_iptables_default_policy.py
ContextSuite context=TestVPCIpTablesPolicies>:setupError0.00test_routers_iptables_default_policy.py
ContextSuite context=TestIsolatedNetworks>:setupError0.00test_routers_network_ops.py
ContextSuite context=TestRedundantIsolateNetworks>:setupError0.00test_routers_network_ops.py
ContextSuite context=TestRouterServices>:setupError0.00test_routers.py
ContextSuite context=TestServiceOfferings>:setupError1518.34test_service_offerings.py
ContextSuite context=TestSnapshotRootDisk>:setupError0.00test_snapshots.py
test_01_migrate_VM_and_root_volumeError124.27test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disksError109.40test_vm_life_cycle.py
test_01_vapps_vm_cycleError0.21test_vm_life_cycle.py
test_02_attach_volumeFailure1624.56test_volumes.py
test_02_attach_volumeError1624.58test_volumes.py
test_03_download_attached_volumeError1.06test_volumes.py
test_04_delete_attached_volumeError0.04test_volumes.py
test_05_detach_volumeError0.05test_volumes.py
test_06_download_detached_volumeError1.06test_volumes.py
test_07_resize_failError2.17test_volumes.py
test_08_resize_volumeError1.06test_volumes.py
test_11_attach_volume_with_unstarted_vmError2.54test_volumes.py
ContextSuite context=TestVolumes>:teardownError19.66test_volumes.py

@GabrielBrascherGabrielBrascher left a comment

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.

@harikrishna-patnala can you please provide more details on this PR goal?
The PR's description does not help at all:

Description

This PR...

Types of changes

PS: I understand that this PR is a Draft. If you plan to enhance the PR description before making it ready-to-review please ignore my comment.

@DaanHooglandDaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks promising @harikrishna-patnala , thanks for picking this up.
You know I'm going to ask you to factor out the bits that you touched when done, right ? ;)

@harikrishna-patnala
harikrishna-patnalaforce-pushed the decoupleServiceOfferingDiskOffering branch from 1bccb83 to c16321fCompareJanuary 25, 2022 03:54
@harikrishna-patnala

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@harikrishna-patnala a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2294

@harikrishna-patnala
harikrishna-patnala marked this pull request as ready for review January 25, 2022 07:16
@harikrishna-patnala

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test

@apacheapache deleted a comment from blueorangutanJan 26, 2022
@blueorangutan

Copy link
Copy Markdown

@harikrishna-patnala a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-3016)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 33163 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5008-t3016-kvm-centos7.zip
Smoke tests completed. 92 look OK, 0 have errors
Only failed tests results shown below:

TestResultTime (s)Test File

@borisstoyanovborisstoyanov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@harikrishna-patnala does this requires any additional testing after fixing the merge conflicts?

@harikrishna-patnala

Copy link
Copy Markdown
MemberAuthor

@borisstoyanov those are very minor conflicts with resizeVolume UI form (only one line), which I've already verified after rebasing. I don't think additional testing is required. Thanks for asking.

@borisstoyanov

Copy link
Copy Markdown
Contributor

ok great!

@yadvr

Copy link
Copy Markdown
Member

Last round of smoketests LGTM

Sign up for freeto 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.

Cannot resize a volume with different tags, therefore cannot migrate it to different storage pools

10 participants

@harikrishna-patnala@blueorangutan@nvazquez@yadvr@sureshanaparti@borisstoyanov@NuxRo@DaanHoogland@GabrielBrascher@GutoVeronezi