{"action":"created","issue":{"url":"https://api.github.com/repos/apache/cloudstack/issues/2681","repository_url":"https://api.github.com/repos/apache/cloudstack","labels_url":"https://api.github.com/repos/apache/cloudstack/issues/2681/labels{/name}","comments_url":"https://api.github.com/repos/apache/cloudstack/issues/2681/comments","events_url":"https://api.github.com/repos/apache/cloudstack/issues/2681/events","html_url":"https://github.com/apache/cloudstack/pull/2681","id":327496988,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxMjc3MzEw","number":2681,"title":"Source NAT option on Private Gateway","user":{"login":"Slair1","id":17735593,"node_id":"MDQ6VXNlcjE3NzM1NTkz","avatar_url":"https://avatars3.githubusercontent.com/u/17735593?v=4","gravatar_id":"","url":"https://api.github.com/users/Slair1","html_url":"https://github.com/Slair1","followers_url":"https://api.github.com/users/Slair1/followers","following_url":"https://api.github.com/users/Slair1/following{/other_user}","gists_url":"https://api.github.com/users/Slair1/gists{/gist_id}","starred_url":"https://api.github.com/users/Slair1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slair1/subscriptions","organizations_url":"https://api.github.com/users/Slair1/orgs","repos_url":"https://api.github.com/users/Slair1/repos","events_url":"https://api.github.com/users/Slair1/events{/privacy}","received_events_url":"https://api.github.com/users/Slair1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/apache/cloudstack/milestones/5","html_url":"https://github.com/apache/cloudstack/milestone/5","labels_url":"https://api.github.com/repos/apache/cloudstack/milestones/5/labels","id":3033298,"node_id":"MDk6TWlsZXN0b25lMzAzMzI5OA==","number":5,"title":"4.11.1.0","description":"Milestone covering PRs for the next 4.11.1.0 release. All PRs using this milestone should send PR against the 4.11 branch.","creator":{"login":"DaanHoogland","id":2486961,"node_id":"MDQ6VXNlcjI0ODY5NjE=","avatar_url":"https://avatars1.githubusercontent.com/u/2486961?v=4","gravatar_id":"","url":"https://api.github.com/users/DaanHoogland","html_url":"https://github.com/DaanHoogland","followers_url":"https://api.github.com/users/DaanHoogland/followers","following_url":"https://api.github.com/users/DaanHoogland/following{/other_user}","gists_url":"https://api.github.com/users/DaanHoogland/gists{/gist_id}","starred_url":"https://api.github.com/users/DaanHoogland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaanHoogland/subscriptions","organizations_url":"https://api.github.com/users/DaanHoogland/orgs","repos_url":"https://api.github.com/users/DaanHoogland/repos","events_url":"https://api.github.com/users/DaanHoogland/events{/privacy}","received_events_url":"https://api.github.com/users/DaanHoogland/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":134,"state":"open","created_at":"2018-01-13T20:06:17Z","updated_at":"2018-06-11T13:53:39Z","due_on":null,"closed_at":null},"comments":33,"created_at":"2018-05-29T21:38:08Z","updated_at":"2018-06-11T23:23:19Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apache/cloudstack/pulls/2681","html_url":"https://github.com/apache/cloudstack/pull/2681","diff_url":"https://github.com/apache/cloudstack/pull/2681.diff","patch_url":"https://github.com/apache/cloudstack/pull/2681.patch"},"body":"Using Source NAT option on Private Gateway does not work\r\nThis fixes #2680 \r\n\r\n## Description\r\n<!--- Describe your changes in detail -->\r\nWhen you use the Source NAT feature of Private Gateways on a VPC.  This should Source NAT all traffic from CloudStack VMs going towards IPs reachable through Private Gateways.\r\n\r\nThis change in this PR, stops adding the Source CIDR to SNAT rules.  This should be discussed/reviewed, but i can see no reason why the Source CIDR is needed.  There can only be one SNAT IP per interface, except for Static (one-to-one) NATs, which still work with this change in place.  The outbound interface is what matters in the rule.\r\n\r\n<!-- For new features, provide link to FS, dev ML discussion etc. -->\r\n<!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->\r\n##### SUMMARY\r\n<!-- Explain the problem/feature briefly -->\r\nThere is a bug in the Private Gateway functionality, when Source NAT is enabled for the Private Gateway.  When the SNAT is added to iptables, it has the source CIDR of the private gateway subnet.  Since no VMs live in that private gateway subnet, the SNAT doesn’t work.  \r\n\r\n##### STEPS TO REPRODUCE\r\n<!--\r\nFor bugs, show exactly how to reproduce the problem, using a minimal test-case. Use Screenshots if accurate.\r\n\r\nFor new features, show how the feature would be used.\r\n-->\r\n\r\n<!-- Paste example playbooks or commands between quotes below -->\r\nBelow is an example:\r\n\r\n- VMs have IP addresses in the 10.0.0.0/24 subnet.\r\n- The Private Gateway address is 10.101.141.2/30\r\n \r\nIn the outputs below, the SOURCE field for the new SNAT (eth3) only matches if the source is 10.101.141.0/30.  Since the VM has an IP address in 10.0.0.0/24, the VMs don’t get SNAT’d as they should when talking across the private gateway.  The SOURCE should be set to ANYWHERE.\r\n##### BEFORE ADDING PRIVATE GATEWAY\r\n~~~\r\nChain POSTROUTING (policy ACCEPT 1 packets, 52 bytes)\r\npkts bytes target     prot opt in     out     source               destination\r\n    2   736 SNAT       all  --  any    eth2    10.0.0.0/24          anywhere             to:10.0.0.1\r\n   16  1039 SNAT       all  --  any    eth1    anywhere             anywhere             to:46.99.52.18\r\n~~~\r\n\r\n<!-- You can also paste gist.github.com links for larger files -->\r\n\r\n##### EXPECTED RESULTS\r\n<!-- What did you expect to happen when running the steps above? -->\r\n\r\n~~~\r\nChain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)\r\npkts bytes target     prot opt in     out     source               destination\r\n    0     0 SNAT       all  --  any    eth3    anywhere             anywhere             to:10.101.141.2\r\n    2   736 SNAT       all  --  any    eth2    anywhere             anywhere             to:10.0.0.1\r\n   23  1515 SNAT       all  --  any    eth1    anywhere             anywhere             to:46.99.52.18\r\n~~~\r\n\r\n##### ACTUAL RESULTS\r\n<!-- What actually happened? -->\r\n\r\n<!-- Paste verbatim command output between quotes below -->\r\n~~~\r\nChain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)\r\npkts bytes target     prot opt in     out     source               destination\r\n    0     0 SNAT       all  --  any    eth3    10.101.141.0/30      anywhere             to:10.101.141.2\r\n    2   736 SNAT       all  --  any    eth2    10.0.0.0/24          anywhere             to:10.0.0.1\r\n   23  1515 SNAT       all  --  any    eth1    anywhere             anywhere             to:46.99.52.18\r\n~~~\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [X] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] Enhancement (improves an existing feature and functionality)\r\n- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)\r\n\r\n## GitHub Issue/PRs\r\n<!-- If this PR is to fix an issue or another PR on GH, uncomment the section and provide the id of issue/PR -->\r\n<!-- When \"Fixes: #<id>\" is specified, the issue/PR will automatically be closed when this PR gets merged -->\r\n<!-- For addressing multiple issues/PRs, use multiple \"Fixes: #<id>\" -->\r\n\r\nFixes: #2680 \r\n\r\n## Screenshots (if appropriate):\r\n\r\n## How Has This Been Tested?\r\n\r\n<!-- Please describe in detail how you tested your changes. -->\r\n<!-- Include details of your testing environment, and the tests you ran to -->\r\n<!-- see how your change affects other areas of the code, etc. -->\r\n\r\n## Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] I have read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document.\r\n- [x] My code follows the code style of this project.\r\n- [ ] My change requires a change to the documentation.\r\n- [ ] I have updated the documentation accordingly.\r\nTesting\r\n- [ ] I have added tests to cover my changes.\r\n- [ ] All relevant new and existing integration tests have passed.\r\n- [ ] A full integration testsuite with all test that can run on my environment has passed.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/apache/cloudstack/issues/comments/396417344","html_url":"https://github.com/apache/cloudstack/pull/2681#issuecomment-396417344","issue_url":"https://api.github.com/repos/apache/cloudstack/issues/2681","id":396417344,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjQxNzM0NA==","user":{"login":"blueorangutan","id":16489489,"node_id":"MDQ6VXNlcjE2NDg5NDg5","avatar_url":"https://avatars2.githubusercontent.com/u/16489489?v=4","gravatar_id":"","url":"https://api.github.com/users/blueorangutan","html_url":"https://github.com/blueorangutan","followers_url":"https://api.github.com/users/blueorangutan/followers","following_url":"https://api.github.com/users/blueorangutan/following{/other_user}","gists_url":"https://api.github.com/users/blueorangutan/gists{/gist_id}","starred_url":"https://api.github.com/users/blueorangutan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueorangutan/subscriptions","organizations_url":"https://api.github.com/users/blueorangutan/orgs","repos_url":"https://api.github.com/users/blueorangutan/repos","events_url":"https://api.github.com/users/blueorangutan/events{/privacy}","received_events_url":"https://api.github.com/users/blueorangutan/received_events","type":"User","site_admin":false},"created_at":"2018-06-11T23:23:19Z","updated_at":"2018-06-11T23:23:19Z","author_association":"NONE","body":"Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2117"}}
{"actor":{"display_login":"blueorangutan"}}