cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Extra parameter for UpdateImageStore

Open DaanHoogland opened this issue 1 year ago • 19 comments

Description

This PR partly ...

Fixes: #8391 By allowing operators to update the capacity of image stores

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)
  • [x] Enhancement (improves an existing feature and functionality)
  • [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
  • [ ] build/CI

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • [ ] Major
  • [x] Minor

Bug Severity

  • [ ] BLOCKER
  • [ ] Critical
  • [ ] Major
  • [x] Minor
  • [ ] Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

DaanHoogland avatar Apr 18 '24 14:04 DaanHoogland

@blueorangutan package

DaanHoogland avatar Apr 18 '24 14:04 DaanHoogland

@DaanHoogland a [SL] 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 avatar Apr 18 '24 14:04 blueorangutan

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

blueorangutan avatar Apr 18 '24 15:04 blueorangutan

@blueorangutan test alma9 kvm-alma9

DaanHoogland avatar Apr 19 '24 06:04 DaanHoogland

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

blueorangutan avatar Apr 19 '24 06:04 blueorangutan

Didn't test but LGTM, some remarks:

* Can you also add ability to change the name of the image (secondary) storage?

* Add support of a simple edit form in the UI

sure :D , work underway you don't have to :-1: for that ;)

DaanHoogland avatar Apr 19 '24 06:04 DaanHoogland

[SF] Trillian test result (tid-9911) Environment: kvm-alma9 (x2), Advanced Networking with Mgmt server a9 Total time taken: 47485 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8941-t9911-kvm-alma9.zip Smoke tests completed. 109 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 95.03 test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disks Error 55.09 test_vm_life_cycle.py
test_08_migrate_vm Error 49.29 test_vm_life_cycle.py

blueorangutan avatar Apr 19 '24 20:04 blueorangutan

@blueorangutan package

DaanHoogland avatar Apr 24 '24 13:04 DaanHoogland

@DaanHoogland a [SL] 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 avatar Apr 24 '24 13:04 blueorangutan

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

blueorangutan avatar Apr 24 '24 14:04 blueorangutan

[SF] Trillian Build Failed (tid-9987)

blueorangutan avatar Apr 24 '24 14:04 blueorangutan

[SF] Trillian Build Failed (tid-9999)

blueorangutan avatar Apr 24 '24 20:04 blueorangutan

@blueorangutan package

DaanHoogland avatar Apr 30 '24 08:04 DaanHoogland

@DaanHoogland a [SL] 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 avatar Apr 30 '24 08:04 blueorangutan

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

blueorangutan avatar Apr 30 '24 09:04 blueorangutan

[SF] Trillian test result (tid-10086) Environment: kvm-alma9 (x2), Advanced Networking with Mgmt server a9 Total time taken: 46853 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8941-t10086-kvm-alma9.zip Smoke tests completed. 109 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 101.23 test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disks Error 53.20 test_vm_life_cycle.py
test_08_migrate_vm Error 0.08 test_vm_life_cycle.py

blueorangutan avatar Apr 30 '24 22:04 blueorangutan

Codecov Report

Attention: Patch coverage is 0% with 32 lines in your changes are missing coverage. Please review.

Project coverage is 12.23%. Comparing base (c791c13) to head (aec3000).

Files Patch % Lines
...ain/java/com/cloud/storage/StorageManagerImpl.java 0.00% 13 Missing :warning:
...src/main/java/com/cloud/server/StatsCollector.java 0.00% 11 Missing :warning:
...api/command/admin/storage/UpdateImageStoreCmd.java 0.00% 7 Missing :warning:
...ain/java/com/cloud/api/query/QueryManagerImpl.java 0.00% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               4.18    #8941      +/-   ##
============================================
- Coverage     12.24%   12.23%   -0.01%     
  Complexity     9291     9291              
============================================
  Files          4698     4698              
  Lines        414259   414285      +26     
  Branches      51107    52327    +1220     
============================================
- Hits          50709    50707       -2     
- Misses       357248   357277      +29     
+ Partials       6302     6301       -1     
Flag Coverage Δ
unittests 12.23% <0.00%> (-0.01%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar May 07 '24 11:05 codecov-commenter

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

blueorangutan avatar May 07 '24 12:05 blueorangutan

[SF] Trillian test result (tid-10183) Environment: kvm-alma9 (x2), Advanced Networking with Mgmt server a9 Total time taken: 45348 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8941-t10183-kvm-alma9.zip Smoke tests completed. 109 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 100.06 test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disks Error 54.16 test_vm_life_cycle.py
test_08_migrate_vm Error 50.58 test_vm_life_cycle.py

blueorangutan avatar May 08 '24 01:05 blueorangutan

@blueorangutan package

DaanHoogland avatar May 22 '24 10:05 DaanHoogland

@DaanHoogland a [SL] 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 avatar May 22 '24 10:05 blueorangutan

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

blueorangutan avatar May 22 '24 11:05 blueorangutan

@blueorangutan test

DaanHoogland avatar May 22 '24 12:05 DaanHoogland

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

blueorangutan avatar May 22 '24 12:05 blueorangutan

[SF] Trillian Build Failed (tid-10255)

blueorangutan avatar May 22 '24 21:05 blueorangutan

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

Test Result Time (s) Test File

blueorangutan avatar May 23 '24 20:05 blueorangutan

@andrijapanicsb , can you test this to see if this satisfies your request in #8391 ?

DaanHoogland avatar Jun 05 '24 13:06 DaanHoogland

@DaanHoogland can you point the PR to 4.19

kiranchavala avatar Jun 12 '24 05:06 kiranchavala

@DaanHoogland can you point the PR to 4.19

I could but it applies to 4.18 as well.

DaanHoogland avatar Jun 12 '24 10:06 DaanHoogland

@DaanHoogland

As discussed, the issue #8391 needs more functional description.

During testing of the PR, I found that we are not updating the "op_host_capacity" table of capacity type 6

https://cloudstack.apache.org/api/apidocs-4.19/apis/listCapacity.html

Also the API call "update imagestore" doesn't update the disksizetotal and disksizeused

update imagestore capacitybytes=4395899027457 id=01357148-64a7-49f6-8f60-9f04718309ed
{
  "imagestore": {
    "disksizetotal": 2197949513728,
    "disksizeused": 1300025573376,
    "hasannotations": false,
    "id": "01357148-64a7-49f6-8f60-9f04718309ed",
    "name": "nfs://10.0.32.4/acs/secondary/ref-trl-6809-k-Mr8-kiran-chavala/ref-trl-6809-k-Mr8-kiran-chavala-sec1",
    "protocol": "nfs",
    "providername": "NFS",
    "readonly": false,
    "scope": "ZONE",
    "url": "nfs://10.0.32.4/acs/secondary/ref-trl-6809-k-Mr8-kiran-chavala/ref-trl-6809-k-Mr8-kiran-chavala-sec1",
    "zoneid": "76afe9f4-8860-4e0d-bf68-d973637f59c2",
    "zonename": "ref-trl-6809-k-Mr8-kiran-chavala"
  }
}

cc @andrijapanicsb

kiranchavala avatar Jun 12 '24 10:06 kiranchavala