Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow creation of Shared Networks without IP range if network offering has no services - specifyvlan = true #10168

Merged
merged 5 commits into from
Jan 31, 2025

Conversation

Pearl1594
Copy link
Contributor

Description

Fixes: #10114
This PR adds necessary check for IP range for shared Networks.

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
  • 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?

@DaanHoogland
Copy link
Contributor

@Pearl1594 in the expected result in #10114 it says

VM should get successfully deployed with ACS automatically allocating a VLAN

So that is not true? instead it is

VM deployment should fail with an appropriate error message

?

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.

code looks good if we accept that deployment fails.

@Pearl1594
Copy link
Contributor Author

@Pearl1594 in the expected result in #10114 it says

VM should get successfully deployed with ACS automatically allocating a VLAN

So that is not true? instead it is

VM deployment should fail with an appropriate error message

?

Initially when I reported the issue, I thought the issue was with specifyVlan - as broadcast URI ends up being null. However, on further investigation the reason for it was IP address not being passed. With missing inputs it's not possible to have a successful deployment.
I will change the issue description.

Copy link

codecov bot commented Jan 8, 2025

Codecov Report

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

Project coverage is 15.14%. Comparing base (f652ad0) to head (665283a).
Report is 16 commits behind head on 4.19.

Files with missing lines Patch % Lines
...ain/java/com/cloud/network/NetworkServiceImpl.java 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.19   #10168   +/-   ##
=========================================
  Coverage     15.14%   15.14%           
- Complexity    11282    11283    +1     
=========================================
  Files          5408     5408           
  Lines        473823   473825    +2     
  Branches      57826    57827    +1     
=========================================
+ Hits          71763    71764    +1     
  Misses       394038   394038           
- Partials       8022     8023    +1     
Flag Coverage Δ
uitests 4.29% <ø> (ø)
unittests 15.86% <0.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DaanHoogland DaanHoogland added this to the 4.19.2 milestone Jan 9, 2025
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

@DaanHoogland
Copy link
Contributor

@Pearl1594 can you update on this?

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

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

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

@DaanHoogland
Copy link
Contributor

@bernardodemarco @weizhouapache are your questions addressed to satisfaction?

@blueorangutan
Copy link

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

Copy link
Collaborator

@bernardodemarco bernardodemarco 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
Copy link
Contributor

@blueorangutan test keepEnv

@blueorangutan
Copy link

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

@Pearl1594
Copy link
Contributor Author

Pearl1594 commented Jan 28, 2025

I think this PR needs some more work, as there is a case that when we do not have any services provided by the network offering used by the shared network, it essentially behaves like an L2 network; hence there shouldn't be a need to specify IP range. However, when an IP range isn't specified, the nic is created with no broadcast_uri, which eventually results in an NPE on the agent side. Would need some investigation. cc @DaanHoogland @weizhouapache @sureshanaparti
We may want to move this to 4.20.1

@Pearl1594 Pearl1594 marked this pull request as draft January 28, 2025 12:48
@Pearl1594 Pearl1594 changed the title Add checks if IP range is passed if Shared Network Allow creation of Shared Networks without IP range if network offering has no services - specifyvlan = true Jan 28, 2025
@Pearl1594 Pearl1594 marked this pull request as ready for review January 28, 2025 13:45
Copy link
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

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

code lgtm

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

@blueorangutan
Copy link

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

@weizhouapache
Copy link
Member

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Test Result Time (s) Test File
test_02_list_cpvm_vm Failure 0.05 test_ssvm.py
test_04_cpvm_internals Failure 0.05 test_ssvm.py
test_01_secure_vm_migration Error 134.38 test_vm_life_cycle.py
test_01_secure_vm_migration Error 134.38 test_vm_life_cycle.py

@blueorangutan
Copy link

[SF] Trillian test result (tid-12213)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 45032 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10168-t12213-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=TestClusterDRS>:setup Error 0.00 test_cluster_drs.py

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

@DaanHoogland
Copy link
Contributor

DaanHoogland commented Jan 31, 2025

the proper error message is returned (tested in a lab env)

@DaanHoogland DaanHoogland merged commit 5447950 into 4.19 Jan 31, 2025
48 of 50 checks passed
@DaanHoogland DaanHoogland deleted the add-ip-range-checks-sharednet branch January 31, 2025 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants