Uh oh!
There was an error while loading. Please reload this page.
vpc: set traffic type of private gateway IP to Public to fix keepalived misconfiguration - #3851
Conversation
…ed misconfiguration
DaanHoogland
commented
Jan 30, 2020
code lgtm, I do not oversee the logic from an operations point of view. I think extensive test is needed for this one. |
| private TrafficType getNetworkTrafficType(Network network) { | ||
| final VpcGatewayVO gateway = _vpcGatewayDao.getVpcGatewayByNetworkId(network.getId()); | ||
| if (gateway != null) { | ||
| s_logger.debug("network " + network.getId() + " is a vpc private gateway, set traffic type to Public"); |
There was a problem hiding this comment.
@ustcweizhou what do you think of adding also the network name? Sometimes it annoys me to see a lot of IDs on the log and then go after a few selects to understand what is really going on.
Having the network ID and name would be great for debugging :-)
There was a problem hiding this comment.
@GabrielBrascher added a new commit per your comment.
weizhouapache
commented
Jan 30, 2020
@DaanHoogland the network type is intended to changed to public in commit however, it does not work, for unknown reasons.
definitely no. The network corresponding to a private gateway is "Guest" network in database.
|
DaanHoogland
commented
Jan 31, 2020
...
meaning if a vpd on the pg fails we don't care?
Ok, I get that part, and than shouldn't we mark it public in the DB, or give it its own type? The idea of treating it as guest internally and as public on the VR somehow doesn't feel right. This is by no means a disqualification of your fix, but a question about the design. Maybe, in the future we can implement a more permanent design?? |
weizhouapache
commented
Jan 31, 2020
@DaanHoogland the private gateway IP is configured in our VRs (Up in master VR and Down in backup VR). The gateway of private gateway is not configured in our VRs, it might be configured on some switches (of cloudstack platform or other platforms), similar as gateway of public IPs.
@DaanHoogland ideally there is a network type (eg PrivateGateway) defined for private gateway. |
DaanHoogland
commented
Jan 31, 2020
@blueorangutan test |
blueorangutan
commented
Jan 31, 2020
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Jan 31, 2020
Trillian test result (tid-867)
|
weizhouapache
commented
Feb 3, 2020
@DaanHoogland @rhtyd the failed tests seem not to be related to this PR. |
yadvr
commented
Feb 3, 2020
Let me rekick against vmware |
blueorangutan
commented
Feb 3, 2020
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Feb 3, 2020
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-738 |
DaanHoogland
commented
Feb 3, 2020
Any particular versions you are interested in @rhtyd ? or just |
blueorangutan
commented
Feb 3, 2020
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + vmware-65u2) has been kicked to run smoke tests |
blueorangutan
commented
Feb 3, 2020
Trillian test result (tid-879)
|
GabrielBrascher
left a comment
There was a problem hiding this comment.
Thanks for the updates @ustcweizhou, code LGTM.
yadvr
commented
Feb 6, 2020
@DaanHoogland@andrijapanicsb we'll need some manual testing to confirm the fix. |
blueorangutan
commented
Feb 6, 2020
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
yadvr
left a comment
There was a problem hiding this comment.
LGTM, did not test it though. Does it require any changes in VR code?
yadvr
commented
Feb 6, 2020
@ustcweizhou@weizhouapache cc @DaanHoogland@andrijapanicsb - for reference there was an old fix which basically introduced a new network type for private gateway, please refer https://github.com/apache/cloudstack/pull/2128/files |
blueorangutan
commented
Feb 6, 2020
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-762 |
yadvr
commented
Feb 6, 2020
@blueorangutan test |
blueorangutan
commented
Feb 6, 2020
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
weizhouapache
commented
Feb 6, 2020
@rhtyd I have read it before. Apparently it is not a full implementation. Many more changes in java code and python code for virtual router are needed |
weizhouapache
commented
Feb 6, 2020
no, the private gateway will be handled as a public ip in virtual router. |
blueorangutan
commented
Feb 7, 2020
Trillian test result (tid-907)
|
Description
In VPC, the private gateway has traffic type as Guest not Public.
This leads to keepalived misconfiguration in VPC with redundant VRs.
There are some commits (eg 65cb222 and f4f9b3a) for this issue, however the issue still exists in 4.13 and 4.14.
Simply setting the traffic type of ip address (of private gateway) to Public fixes the issue.
Fixes: #3402
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?
Before change,
In VPC master VR (redundant), IP of private gateway is added in keepalived, and gateway of private gateway is also added to ethX which is obviously wrong.
nw_type of ethX is 'guest' in /etc/cloudstack/ips.json
After change, private gateway IP is not added in keepalived, gateway is not added to ethX.
nw_type of ethX is 'public' in /etc/cloudstack/ips.json