-
Notifications
You must be signed in to change notification settings - Fork 1.2k
server: check startip and startipv6 of shared network #10704
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
server: check startip and startipv6 of shared network #10704
Conversation
@blueorangutan package |
@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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.19 #10704 +/- ##
=========================================
Coverage 15.16% 15.16%
- Complexity 11327 11329 +2
=========================================
Files 5415 5415
Lines 474848 474853 +5
Branches 57914 57917 +3
=========================================
+ Hits 72018 72024 +6
+ Misses 394781 394779 -2
- Partials 8049 8050 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 13043 |
…etwork revert part of apache#10168
e178089
to
9c78d22
Compare
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13044 |
@weizhouapache , #10114 seems to be unable to occur with these checkjs in place: |
Can you test with a new shared network offering with specifyvlan=false and specifyiprange=false ? ignore it , it is not supported |
if (!ntwkOff.isSpecifyIpRanges()) { | ||
throw new CloudRuntimeException("The 'specifyipranges' parameter should be true for Shared Networks"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is already a check when create the network offering
cloudstack/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
Lines 6720 to 6730 in b2b2218
if (specifyIpRanges) { | |
if (type == GuestType.Isolated) { | |
if (serviceProviderMap.containsKey(Service.SourceNat)) { | |
throw new InvalidParameterValueException("SpecifyIpRanges can only be true for Shared network offerings and Isolated with no SourceNat service"); | |
} | |
} | |
} else { | |
if (type == GuestType.Shared) { | |
throw new InvalidParameterValueException("SpecifyIpRanges should always be true for Shared network offerings"); | |
} | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, leaving it in in case someone hacks the DB.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[SF] Trillian test result (tid-12995)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM based on manual testing.
if (ipv6 && Objects.isNull(startIPv6)) { | ||
throw new CloudRuntimeException("IPv6 address range needs to be provided"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wido , we merged this and then came to the conclusion this may interfere with SLAAC setups. Can you comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In shared networks you will never use a start and endip as SLAAC does the work. So these variables will never be used.
The subnet needs to be provided, a /64 and that's it. People can fill in dummy information here, it will not do anything and not break anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, so in spite of this workaround (no high priority) we don’ t even need the UI elements for ipv6 , you are saying @wido ? (cc @weizhouapache )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I think we do not need the start ipv6 and end ipv6 for shared networks on UI
the UI change is low priority,
the check on startipv6 in java should be removed soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see #10746
Description
This PR...
Fixes: #10664
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?