Uh oh!
There was an error while loading. Please reload this page.
Multiple networks support for vms in advanced zone with security group (and kvm support) - #3639
Conversation
ustcweizhou
commented
Oct 17, 2019
@rakgenius @wido@GabrielBrascher @rhtyd We have tested with ipv4 addresses. We have also some other codes in integration test to test if the primary and secondary ips are reachable from virtual router. However, it requires sshpass and a script in vm to configure the ips, so I removed them from integration test. |
wido
left a comment
There was a problem hiding this comment.
Looking good! Left a few comments
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ustcweizhou
commented
Oct 28, 2019
@wido Thanks for review ! |
andrijapanicsb
commented
Jan 13, 2020
Hi guys @wido@weizhouapache , any change to progress on this one for the 4.14 (and solve the conflict) ? |
yadvr
commented
Jan 28, 2020
@ustcweizhou can you fix the merge conflict? |
9c64276 to
7294729Compareweizhouapache
commented
Jan 28, 2020
@rhtyd rebased with latest master |
weizhouapache
commented
Jan 30, 2020
@blueorangutan package |
blueorangutan
commented
Jan 30, 2020
@weizhouapache a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Jan 30, 2020
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-711 |
DaanHoogland
commented
Jan 30, 2020
@blueorangutan test |
blueorangutan
commented
Jan 30, 2020
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Jan 30, 2020
Trillian test result (tid-855)
|
DaanHoogland
commented
Jan 30, 2020
@wido Are all your concerns met? Will you guys test this? |
andrijapanicsb
commented
Feb 7, 2020
@GabrielBrascher interested to test this one perhaps? |
GabrielBrascher
commented
Feb 7, 2020
@andrijapanicsb sure, going to test it soon! |
yadvr
commented
Feb 12, 2020
@ustcweizhou can you address merge conflict? |
yadvr
commented
Feb 14, 2020
@blueorangutan package |
blueorangutan
commented
Feb 14, 2020
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Feb 14, 2020
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-871 |
andrijapanicsb
commented
Feb 14, 2020
@GabrielBrascher kindly ping if any updates on testing. thx! |
yadvr
commented
Feb 17, 2020
@blueorangutan package |
blueorangutan
commented
Feb 17, 2020
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Feb 17, 2020
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-886 |
DaanHoogland
commented
Feb 17, 2020
@blueorangutan test |
blueorangutan
commented
Feb 17, 2020
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Feb 18, 2020
Trillian test result (tid-1014)
|
GabrielBrascher
commented
Feb 18, 2020
@andrijapanicsb got delayed with other tasks, just finishing to build it for a staging environment. I will be able to test it today. |
GabrielBrascher
left a comment
There was a problem hiding this comment.
Tested and it works 👍
Overall code looks good, just added a few minor observations.
Test env: KVM on Ubuntu 18.04, advanced network with security groups.
| private static final String CIDR_LENGTH_SEPARATOR = "/"; | ||
| private static final char RULE_TARGET_SEPARATOR = ','; | ||
| private static final char RULE_COMMAND_SEPARATOR = ';'; | ||
| public static final char RULE_TARGET_SEPARATOR = ','; |
There was a problem hiding this comment.
I see that RULE_TARGET_SEPARATOR is not being used outside this class. Is that correct? If it is indeed the case, this should be set back to private.
| * @param conn | ||
| * @param vm | ||
| * @param checkBeforeApply | ||
| * @return |
There was a problem hiding this comment.
Thanks for adding documentation.
Just a note: I don't think that @param adds much info when it holds only the parameter name, normally I would vote to remove them, or add some description on each param.
| @Inject | ||
| private NetworkDetailsDao networkDetailsDao; | ||
| @Inject | ||
| private SecurityGroupManager _securityGroupManager; |
There was a problem hiding this comment.
Java Naming Conventions does not recommend using _ (underscore) before variable name. Can you please remove it?
DaanHoogland
left a comment
There was a problem hiding this comment.
code lgtm, not tested
GabrielBrascher
left a comment
There was a problem hiding this comment.
Based on code review and tests, it LGTM.
Regression tests failed on :
test_02_vpc_privategw_static_routes Failure 223.58 test_privategw_acl.py
test_03_vpc_privategw_restart_vpc_cleanup Failure 221.55 test_privategw_acl.py
test_04_rvpc_privategw_static_routes Failure 334.08 test_privategw_acl.py
But not necessarily related with this PR (afaik). Issue #3859 was created to tackle it.
Description
In advanced zone with security groups, there can be multiple shared networks with security groups enabled. However, it is only possible to create vm with only one network. When we try to create vm with multiple networks, it gives error "Only support one network per VM if security group enabled".
Operations succeed if we create a vm with one network and add other networks to the vm. However, the new nics do not work as there are no network rules for them applied on hypervisor.
This PR will enable the functionality on KVM hypervisors, including the support on
(1) API to support vm with multiple networks for KVM
(2) UI to create vm with multiple networks for KVM
(3) network rules applied on all nics (when create a vm, and add/remove nics)
(4) network rules for all secondary ips on all nics
This PR includes the other two bug fixes: #3635 and #3636
This PR also included a script file for integration test.
Fixes: #3045#3568
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?
environment:
ubuntu 18.04 / python2
advanced zone with security groups
check network rules for vm (eg i-10-20-VM)
vm actions: