You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Saksham Srivastava <sa...@citrix.com> on 2013/12/19 06:26:43 UTC

Review Request 16361: CLOUDSTACK-5535: Do not allow addNetwork to create NIC across VPC tiers and Isolated Networks

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16361/
-----------------------------------------------------------

Review request for cloudstack and Alena Prokharchyk.


Bugs: CLOUDSTACK-5535
    https://issues.apache.org/jira/browse/CLOUDSTACK-5535


Repository: cloudstack-git


Description
-------

addNetworkToVM allows adding any network to VM.
Ideally a VM running in isolated Guest Network should not be able to add a VPC tier.
A VM running in VPC tier should not be allowed to add another tier
A VM running in VPC tier should not be allowed to add another isolated guest network


Diffs
-----

  server/src/com/cloud/vm/UserVmManagerImpl.java 3ad49d8 

Diff: https://reviews.apache.org/r/16361/diff/


Testing
-------

VM having a nic in isolated guest network cannot add a VPC tier.
VM having a nic in one VPC tier cannot add another VPC tier.
VM having a nic in a VPC tier cannot add a isolated guest network.


Thanks,

Saksham Srivastava


Re: Review Request 16361: CLOUDSTACK-5535: Do not allow addNetwork to create NIC across VPC tiers and Isolated Networks

Posted by Saksham Srivastava <sa...@citrix.com>.

> On Jan. 9, 2014, 12:39 a.m., Alena Prokharchyk wrote:
> > One more check is needed: don't let to add vm to VPC network if its already a part of another VPC network.

This check is already in place unless I am missing something:
if (existingNetwork.getVpcId() != null && network.getGuestType() != Network.GuestType.Shared) {
// If the vm is already in VPC and we try to add a new Non shared network (eg. VPC or Isolated Network), 
// then throw exception
}


- Saksham


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16361/#review31417
-----------------------------------------------------------


On Dec. 19, 2013, 5:25 a.m., Saksham Srivastava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16361/
> -----------------------------------------------------------
> 
> (Updated Dec. 19, 2013, 5:25 a.m.)
> 
> 
> Review request for cloudstack and Alena Prokharchyk.
> 
> 
> Bugs: CLOUDSTACK-5535
>     https://issues.apache.org/jira/browse/CLOUDSTACK-5535
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> addNetworkToVM allows adding any network to VM.
> Ideally a VM running in isolated Guest Network should not be able to add a VPC tier.
> A VM running in VPC tier should not be allowed to add another tier
> A VM running in VPC tier should not be allowed to add another isolated guest network
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 3ad49d8 
> 
> Diff: https://reviews.apache.org/r/16361/diff/
> 
> 
> Testing
> -------
> 
> VM having a nic in isolated guest network cannot add a VPC tier.
> VM having a nic in one VPC tier cannot add another VPC tier.
> VM having a nic in a VPC tier cannot add a isolated guest network.
> 
> 
> Thanks,
> 
> Saksham Srivastava
> 
>


Re: Review Request 16361: CLOUDSTACK-5535: Do not allow addNetwork to create NIC across VPC tiers and Isolated Networks

Posted by Alena Prokharchyk <al...@citrix.com>.

> On Jan. 9, 2014, 12:39 a.m., Alena Prokharchyk wrote:
> > One more check is needed: don't let to add vm to VPC network if its already a part of another VPC network.
> 
> Saksham Srivastava wrote:
>     This check is already in place unless I am missing something:
>     if (existingNetwork.getVpcId() != null && network.getGuestType() != Network.GuestType.Shared) {
>     // If the vm is already in VPC and we try to add a new Non shared network (eg. VPC or Isolated Network), 
>     // then throw exception
>     }

Ok, true, not explicit, but true :) It will work unless we support non-isolated networks in the VPC. I will apply the fix.


- Alena


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16361/#review31417
-----------------------------------------------------------


On Dec. 19, 2013, 5:25 a.m., Saksham Srivastava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16361/
> -----------------------------------------------------------
> 
> (Updated Dec. 19, 2013, 5:25 a.m.)
> 
> 
> Review request for cloudstack and Alena Prokharchyk.
> 
> 
> Bugs: CLOUDSTACK-5535
>     https://issues.apache.org/jira/browse/CLOUDSTACK-5535
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> addNetworkToVM allows adding any network to VM.
> Ideally a VM running in isolated Guest Network should not be able to add a VPC tier.
> A VM running in VPC tier should not be allowed to add another tier
> A VM running in VPC tier should not be allowed to add another isolated guest network
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 3ad49d8 
> 
> Diff: https://reviews.apache.org/r/16361/diff/
> 
> 
> Testing
> -------
> 
> VM having a nic in isolated guest network cannot add a VPC tier.
> VM having a nic in one VPC tier cannot add another VPC tier.
> VM having a nic in a VPC tier cannot add a isolated guest network.
> 
> 
> Thanks,
> 
> Saksham Srivastava
> 
>


Re: Review Request 16361: CLOUDSTACK-5535: Do not allow addNetwork to create NIC across VPC tiers and Isolated Networks

Posted by Alena Prokharchyk <al...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16361/#review31417
-----------------------------------------------------------


One more check is needed: don't let to add vm to VPC network if its already a part of another VPC network.

- Alena Prokharchyk


On Dec. 19, 2013, 5:25 a.m., Saksham Srivastava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16361/
> -----------------------------------------------------------
> 
> (Updated Dec. 19, 2013, 5:25 a.m.)
> 
> 
> Review request for cloudstack and Alena Prokharchyk.
> 
> 
> Bugs: CLOUDSTACK-5535
>     https://issues.apache.org/jira/browse/CLOUDSTACK-5535
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> addNetworkToVM allows adding any network to VM.
> Ideally a VM running in isolated Guest Network should not be able to add a VPC tier.
> A VM running in VPC tier should not be allowed to add another tier
> A VM running in VPC tier should not be allowed to add another isolated guest network
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 3ad49d8 
> 
> Diff: https://reviews.apache.org/r/16361/diff/
> 
> 
> Testing
> -------
> 
> VM having a nic in isolated guest network cannot add a VPC tier.
> VM having a nic in one VPC tier cannot add another VPC tier.
> VM having a nic in a VPC tier cannot add a isolated guest network.
> 
> 
> Thanks,
> 
> Saksham Srivastava
> 
>


Re: Review Request 16361: CLOUDSTACK-5535: Do not allow addNetwork to create NIC across VPC tiers and Isolated Networks

Posted by Saksham Srivastava <sa...@citrix.com>.

> On Jan. 9, 2014, 6:22 p.m., Alena Prokharchyk wrote:
> > Saksham,
> > 
> > The patch fails on 4.3 branch with the error:
> > 
> > Applying: CLOUDSTACK-5535 : Do not allow addNetwork to create NIC across VPC tiers and Isolated Networks
> > error: patch failed: server/src/com/cloud/vm/UserVmManagerImpl.java:973
> > error: server/src/com/cloud/vm/UserVmManagerImpl.java: patch does not apply
> > Patch failed at 0001 CLOUDSTACK-5535 : Do not allow addNetwork to create NIC across VPC tiers and Isolated Networks
> > The copy of the patch that failed is found in:
> >    /Users/alena/repos/dr/cloudstack/.git/rebase-apply/patch
> > 
> > 
> > Please fix and submit again. Also submit a separate patch for the master branch, as there are changes in code style that might affect the cherry-pick.
> 
> Marcus Sorensen wrote:
>     Please dont submit again! :-) See my comments on CLOUDSTACK-5535

Discarding as per comments from Marcus and Animesh on the bug.


- Saksham


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16361/#review31444
-----------------------------------------------------------


On Dec. 19, 2013, 5:25 a.m., Saksham Srivastava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16361/
> -----------------------------------------------------------
> 
> (Updated Dec. 19, 2013, 5:25 a.m.)
> 
> 
> Review request for cloudstack and Alena Prokharchyk.
> 
> 
> Bugs: CLOUDSTACK-5535
>     https://issues.apache.org/jira/browse/CLOUDSTACK-5535
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> addNetworkToVM allows adding any network to VM.
> Ideally a VM running in isolated Guest Network should not be able to add a VPC tier.
> A VM running in VPC tier should not be allowed to add another tier
> A VM running in VPC tier should not be allowed to add another isolated guest network
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 3ad49d8 
> 
> Diff: https://reviews.apache.org/r/16361/diff/
> 
> 
> Testing
> -------
> 
> VM having a nic in isolated guest network cannot add a VPC tier.
> VM having a nic in one VPC tier cannot add another VPC tier.
> VM having a nic in a VPC tier cannot add a isolated guest network.
> 
> 
> Thanks,
> 
> Saksham Srivastava
> 
>


Re: Review Request 16361: CLOUDSTACK-5535: Do not allow addNetwork to create NIC across VPC tiers and Isolated Networks

Posted by Marcus Sorensen <sh...@gmail.com>.

> On Jan. 9, 2014, 6:22 p.m., Alena Prokharchyk wrote:
> > Saksham,
> > 
> > The patch fails on 4.3 branch with the error:
> > 
> > Applying: CLOUDSTACK-5535 : Do not allow addNetwork to create NIC across VPC tiers and Isolated Networks
> > error: patch failed: server/src/com/cloud/vm/UserVmManagerImpl.java:973
> > error: server/src/com/cloud/vm/UserVmManagerImpl.java: patch does not apply
> > Patch failed at 0001 CLOUDSTACK-5535 : Do not allow addNetwork to create NIC across VPC tiers and Isolated Networks
> > The copy of the patch that failed is found in:
> >    /Users/alena/repos/dr/cloudstack/.git/rebase-apply/patch
> > 
> > 
> > Please fix and submit again. Also submit a separate patch for the master branch, as there are changes in code style that might affect the cherry-pick.

Please dont submit again! :-) See my comments on CLOUDSTACK-5535


- Marcus


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16361/#review31444
-----------------------------------------------------------


On Dec. 19, 2013, 5:25 a.m., Saksham Srivastava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16361/
> -----------------------------------------------------------
> 
> (Updated Dec. 19, 2013, 5:25 a.m.)
> 
> 
> Review request for cloudstack and Alena Prokharchyk.
> 
> 
> Bugs: CLOUDSTACK-5535
>     https://issues.apache.org/jira/browse/CLOUDSTACK-5535
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> addNetworkToVM allows adding any network to VM.
> Ideally a VM running in isolated Guest Network should not be able to add a VPC tier.
> A VM running in VPC tier should not be allowed to add another tier
> A VM running in VPC tier should not be allowed to add another isolated guest network
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 3ad49d8 
> 
> Diff: https://reviews.apache.org/r/16361/diff/
> 
> 
> Testing
> -------
> 
> VM having a nic in isolated guest network cannot add a VPC tier.
> VM having a nic in one VPC tier cannot add another VPC tier.
> VM having a nic in a VPC tier cannot add a isolated guest network.
> 
> 
> Thanks,
> 
> Saksham Srivastava
> 
>


Re: Review Request 16361: CLOUDSTACK-5535: Do not allow addNetwork to create NIC across VPC tiers and Isolated Networks

Posted by Alena Prokharchyk <al...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16361/#review31444
-----------------------------------------------------------


Saksham,

The patch fails on 4.3 branch with the error:

Applying: CLOUDSTACK-5535 : Do not allow addNetwork to create NIC across VPC tiers and Isolated Networks
error: patch failed: server/src/com/cloud/vm/UserVmManagerImpl.java:973
error: server/src/com/cloud/vm/UserVmManagerImpl.java: patch does not apply
Patch failed at 0001 CLOUDSTACK-5535 : Do not allow addNetwork to create NIC across VPC tiers and Isolated Networks
The copy of the patch that failed is found in:
   /Users/alena/repos/dr/cloudstack/.git/rebase-apply/patch


Please fix and submit again. Also submit a separate patch for the master branch, as there are changes in code style that might affect the cherry-pick.

- Alena Prokharchyk


On Dec. 19, 2013, 5:25 a.m., Saksham Srivastava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16361/
> -----------------------------------------------------------
> 
> (Updated Dec. 19, 2013, 5:25 a.m.)
> 
> 
> Review request for cloudstack and Alena Prokharchyk.
> 
> 
> Bugs: CLOUDSTACK-5535
>     https://issues.apache.org/jira/browse/CLOUDSTACK-5535
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> addNetworkToVM allows adding any network to VM.
> Ideally a VM running in isolated Guest Network should not be able to add a VPC tier.
> A VM running in VPC tier should not be allowed to add another tier
> A VM running in VPC tier should not be allowed to add another isolated guest network
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 3ad49d8 
> 
> Diff: https://reviews.apache.org/r/16361/diff/
> 
> 
> Testing
> -------
> 
> VM having a nic in isolated guest network cannot add a VPC tier.
> VM having a nic in one VPC tier cannot add another VPC tier.
> VM having a nic in a VPC tier cannot add a isolated guest network.
> 
> 
> Thanks,
> 
> Saksham Srivastava
> 
>