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

zone wizard: allow only one untagged physical network with guest traffic type #8625

Merged
merged 4 commits into from
Feb 9, 2024

Conversation

vishesh92
Copy link
Member

@vishesh92 vishesh92 commented Feb 7, 2024

Description

This PR fixes #8279 by allowing to specify tags for physical networks and adding checks to ensure that there can be only one untagged physical network having guest traffic.

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):

image

image

How Has This Been Tested?

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

@vishesh92 vishesh92 changed the base branch from main to 4.18 February 7, 2024 17:45
Copy link

codecov bot commented Feb 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (69e8ebc) 13.16% compared to head (4ac033e) 13.16%.

Additional details and impacted files
@@             Coverage Diff              @@
##               4.18    #8625      +/-   ##
============================================
- Coverage     13.16%   13.16%   -0.01%     
+ Complexity     9200     9199       -1     
============================================
  Files          2724     2724              
  Lines        258101   258101              
  Branches      40228    40228              
============================================
- Hits          33977    33970       -7     
- Misses       219819   219829      +10     
+ Partials       4305     4302       -3     

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

@vishesh92 vishesh92 changed the title Allow at most one guest network with null tag in Zone creation wizard zone wizard: allow only one untagged physical network with guest traffic type Feb 7, 2024
@vishesh92
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

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

@vishesh92 vishesh92 marked this pull request as ready for review February 8, 2024 05:51
@blueorangutan
Copy link

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

@weizhouapache
Copy link
Member

@vishesh92
can we add a new field in the wizard to specify the tag ?
the API supports tags: https://cloudstack.apache.org/api/apidocs-4.19/apis/createPhysicalNetwork.html

for example
image

@vishesh92
Copy link
Member Author

@vishesh92 can we add a new field in the wizard to specify the tag ? the API supports tags: https://cloudstack.apache.org/api/apidocs-4.19/apis/createPhysicalNetwork.html

@weizhouapache I have already added this.

@vishesh92
Copy link
Member Author

@vishesh92 can we add a new field in the wizard to specify the tag ? the API supports tags: https://cloudstack.apache.org/api/apidocs-4.19/apis/createPhysicalNetwork.html

@weizhouapache I have already added this.

Let me add a snapshot for the same.

@weizhouapache
Copy link
Member

@vishesh92 can we add a new field in the wizard to specify the tag ? the API supports tags: https://cloudstack.apache.org/api/apidocs-4.19/apis/createPhysicalNetwork.html

@weizhouapache I have already added this.

Let me add a snapshot for the same.

ok @vishesh92
The screenshot above was actually taken from the UI with your changes (to 4.19 and fix some conflicts).
maybe it is better to create the PR to 4.18. otherwise you have to fix the conflicts and test again when merge forward to 4.19.

@weizhouapache
Copy link
Member

@vishesh92
screenshots looks good.

if the error happens, will the "Fix errors" button appear and go to the step (in the screenshot) if click the button ?

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, needs testing (in a multi physnet env)

@vishesh92
Copy link
Member Author

if the error happens, will the "Fix errors" button appear and go to the step (in the screenshot) if click the button ?

I am not able to reproduce an issue in which it has to return to Physical Network creation page. I didn't make a lot of changes, so it shouldn't break any existing behavior.

@weizhouapache
Copy link
Member

if the error happens, will the "Fix errors" button appear and go to the step (in the screenshot) if click the button ?

I am not able to reproduce an issue in which it has to return to Physical Network creation page. I didn't make a lot of changes, so it shouldn't break any existing behavior.

@vishesh92
create two physical networks (both have Guest traffic) without tags ?

@vishesh92
Copy link
Member Author

@vishesh92 create two physical networks (both have Guest traffic) without tags ?

I have added a validation forcing the user to add tags to physical networks. So, can't reproduce with this scenario.

image

@weizhouapache
Copy link
Member

@vishesh92 create two physical networks (both have Guest traffic) without tags ?

I have added a validation forcing the user to add tags to physical networks. So, can't reproduce with this scenario.

image

good
thanks @vishesh92 for sharing

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

@DaanHoogland DaanHoogland merged commit d8cd122 into apache:4.18 Feb 9, 2024
25 of 27 checks passed
@DaanHoogland DaanHoogland deleted the fixup-8279 branch February 9, 2024 15:31
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Feb 20, 2024
@andrijapanicsb
Copy link
Contributor

andrijapanicsb commented Feb 20, 2024

I don't know if the first part of the message comes from some work from before or not, but the wording is not the best. Trafic labels are completely optional and the wording is wrong:
image

"...each network should have a label" should be "...each traffic type should have a label".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants