Skip to content

new (java11) style storage construction#6797

Merged
DaanHoogland merged 1 commit intoapache:4.18from
shapeblue:storageConstructionException
Jul 19, 2023
Merged

new (java11) style storage construction#6797
DaanHoogland merged 1 commit intoapache:4.18from
shapeblue:storageConstructionException

Conversation

@DaanHoogland
Copy link
Contributor

@DaanHoogland DaanHoogland commented Oct 2, 2022

Description

This PR unpates the reflective construction of storage adaptors (initiated by #6794, but it does not solve it)

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?

@codecov
Copy link

codecov bot commented Oct 2, 2022

Codecov Report

Merging #6797 (50d925b) into main (89d9a70) will increase coverage by 0.81%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##               main    #6797      +/-   ##
============================================
+ Coverage     10.33%   11.15%   +0.81%     
- Complexity     6608     7442     +834     
============================================
  Files          2451     2488      +37     
  Lines        242340   258961   +16621     
  Branches      37924    43590    +5666     
============================================
+ Hits          25054    28876    +3822     
- Misses       214200   226567   +12367     
- Partials       3086     3518     +432     
Impacted Files Coverage Δ
.../hypervisor/kvm/storage/KVMStoragePoolManager.java 0.48% <0.00%> (-0.01%) ⬇️
.../cloudstack/api/response/ApiDiscoveryResponse.java 0.00% <0.00%> (-100.00%) ⬇️
.../cloudstack/api/response/ApiParameterResponse.java 0.00% <0.00%> (-100.00%) ⬇️
...e/cloudstack/api/response/ApiResponseResponse.java 0.00% <0.00%> (-80.00%) ⬇️
.../cloudstack/discovery/ApiDiscoveryServiceImpl.java 13.93% <0.00%> (-55.25%) ⬇️
...rce/wrapper/LibvirtResizeVolumeCommandWrapper.java 49.50% <0.00%> (-27.17%) ⬇️
...rc/main/java/com/cloud/storage/StorageManager.java 76.92% <0.00%> (-23.08%) ⬇️
...pper/LibvirtPrepareForMigrationCommandWrapper.java 43.10% <0.00%> (-10.09%) ⬇️
.../cloud/hypervisor/kvm/storage/KVMPhysicalDisk.java 72.58% <0.00%> (-8.67%) ⬇️
...n/java/com/cloud/vm/VirtualMachineProfileImpl.java 31.03% <0.00%> (-6.11%) ⬇️
... and 221 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@DaanHoogland
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

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

try {
this._storageMapper.put(info.storagePoolType().toString(), storageAdaptor.newInstance());
s_logger.info(String.format("adding storage adaptor for %s", storageAdaptor.getName()));
this._storageMapper.put(info.storagePoolType().toString(), storageAdaptor.getDeclaredConstructor().newInstance());
Copy link
Member

Choose a reason for hiding this comment

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

@DaanHoogland pardon my ignorance, what does getDeclaredConstructor do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

getDeclaredConstructor().newInstance() does the same as newInstance() but in a non-deprecated way. I haven´t figured it out yet, but I don´t think this will solve the issue.

@DaanHoogland
Copy link
Contributor Author

this has become stale but the change is in line with java deprecation lines, so changing the title and re-testing.

@DaanHoogland DaanHoogland changed the title proper storage construction new (java11) style storage construction Dec 2, 2022
@DaanHoogland DaanHoogland reopened this Dec 2, 2022
@DaanHoogland DaanHoogland modified the milestones: 4.18.0.0, 4.19.0.0 Dec 13, 2022
@DaanHoogland DaanHoogland marked this pull request as ready for review April 28, 2023 07:25
Copy link
Contributor

@JoaoJandre JoaoJandre left a comment

Choose a reason for hiding this comment

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

CLGTM

@DaanHoogland DaanHoogland changed the base branch from main to 4.18 July 17, 2023 07:26
@DaanHoogland
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6490

@DaanHoogland
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-7103)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 44527 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6797-t7103-kvm-centos7.zip
Smoke tests completed. 107 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_migrate_VM_and_root_volume Error 75.58 test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disks Error 53.35 test_vm_life_cycle.py

@DaanHoogland DaanHoogland merged commit 0aade28 into apache:4.18 Jul 19, 2023
DaanHoogland added a commit that referenced this pull request Jul 19, 2023
* 4.18:
  Storage and volumes statistics tasks for StorPool primary storage (#7404)
  proper storage construction (#6797)
  guarantee MAC uniqueness (#7634)
  server: allow migration of all VMs with local storage on KVM (#7656)
  Add L2 networks to Zones with SG (#7719)
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.

4 participants