cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Fix: Filter out networks without access while getting networks with SG with free IPs

Open vishesh92 opened this issue 1 year ago • 6 comments

Description

This PR filters out networks without access while getting networks with SG with free IPs. Otherwise a VM might deployed in the wrong network.

Types of changes

  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] New feature (non-breaking change which adds functionality)
  • [x] 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
  • [ ] test (unit or integration test code)

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?

vishesh92 avatar Aug 27 '24 16:08 vishesh92

@blueorangutan package

vishesh92 avatar Aug 27 '24 16:08 vishesh92

@vishesh92 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 Aug 27 '24 16:08 blueorangutan

Codecov Report

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

Project coverage is 15.08%. Comparing base (674129c) to head (c3e5bec). Report is 32 commits behind head on 4.19.

Files with missing lines Patch % Lines
.../main/java/com/cloud/network/NetworkModelImpl.java 0.00% 6 Missing :warning:
.../src/main/java/com/cloud/vm/UserVmManagerImpl.java 0.00% 2 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               4.19    #9596      +/-   ##
============================================
- Coverage     15.08%   15.08%   -0.01%     
+ Complexity    11187    11184       -3     
============================================
  Files          5406     5406              
  Lines        473096   473101       +5     
  Branches      60219    61578    +1359     
============================================
- Hits          71383    71377       -6     
- Misses       393771   393778       +7     
- Partials       7942     7946       +4     
Flag Coverage Δ
uitests 4.30% <ø> (ø)
unittests 15.80% <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[bot] avatar Aug 27 '24 16:08 codecov[bot]

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

blueorangutan avatar Aug 27 '24 18:08 blueorangutan

@vishesh92 should it use owner instead of caller ?

weizhouapache avatar Aug 27 '24 19:08 weizhouapache

@vishesh92 should it use owner instead of caller ?

Yes. It should be owner in this case. I have updated the PR.

vishesh92 avatar Aug 28 '24 06:08 vishesh92

@blueorangutan test

rohityadavcloud avatar Sep 04 '24 06:09 rohityadavcloud

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

blueorangutan avatar Sep 04 '24 06:09 blueorangutan

[SF] Trillian test result (tid-11325) Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8 Total time taken: 48403 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9596-t11325-kvm-ol8.zip Smoke tests completed. 133 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 Sep 04 '24 21:09 blueorangutan

Has anybody manually QA this @vishesh92 ?

rohityadavcloud avatar Sep 05 '24 17:09 rohityadavcloud

ping @vishesh92

rohityadavcloud avatar Sep 12 '24 07:09 rohityadavcloud

@rohityadavcloud this PR needs testing.

vishesh92 avatar Sep 12 '24 08:09 vishesh92