Skip to content

Conversation

@shwstppr
Copy link
Contributor

@shwstppr shwstppr commented Oct 25, 2023

Description

  • Allows registering direct-download ISOs
  • Allows VM deployment using ISOs in edge zones
  • Allows registering k8s versions as direct-download
  • Enables k8s cluster deployment in edge-zones

Fixes #7284

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)
  • build/CI

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?

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

shwstppr added 4 commits July 8, 2023 13:11
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@weizhouapache
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@weizhouapache 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.

@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

Merging #8142 (af37049) into 4.18 (6ae3b73) will increase coverage by 0.00%.
Report is 3 commits behind head on 4.18.
The diff coverage is 12.06%.

@@            Coverage Diff            @@
##               4.18    #8142   +/-   ##
=========================================
  Coverage     13.07%   13.07%           
  Complexity     9111     9111           
=========================================
  Files          2720     2720           
  Lines        257568   257625   +57     
  Branches      40154    40167   +13     
=========================================
+ Hits          33666    33677   +11     
- Misses       219670   219712   +42     
- Partials       4232     4236    +4     
Files Coverage Δ
...i/response/KubernetesSupportedVersionResponse.java 70.45% <100.00%> (+1.40%) ⬆️
...etes/version/AddKubernetesSupportedVersionCmd.java 4.16% <0.00%> (-0.19%) ⬇️
...va/com/cloud/network/router/NetworkHelperImpl.java 3.67% <0.00%> (-0.01%) ⬇️
.../hypervisor/kvm/storage/KVMStoragePoolManager.java 0.47% <0.00%> (-0.01%) ⬇️
...bernetes/version/KubernetesVersionManagerImpl.java 53.99% <50.00%> (+0.10%) ⬆️
...bernetes/cluster/KubernetesClusterManagerImpl.java 4.37% <0.00%> (-0.03%) ⬇️
...udstack/storage/image/TemplateDataFactoryImpl.java 0.00% <0.00%> (ø)
...ud/hypervisor/kvm/storage/KVMStorageProcessor.java 4.94% <0.00%> (-0.04%) ⬇️

... and 5 files with indirect coverage changes

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@blueorangutan
Copy link

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

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

Copy link
Member

@yadvr yadvr left a comment

Choose a reason for hiding this comment

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

LGTM - didn't test it, @shwstppr pl also look at any smoketests/unit tests changes

@blueorangutan
Copy link

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

Test Result Time (s) Test File
test_08_upgrade_kubernetes_ha_cluster Failure 640.48 test_kubernetes_clusters.py
test_create_pvlan_network Error 0.05 test_pvlan.py
test_hostha_enable_ha_when_host_disabled Error 4.76 test_hostha_kvm.py
test_hostha_enable_ha_when_host_in_maintenance Error 303.91 test_hostha_kvm.py

@shwstppr
Copy link
Contributor Author

@blueorangutan package

@shwstppr shwstppr added this to the 4.18.2.0 milestone Oct 26, 2023
@blueorangutan
Copy link

@shwstppr 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
Copy link

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

@shwstppr
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

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

@github-actions
Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@blueorangutan
Copy link

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

Test Result Time (s) Test File

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

looks mostly good. one potential UI issue.

private Long getOneMatchingPoolIdFromRefs(List<VMTemplateStoragePoolVO> existingRefs, List<StoragePoolVO> pools) {
if (pools.isEmpty()) {
throw new CloudRuntimeException("No storage pools found");
return null;
Copy link
Contributor

Choose a reason for hiding this comment

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

returning null is not a good practice. Can this if (pools.isEmpty()) be handled in the calling methods and an exception be thrown here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Refactored

* Retrieve storage pools with scope = cluster or zone or local matching clusterId or dataCenterId or hostId depending on their scope
*/
private List<StoragePoolVO> getStoragePoolsFromClusterOrZone(Long clusterId, long dataCenterId, Hypervisor.HypervisorType hypervisorType) {
private List<StoragePoolVO> getStoragePoolsFromClusterOrZoneOrLocal(Long clusterId, long dataCenterId, Hypervisor.HypervisorType hypervisorType, long hostId) {
Copy link
Contributor

Choose a reason for hiding this comment

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

naming suggestion

Suggested change
private List<StoragePoolVO> getStoragePoolsFromClusterOrZoneOrLocal(Long clusterId, long dataCenterId, Hypervisor.HypervisorType hypervisorType, long hostId) {
private List<StoragePoolVO> getStoragePoolsForScope(Long clusterId, long dataCenterId, Hypervisor.HypervisorType hypervisorType, long hostId) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@kiranchavala kiranchavala left a comment

Choose a reason for hiding this comment

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

@shwstppr

Can we show direct download section in Images> Kubernetes iso details page

The detail is shown only under Images> ISO's

iso1

The detail is not shown under Images> Kubernetes ISO's

direct download iso 1

Copy link
Contributor

@kiranchavala kiranchavala left a comment

Choose a reason for hiding this comment

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

@shwstppr Cloudstack should not show L2 networks in the, network dropdown create kubernetes cluster form.

Currently its allowing to create k8s cluster in l2 network, its should throw a pop up saying l2 networks are not supported

Screenshot 2023-11-03 at 9 59 25 AM

@shwstppr
Copy link
Contributor Author

shwstppr commented Nov 3, 2023

@kiranchavala will try to make changes for your suggestions along with Daan's review comments. If you're done with testing can you please comment on the functionality part?

@kiranchavala
Copy link
Contributor

@shwstppr Thanks

functionality wise it's working fine , was able to spin up k8s cluster on edge zones and launch vm's from iso

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr
Copy link
Contributor Author

shwstppr commented Nov 7, 2023

@DaanHoogland @kiranchavala I've addressed your comments and feedback

@blueorangutan package

@blueorangutan
Copy link

@shwstppr 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.

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm

@blueorangutan
Copy link

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

@shwstppr
Copy link
Contributor Author

shwstppr commented Nov 7, 2023

@blueorangutan test

@blueorangutan
Copy link

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

@DaanHoogland
Copy link
Contributor

@shwstppr is this ready for review now?

@shwstppr shwstppr marked this pull request as ready for review November 8, 2023 15:11
@shwstppr
Copy link
Contributor Author

shwstppr commented Nov 8, 2023

@DaanHoogland was waiting for the test result but I guess the test result didn't come due to API limit

@DaanHoogland
Copy link
Contributor

DaanHoogland commented Nov 8, 2023

from the backend:

Smoke tests completed. 108 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_06_stop_cpvm Failure 35.29 test_ssvm.py

test failure:
FAIL: Test stop CPVM

Traceback (most recent call last):
File "/marvin/tests/smoke/test_ssvm.py", line 824, in test_06_stop_cpvm
self.test_04_cpvm_internals()
File "/marvin/tests/smoke/test_ssvm.py", line 656, in test_04_cpvm_internals
"Check cloud service is running or not"
File "/usr/local/lib/python3.6/site-packages/marvin/cloudstackTestCase.py", line 94, in assertEqual
super(cloudstackTestCase,self).assertEqual(first,second,msg)
AssertionError: 0 != 1 : b'Check cloud service is running or not'

@shwstppr
Copy link
Contributor Author

shwstppr commented Nov 9, 2023

@kiranchavala Is it okay to merge now? I addressed your comments.

Copy link
Contributor

@kiranchavala kiranchavala left a comment

Choose a reason for hiding this comment

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

LGTM, tested manually and it works

@DaanHoogland DaanHoogland merged commit d0f3233 into apache:4.18 Nov 10, 2023
@DaanHoogland DaanHoogland deleted the cks-version-direct branch November 10, 2023 12:56
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Nov 16, 2023
…pache#8142)

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
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.

6 participants