Raise exception/403 on attempt to reuse ip-address

Bug #1549572 reported by Hampapur Ajay
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.0
Fix Committed
High
Hampapur Ajay
Trunk
Fix Committed
High
Hampapur Ajay

Bug Description

Currently (3.0 and beyond) if an instance-ip object attempts to reserve an in-use address, it will not be set in instance_ip_address prop but no exception is returned back. Fix that and also add validations so that:

1. raise 403 on any attempt to reserve an ip already in use by instance-ip (except gw-ip)/floating-ip
2. for gw-ip address, allow only if vmi is not pointing to a vm. i.e. gateway-ip cannot be attracted by vm but it is ok to put it on a router-port

Tags: config
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/17783
Submitter: Hampapur Ajay (<email address hidden>)

tags: added: config
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/17783
Committed: http://github.org/Juniper/contrail-controller/commit/fb9165b6f12e74a3103e1da7088969434ce956d8
Submitter: Zuul
Branch: master

commit fb9165b6f12e74a3103e1da7088969434ce956d8
Author: Hampapur Ajay <email address hidden>
Date: Tue Feb 23 14:51:19 2016 -0800

Disallow re-use of ip-address and add validations for iip, fip, vmi.
Refactor to put dbe_read and error handling in Resource class.

Partial-Bug: #1549572

Change-Id: I4838fac7f9d3d9f59d5e7fabb5578529b69e2901

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.0

Review in progress for https://review.opencontrail.org/17875
Submitter: Hampapur Ajay (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/17875
Committed: http://github.org/Juniper/contrail-controller/commit/af4ac2ebfedcedd6cc01747140f432bbe4714562
Submitter: Zuul
Branch: R3.0

commit af4ac2ebfedcedd6cc01747140f432bbe4714562
Author: Hampapur Ajay <email address hidden>
Date: Tue Feb 23 14:51:19 2016 -0800

Disallow re-use of ip-address and add validations for iip, fip, vmi.
Refactor to put dbe_read and error handling in Resource class.

Partial-Bug: #1549572

Change-Id: I4838fac7f9d3d9f59d5e7fabb5578529b69e2901
(cherry picked from commit fb9165b6f12e74a3103e1da7088969434ce956d8)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.