Implement pagination for route summary introspect output

Bug #1477669 reported by Nischal Sheth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
Fix Released
Wishlist
Nischal Sheth
Trunk
Fix Committed
Wishlist
Nischal Sheth

Bug Description

Implement pagination for route summary introspect output.
Should return a fixed number of entries per page.
Should not examine an unlimited number of instances in one
Task run when a filter is specified.

Nischal Sheth (nsheth)
summary: - Implement pagination for route summary output
+ Implement pagination for route summary introspect output
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.20

Review in progress for https://review.opencontrail.org/12616
Submitter: Nischal Sheth (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/12617
Submitter: Nischal Sheth (<email address hidden>)

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

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

commit a594a02a586c7395404e775274f028bd845d4996
Author: Nischal Sheth <email address hidden>
Date: Thu Jul 23 13:48:04 2015 -0700

Support pagination of output for route summary introspect

Limit the maximum number of entries displayed on a single page. A
next_batch link is generated if there are more entries to display.

Also limit maximum number of entries examined in one invocation of
the callback routine. This comes into play when there is a search
string specified and many entries don't match it. A partial page
is saved in user-allocated data and the next invocation of callback
appends to it. This is repeated till there's a full page or there
are no more entries in the table.

Following changes are implemented:

- Move code from bgp_sandesh.cc to bgp_show_route_summary.cc
- Implement iteration limit to avoid hogging CPU from introspect
- Add unit tests to cover combinations of page and iteration limits
- Remove older unit tests which were limited in scope

Change-Id: I07657e8b4303a8c3e4c6ffe307a751f36e55da9b
Closes-Bug: 1477669

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/12616
Committed: http://github.org/Juniper/contrail-controller/commit/e66caf3ba5ad0881b04ea10c7dcc53d2b34101d5
Submitter: Zuul
Branch: R2.20

commit e66caf3ba5ad0881b04ea10c7dcc53d2b34101d5
Author: Nischal Sheth <email address hidden>
Date: Thu Jul 23 13:48:04 2015 -0700

Support pagination of output for route summary introspect

Limit the maximum number of entries displayed on a single page. A
next_batch link is generated if there are more entries to display.

Also limit maximum number of entries examined in one invocation of
the callback routine. This comes into play when there is a search
string specified and many entries don't match it. A partial page
is saved in user-allocated data and the next invocation of callback
appends to it. This is repeated till there's a full page or there
are no more entries in the table.

Following changes are implemented:

- Move code from bgp_sandesh.cc to bgp_show_route_summary.cc
- Implement iteration limit to avoid hogging CPU from introspect
- Add unit tests to cover combinations of page and iteration limits
- Remove older unit tests which were limited in scope

Change-Id: I07657e8b4303a8c3e4c6ffe307a751f36e55da9b
Closes-Bug: 1477669

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

Review in progress for https://review.opencontrail.org/12666
Submitter: Nischal Sheth (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/12685
Submitter: Nischal Sheth (<email address hidden>)

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

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

commit 584a716b8968b943a2b9f5029bbfaeaf0c7292de
Author: Nischal Sheth <email address hidden>
Date: Mon Jul 27 13:31:23 2015 -0700

Reduce duplicate code in implementation of route summary introspect

Use BgpShowHandler template to eliminate a bunch of duplicate code.

Change-Id: I232b6fe57f59f5e0df1151b4314eff3828406bf9
Closes-Bug: 1477669

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/12685
Committed: http://github.org/Juniper/contrail-controller/commit/234e15b23c92a02e313c398ea7fd27af34eebebb
Submitter: Zuul
Branch: R2.20

commit 234e15b23c92a02e313c398ea7fd27af34eebebb
Author: Nischal Sheth <email address hidden>
Date: Mon Jul 27 13:31:23 2015 -0700

Reduce duplicate code in implementation of route summary introspect

Use BgpShowHandler template to eliminate a bunch of duplicate code.

Change-Id: I232b6fe57f59f5e0df1151b4314eff3828406bf9
Closes-Bug: 1477669

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

Review in progress for https://review.opencontrail.org/12977
Submitter: Nischal Sheth (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/12981
Submitter: Nischal Sheth (<email address hidden>)

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

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

commit 23aaafd0ae0b07015704105cf53a2ed515372c6c
Author: Nischal Sheth <email address hidden>
Date: Tue Aug 11 09:04:35 2015 -0700

Add bgp_show_route_summary_test to bgp test suite

Change-Id: I97f34bcc735dd86af93f35e3e6c296176f2608db
Closes-Bug: 1477669

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/12981
Committed: http://github.org/Juniper/contrail-controller/commit/53a28c1f45754969f33277ff5ac24bd8f449af63
Submitter: Zuul
Branch: R2.20

commit 53a28c1f45754969f33277ff5ac24bd8f449af63
Author: Nischal Sheth <email address hidden>
Date: Tue Aug 11 09:04:35 2015 -0700

Add bgp_show_route_summary_test to bgp test suite

Change-Id: I97f34bcc735dd86af93f35e3e6c296176f2608db
Closes-Bug: 1477669

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

Review in progress for https://review.opencontrail.org/13034
Submitter: Nischal Sheth (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/13035
Submitter: Nischal Sheth (<email address hidden>)

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

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

commit 40a2a9cc78b74868f5f582ab19ef119462715d6a
Author: Nischal Sheth <email address hidden>
Date: Thu Aug 13 09:33:44 2015 -0700

Prevent instance/table from getting deleted while iterating

The call to resume deletion of paused instances and tables happens
in the context of the main thread. That could cause an instance or
table to get deleted via the Bgp::Config Task while the main thread
is iterating over them.

Fix by locking the scheduler when iterating over the instances and
tables.

Change-Id: I056119b72b8136764845c72334d58d8510961918
Closes-Bug: 1477669

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/13035
Committed: http://github.org/Juniper/contrail-controller/commit/ed91468d477acbdfeeb1a0e3386f7a2fc884fec2
Submitter: Zuul
Branch: R2.20

commit ed91468d477acbdfeeb1a0e3386f7a2fc884fec2
Author: Nischal Sheth <email address hidden>
Date: Thu Aug 13 09:33:44 2015 -0700

Prevent instance/table from getting deleted while iterating

The call to resume deletion of paused instances and tables happens
in the context of the main thread. That could cause an instance or
table to get deleted via the Bgp::Config Task while the main thread
is iterating over them.

Fix by locking the scheduler when iterating over the instances and
tables.

Change-Id: I056119b72b8136764845c72334d58d8510961918
Closes-Bug: 1477669

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

Review in progress for https://review.opencontrail.org/13927
Submitter: Vinay Vithal Mahuli (<email address hidden>)

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.