cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Add validation for secstorage.allowed.internal.sites

Open vishesh92 opened this issue 1 year ago • 10 comments

Description

This PR fixes #9530 by adding validation on update of secstorage.allowed.internal.sites to allow only valid CIDRs. This PR also enables logging of WARN messages for the existing wrong configurations.

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
  • [ ] test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • [ ] Major
  • [x] 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 22 '24 07:08 vishesh92

Codecov Report

Attention: Patch coverage is 42.10526% with 11 lines in your changes missing coverage. Please review.

Project coverage is 15.08%. Comparing base (1a403f1) to head (4ba14ef). Report is 15 commits behind head on 4.19.

Files with missing lines Patch % Lines
.../cloud/configuration/ConfigurationManagerImpl.java 0.00% 6 Missing and 1 partial :warning:
.../secondarystorage/SecondaryStorageManagerImpl.java 0.00% 2 Missing :warning:
...ls/src/main/java/com/cloud/utils/net/NetUtils.java 80.00% 1 Missing and 1 partial :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##               4.19    #9567    +/-   ##
==========================================
  Coverage     15.08%   15.08%            
- Complexity    11181    11186     +5     
==========================================
  Files          5406     5406            
  Lines        472915   472935    +20     
  Branches      58400    57960   -440     
==========================================
+ Hits          71336    71356    +20     
+ Misses       393637   393633     -4     
- Partials       7942     7946     +4     
Flag Coverage Δ
uitests 4.30% <ø> (-0.01%) :arrow_down:
unittests 15.80% <42.10%> (+<0.01%) :arrow_up:

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 22 '24 07:08 codecov[bot]

@blueorangutan package

vishesh92 avatar Aug 22 '24 10: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 22 '24 10:08 blueorangutan

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

blueorangutan avatar Aug 22 '24 11:08 blueorangutan

@blueorangutan package

vishesh92 avatar Aug 23 '24 06: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 23 '24 06:08 blueorangutan

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

blueorangutan avatar Aug 23 '24 07:08 blueorangutan

@blueorangutan test

DaanHoogland avatar Aug 26 '24 06:08 DaanHoogland

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

blueorangutan avatar Aug 26 '24 07:08 blueorangutan

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

Test Result Time (s) Test File
ContextSuite context=TestDeployVM>:setup Error 0.00 test_vm_life_cycle.py

blueorangutan avatar Aug 26 '24 22:08 blueorangutan