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
CLOUDSTACK-9339: Send correct network type to router config #1943
Conversation
@blueorangutan package |
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-488 |
@blueorangutan test |
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Trillian test result (tid-825)
|
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 code review and smoke tests
LGTM based on code review. |
This issue was also handled in this PR: #1821 although that was done on the Python side. This fix on the Java side seems cleaner. Should we keep both fixes? Won't really hurt I'd say. |
I didn't actually find the other PR, otherwise I probably wouldn't have submitted this one. But I do think this is cleaner, and more centralized. There's no real harm in having both, and having this one will be more likely to prevent future problems where someone attempts to send a network type across the wire. |
This forces the network type (nw_type) of the IP address being sent into router configuration scripts to be lowercase. All of the Python config scripts on the router explicitly look for network type "public" with a lowercase P. Sending "Public" with an uppercase P can cause important iptables rules to not be created, meaning that public networking won't work.
ACS CI BVT RunSumarry: Link to logs Folder (search by build_no): https://www.dropbox.com/sh/r2si930m8xxzavs/AAAzNrnoF1fC3auFrvsKo_8-a?dl=0 Failed tests:
Skipped tests: Passed test suits: |
This forces the network type (nw_type) of the IP address being sent into router configuration scripts to be lowercase. All of the Python config scripts on the router explicitly look for network type "public" with a lowercase P. Sending "Public" with an uppercase P can cause important iptables rules to not be created, meaning that public networking won't work.
We discovered this while applying the other fix for CLOUDSTACK-9339 to our own 4.7 branch, and then checked master and saw that it hadn't been changed yet. The fix is very simple: force the network type to lowercase when creating IpAssoc config items. Without this fix, iptables rules for public IPs that are added in
CsAddress.py
would get skipped, and traffic into instances on interfaces other than eth2 would not work.