You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Marcus Sorensen <sh...@gmail.com> on 2012/09/01 01:38:34 UTC
Review Request: KVM initial VPC support
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/6883/
-----------------------------------------------------------
Review request for cloudstack.
Description
-------
Implements SetupGuestNetworkCommand,SetNetworkACLCommand,SetSourceNatCommand,IpAssocVpcCommand,SetPortForwardingRulesVpcCommand. Passes basic functionality, though I'm sure there may be some honing to do.
Also fixes a few minor things found along the way:
vpc_guestnw.sh wasn't successfully setting up apache due to default listen IP of 10.1.1.1
vpc_guestnw.sh was referencing a 'logger_it' function, replaced with 'logger -t cloud'
system vms were running with OS type "Debian GNU/Linux 5.0(32-bit)", which was not found in the KVMGuestOsMapper
the Xen implementation of SetupGuestNetworkCommand had apparently copied its catch message from UnPlug Nic, fixed string
Diffs
-----
core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java 965dd63
patches/systemvm/debian/config/opt/cloud/bin/vpc_guestnw.sh be0ad96
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMGuestOsMapper.java e3615ad
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java 7e8a11c
plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java a6efdf7
Diff: https://reviews.apache.org/r/6883/diff/
Testing
-------
created VPC, added 3 tiers, added 3 vms, set up acls for ICMP between all tiers, TCP outbound on all tiers. Tested traffic between VMs on all three networks. Added IPs, created portforwarding rule port 22 to VM on network 3, added TCP port 22 ingress rule for network 3, SSH'ed into the VM via public IP. Rebooted VPC router and tested everything again.
Thanks,
Marcus Sorensen
Re: Review Request: KVM initial VPC support
Posted by edison su <ed...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/6883/#review11028
-----------------------------------------------------------
Ship it!
Ship It!
- edison su
On Sept. 3, 2012, 7:37 p.m., Marcus Sorensen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/6883/
> -----------------------------------------------------------
>
> (Updated Sept. 3, 2012, 7:37 p.m.)
>
>
> Review request for cloudstack.
>
>
> Description
> -------
>
> Implements SetupGuestNetworkCommand,SetNetworkACLCommand,SetSourceNatCommand,IpAssocVpcCommand,SetPortForwardingRulesVpcCommand. Passes basic functionality, though I'm sure there may be some honing to do.
>
> Also fixes a few minor things found along the way:
> vpc_guestnw.sh wasn't successfully setting up apache due to default listen IP of 10.1.1.1
> vpc_guestnw.sh was referencing a 'logger_it' function, replaced with 'logger -t cloud'
> system vms were running with OS type "Debian GNU/Linux 5.0(32-bit)", which was not found in the KVMGuestOsMapper
> the Xen implementation of SetupGuestNetworkCommand had apparently copied its catch message from UnPlug Nic, fixed string
>
>
> Diffs
> -----
>
> core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java 965dd63
> patches/systemvm/debian/config/opt/cloud/bin/vpc_guestnw.sh be0ad96
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMGuestOsMapper.java e3615ad
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java 7e8a11c
> plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java a6efdf7
>
> Diff: https://reviews.apache.org/r/6883/diff/
>
>
> Testing
> -------
>
> created VPC, added 3 tiers, added 3 vms, set up acls for ICMP between all tiers, TCP outbound on all tiers. Tested traffic between VMs on all three networks. Added IPs, created portforwarding rule port 22 to VM on network 3, added TCP port 22 ingress rule for network 3, SSH'ed into the VM via public IP. Rebooted VPC router and tested everything again.
>
>
> Thanks,
>
> Marcus Sorensen
>
>
Re: Review Request: KVM initial VPC support
Posted by Marcus Sorensen <sh...@gmail.com>.
> On Sept. 4, 2012, 5:06 p.m., edison su wrote:
> > plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java, line 1416
> > <https://reviews.apache.org/r/6883/diff/3/?file=149124#file149124line1416>
> >
> > How about changing the logic to:
> > for (InterfaceDef pluggedNic : pluggedNics) {
> > if (pluggedVlanBr.equalsIgnoreCase(_publicBridgeName)) {
> > if (pubVlan.equalsIgnoreCase(pluggedVlanId)) {
> > break;
> > }
> > }
> > devNum++
> > }
This is where not understanding the actual implementation requirements comes into play. Do we only ever want to pass the one public.network.device that the agent knows of? In the past you've said there could potentially be multiple public bridges that we need to search through, not just the one defined in the agent config.
My initial implementation looked for _publicBridgeName and used that. Your implementation here does the same, but verifies that it's also on the same vlan that we're looking for before using it (whether a vlan num or untagged). It doesn't satisfy your previous comment about looking at multiple bridges to find a match, it only matches the one public.network.device in the agent's config.
- Marcus
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/6883/#review11020
-----------------------------------------------------------
On Sept. 3, 2012, 7:37 p.m., Marcus Sorensen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/6883/
> -----------------------------------------------------------
>
> (Updated Sept. 3, 2012, 7:37 p.m.)
>
>
> Review request for cloudstack.
>
>
> Description
> -------
>
> Implements SetupGuestNetworkCommand,SetNetworkACLCommand,SetSourceNatCommand,IpAssocVpcCommand,SetPortForwardingRulesVpcCommand. Passes basic functionality, though I'm sure there may be some honing to do.
>
> Also fixes a few minor things found along the way:
> vpc_guestnw.sh wasn't successfully setting up apache due to default listen IP of 10.1.1.1
> vpc_guestnw.sh was referencing a 'logger_it' function, replaced with 'logger -t cloud'
> system vms were running with OS type "Debian GNU/Linux 5.0(32-bit)", which was not found in the KVMGuestOsMapper
> the Xen implementation of SetupGuestNetworkCommand had apparently copied its catch message from UnPlug Nic, fixed string
>
>
> Diffs
> -----
>
> core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java 965dd63
> patches/systemvm/debian/config/opt/cloud/bin/vpc_guestnw.sh be0ad96
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMGuestOsMapper.java e3615ad
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java 7e8a11c
> plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java a6efdf7
>
> Diff: https://reviews.apache.org/r/6883/diff/
>
>
> Testing
> -------
>
> created VPC, added 3 tiers, added 3 vms, set up acls for ICMP between all tiers, TCP outbound on all tiers. Tested traffic between VMs on all three networks. Added IPs, created portforwarding rule port 22 to VM on network 3, added TCP port 22 ingress rule for network 3, SSH'ed into the VM via public IP. Rebooted VPC router and tested everything again.
>
>
> Thanks,
>
> Marcus Sorensen
>
>
Re: Review Request: KVM initial VPC support
Posted by edison su <ed...@citrix.com>.
> On Sept. 4, 2012, 5:06 p.m., edison su wrote:
> > plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java, line 1416
> > <https://reviews.apache.org/r/6883/diff/3/?file=149124#file149124line1416>
> >
> > How about changing the logic to:
> > for (InterfaceDef pluggedNic : pluggedNics) {
> > if (pluggedVlanBr.equalsIgnoreCase(_publicBridgeName)) {
> > if (pubVlan.equalsIgnoreCase(pluggedVlanId)) {
> > break;
> > }
> > }
> > devNum++
> > }
>
> Marcus Sorensen wrote:
> This is where not understanding the actual implementation requirements comes into play. Do we only ever want to pass the one public.network.device that the agent knows of? In the past you've said there could potentially be multiple public bridges that we need to search through, not just the one defined in the agent config.
>
> My initial implementation looked for _publicBridgeName and used that. Your implementation here does the same, but verifies that it's also on the same vlan that we're looking for before using it (whether a vlan num or untagged). It doesn't satisfy your previous comment about looking at multiple bridges to find a match, it only matches the one public.network.device in the agent's config.
Oh, you are right, there is no better way to find all the public nics on router vm, have to iterate all the nics one by one.
- edison
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/6883/#review11020
-----------------------------------------------------------
On Sept. 3, 2012, 7:37 p.m., Marcus Sorensen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/6883/
> -----------------------------------------------------------
>
> (Updated Sept. 3, 2012, 7:37 p.m.)
>
>
> Review request for cloudstack.
>
>
> Description
> -------
>
> Implements SetupGuestNetworkCommand,SetNetworkACLCommand,SetSourceNatCommand,IpAssocVpcCommand,SetPortForwardingRulesVpcCommand. Passes basic functionality, though I'm sure there may be some honing to do.
>
> Also fixes a few minor things found along the way:
> vpc_guestnw.sh wasn't successfully setting up apache due to default listen IP of 10.1.1.1
> vpc_guestnw.sh was referencing a 'logger_it' function, replaced with 'logger -t cloud'
> system vms were running with OS type "Debian GNU/Linux 5.0(32-bit)", which was not found in the KVMGuestOsMapper
> the Xen implementation of SetupGuestNetworkCommand had apparently copied its catch message from UnPlug Nic, fixed string
>
>
> Diffs
> -----
>
> core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java 965dd63
> patches/systemvm/debian/config/opt/cloud/bin/vpc_guestnw.sh be0ad96
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMGuestOsMapper.java e3615ad
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java 7e8a11c
> plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java a6efdf7
>
> Diff: https://reviews.apache.org/r/6883/diff/
>
>
> Testing
> -------
>
> created VPC, added 3 tiers, added 3 vms, set up acls for ICMP between all tiers, TCP outbound on all tiers. Tested traffic between VMs on all three networks. Added IPs, created portforwarding rule port 22 to VM on network 3, added TCP port 22 ingress rule for network 3, SSH'ed into the VM via public IP. Rebooted VPC router and tested everything again.
>
>
> Thanks,
>
> Marcus Sorensen
>
>
Re: Review Request: KVM initial VPC support
Posted by edison su <ed...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/6883/#review11020
-----------------------------------------------------------
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
<https://reviews.apache.org/r/6883/#comment23642>
How about changing the logic to:
for (InterfaceDef pluggedNic : pluggedNics) {
if (pluggedVlanBr.equalsIgnoreCase(_publicBridgeName)) {
if (pubVlan.equalsIgnoreCase(pluggedVlanId)) {
break;
}
}
devNum++
}
- edison su
On Sept. 3, 2012, 7:37 p.m., Marcus Sorensen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/6883/
> -----------------------------------------------------------
>
> (Updated Sept. 3, 2012, 7:37 p.m.)
>
>
> Review request for cloudstack.
>
>
> Description
> -------
>
> Implements SetupGuestNetworkCommand,SetNetworkACLCommand,SetSourceNatCommand,IpAssocVpcCommand,SetPortForwardingRulesVpcCommand. Passes basic functionality, though I'm sure there may be some honing to do.
>
> Also fixes a few minor things found along the way:
> vpc_guestnw.sh wasn't successfully setting up apache due to default listen IP of 10.1.1.1
> vpc_guestnw.sh was referencing a 'logger_it' function, replaced with 'logger -t cloud'
> system vms were running with OS type "Debian GNU/Linux 5.0(32-bit)", which was not found in the KVMGuestOsMapper
> the Xen implementation of SetupGuestNetworkCommand had apparently copied its catch message from UnPlug Nic, fixed string
>
>
> Diffs
> -----
>
> core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java 965dd63
> patches/systemvm/debian/config/opt/cloud/bin/vpc_guestnw.sh be0ad96
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMGuestOsMapper.java e3615ad
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java 7e8a11c
> plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java a6efdf7
>
> Diff: https://reviews.apache.org/r/6883/diff/
>
>
> Testing
> -------
>
> created VPC, added 3 tiers, added 3 vms, set up acls for ICMP between all tiers, TCP outbound on all tiers. Tested traffic between VMs on all three networks. Added IPs, created portforwarding rule port 22 to VM on network 3, added TCP port 22 ingress rule for network 3, SSH'ed into the VM via public IP. Rebooted VPC router and tested everything again.
>
>
> Thanks,
>
> Marcus Sorensen
>
>
Re: Review Request: KVM initial VPC support
Posted by Marcus Sorensen <sh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/6883/
-----------------------------------------------------------
(Updated Sept. 3, 2012, 7:37 p.m.)
Review request for cloudstack.
Changes
-------
adding support for createStaticRoute api command; fixing SetSourceNatCommand to account for link local bridge
Description
-------
Implements SetupGuestNetworkCommand,SetNetworkACLCommand,SetSourceNatCommand,IpAssocVpcCommand,SetPortForwardingRulesVpcCommand. Passes basic functionality, though I'm sure there may be some honing to do.
Also fixes a few minor things found along the way:
vpc_guestnw.sh wasn't successfully setting up apache due to default listen IP of 10.1.1.1
vpc_guestnw.sh was referencing a 'logger_it' function, replaced with 'logger -t cloud'
system vms were running with OS type "Debian GNU/Linux 5.0(32-bit)", which was not found in the KVMGuestOsMapper
the Xen implementation of SetupGuestNetworkCommand had apparently copied its catch message from UnPlug Nic, fixed string
Diffs (updated)
-----
core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java 965dd63
patches/systemvm/debian/config/opt/cloud/bin/vpc_guestnw.sh be0ad96
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMGuestOsMapper.java e3615ad
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java 7e8a11c
plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java a6efdf7
Diff: https://reviews.apache.org/r/6883/diff/
Testing
-------
created VPC, added 3 tiers, added 3 vms, set up acls for ICMP between all tiers, TCP outbound on all tiers. Tested traffic between VMs on all three networks. Added IPs, created portforwarding rule port 22 to VM on network 3, added TCP port 22 ingress rule for network 3, SSH'ed into the VM via public IP. Rebooted VPC router and tested everything again.
Thanks,
Marcus Sorensen
Re: Review Request: KVM initial VPC support
Posted by Marcus Sorensen <sh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/6883/
-----------------------------------------------------------
(Updated Sept. 1, 2012, 5:11 a.m.)
Review request for cloudstack.
Changes
-------
Updated patch to address Edison's notes. Also some minor fixes to formatting and removing some of the superfluous debug code. Tested again (rebooted VPC router with newer code installed, verified functionality)
Description
-------
Implements SetupGuestNetworkCommand,SetNetworkACLCommand,SetSourceNatCommand,IpAssocVpcCommand,SetPortForwardingRulesVpcCommand. Passes basic functionality, though I'm sure there may be some honing to do.
Also fixes a few minor things found along the way:
vpc_guestnw.sh wasn't successfully setting up apache due to default listen IP of 10.1.1.1
vpc_guestnw.sh was referencing a 'logger_it' function, replaced with 'logger -t cloud'
system vms were running with OS type "Debian GNU/Linux 5.0(32-bit)", which was not found in the KVMGuestOsMapper
the Xen implementation of SetupGuestNetworkCommand had apparently copied its catch message from UnPlug Nic, fixed string
Diffs (updated)
-----
core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java 965dd63
patches/systemvm/debian/config/opt/cloud/bin/vpc_guestnw.sh be0ad96
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMGuestOsMapper.java e3615ad
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java 7e8a11c
plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java a6efdf7
Diff: https://reviews.apache.org/r/6883/diff/
Testing
-------
created VPC, added 3 tiers, added 3 vms, set up acls for ICMP between all tiers, TCP outbound on all tiers. Tested traffic between VMs on all three networks. Added IPs, created portforwarding rule port 22 to VM on network 3, added TCP port 22 ingress rule for network 3, SSH'ed into the VM via public IP. Rebooted VPC router and tested everything again.
Thanks,
Marcus Sorensen
Re: Review Request: KVM initial VPC support
Posted by edison su <ed...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/6883/#review10962
-----------------------------------------------------------
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
<https://reviews.apache.org/r/6883/#comment23542>
Good catch.
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
<https://reviews.apache.org/r/6883/#comment23540>
This is not enough. It's possible that router vm has multiple public nics(with untagged or tagged). The correct solution is: according to pubIp->getvlanid(), if vlan id is null, then find public bridge name as you did here, otherwise, need to find the nic created on vlan bridge. We can call getVlanIdFromBridge to get vlan id, if they match, then we found the correct nic.
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
<https://reviews.apache.org/r/6883/#comment23541>
The same issue as SetSourceNatCommand
- edison su
On Aug. 31, 2012, 11:38 p.m., Marcus Sorensen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/6883/
> -----------------------------------------------------------
>
> (Updated Aug. 31, 2012, 11:38 p.m.)
>
>
> Review request for cloudstack.
>
>
> Description
> -------
>
> Implements SetupGuestNetworkCommand,SetNetworkACLCommand,SetSourceNatCommand,IpAssocVpcCommand,SetPortForwardingRulesVpcCommand. Passes basic functionality, though I'm sure there may be some honing to do.
>
> Also fixes a few minor things found along the way:
> vpc_guestnw.sh wasn't successfully setting up apache due to default listen IP of 10.1.1.1
> vpc_guestnw.sh was referencing a 'logger_it' function, replaced with 'logger -t cloud'
> system vms were running with OS type "Debian GNU/Linux 5.0(32-bit)", which was not found in the KVMGuestOsMapper
> the Xen implementation of SetupGuestNetworkCommand had apparently copied its catch message from UnPlug Nic, fixed string
>
>
> Diffs
> -----
>
> core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java 965dd63
> patches/systemvm/debian/config/opt/cloud/bin/vpc_guestnw.sh be0ad96
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMGuestOsMapper.java e3615ad
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java 7e8a11c
> plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java a6efdf7
>
> Diff: https://reviews.apache.org/r/6883/diff/
>
>
> Testing
> -------
>
> created VPC, added 3 tiers, added 3 vms, set up acls for ICMP between all tiers, TCP outbound on all tiers. Tested traffic between VMs on all three networks. Added IPs, created portforwarding rule port 22 to VM on network 3, added TCP port 22 ingress rule for network 3, SSH'ed into the VM via public IP. Rebooted VPC router and tested everything again.
>
>
> Thanks,
>
> Marcus Sorensen
>
>