GBP: L3Policy create should have validity check for ip-pool

Bug #1417210 reported by puppet-py
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Group Based Policy
Fix Released
Medium
Krishna Kothapalli

Bug Description

During the creation of GBP L3Policy Object, we need to implement validity check for the attribute values.
For example: today any ipaddress is accepted as the ip-pool, including the invalid ones as 0.0.0.0/0 and 255.255.255.255/32.

The above should report error instead of awaiting on the backend neutron to fail in allocating ip-address from an invalid ip-pool.
User should be notified ahead on his attempt of creating an ip-pool with invalid address, instead of hitting the error later down the line

test@localhost:~/devstack$ gbp l3policy-create A --ip-pool 255.255.255.255/32
Created a new l3_policy:
+----------------------+--------------------------------------+
| Field | Value |
+----------------------+--------------------------------------+
| description | |
| external_segments | {} |
| id | 07779195-261d-4f40-b07e-1fa27adbefef |
| ip_pool | 255.255.255.255/32 |
| ip_version | 4 |
| l2_policies | |
| name | A |
| routers | bd35a374-4c08-439f-9e4e-5247fe8ed3e1 |
| shared | False |
| subnet_prefix_length | 24 |
| tenant_id | b3094e3ded7e4d6ea7b91b3641214a7a |
+----------------------+--------------------------------------+
test@localhost:~/devstack$
test@localhost:~/devstack$
test@localhost:~/devstack$ gbp l3policy-delete A
Deleted l3_policy: A
test@localhost:~/devstack$
test@localhost:~/devstack$ gbp l3policy-create A --ip-pool 0.0.0.0/0
Created a new l3_policy:
+----------------------+--------------------------------------+
| Field | Value |
+----------------------+--------------------------------------+
| description | |
| external_segments | {} |
| id | 09e55ad4-b265-428a-978e-467484c786a1 |
| ip_pool | 0.0.0.0/0 |
| ip_version | 4 |
| l2_policies | |
| name | A |
| routers | de491a67-c231-4d68-a65e-5d895e4f9d74 |
| shared | False |
| subnet_prefix_length | 24 |
| tenant_id | b3094e3ded7e4d6ea7b91b3641214a7a |
+----------------------+--------------------------------------+
test@localhost:~/devstack$

affects: group-based-policy-client → group-based-policy
Changed in group-based-policy:
milestone: none → kilo-gbp-1
assignee: nobody → Krishna Kothapalli (krishna-sunitha)
importance: Undecided → Medium
status: New → Confirmed
Changed in group-based-policy:
milestone: kilo-gbp-1 → kilo-gbp-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to group-based-policy (master)

Fix proposed to branch: master
Review: https://review.openstack.org/158183

Changed in group-based-policy:
status: Confirmed → In Progress
tags: added: juno-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to group-based-policy (master)

Reviewed: https://review.openstack.org/158183
Committed: https://git.openstack.org/cgit/stackforge/group-based-policy/commit/?id=3f185c7f74b022c9db289aad2c5ab7584b705ffb
Submitter: Jenkins
Branch: master

commit 3f185c7f74b022c9db289aad2c5ab7584b705ffb
Author: Krishna Kothapalli <email address hidden>
Date: Sun Feb 22 20:28:11 2015 -0800

    L3Policy create should have validity check for IP pool

    Change-Id: I8d3a68b427557da99d1f2d8b778e11f155f470f1
    Closes-Bug: 1417210

Changed in group-based-policy:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to group-based-policy (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/161081

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to group-based-policy (stable/juno)

Reviewed: https://review.openstack.org/161081
Committed: https://git.openstack.org/cgit/stackforge/group-based-policy/commit/?id=1b2525cd5aebfaff02a828eac180955a21a518c2
Submitter: Jenkins
Branch: stable/juno

commit 1b2525cd5aebfaff02a828eac180955a21a518c2
Author: Krishna Kothapalli <email address hidden>
Date: Sun Feb 22 20:28:11 2015 -0800

    L3Policy create should have validity check for IP pool

    Change-Id: I8d3a68b427557da99d1f2d8b778e11f155f470f1
    Closes-Bug: 1417210
    (cherry picked from commit 3f185c7f74b022c9db289aad2c5ab7584b705ffb)

tags: added: in-stable-juno
Changed in group-based-policy:
status: Fix Committed → Fix Released
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.