Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(not merge this until at least Monday)add another switch to control #1036

Open
wants to merge 1 commit into
base: h3c-pike
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions f5lbaasdriver/v2/bigip/driver_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@
default=0,
help=('switch driver performance mode from 0 to 3')
),
cfg.BoolOpt(
'fetch_fresh_db_members',
default=True,
help=('If True, fetch fresh members from db in _get_members,'
'if set to False, skip the fetch')
),
cfg.StrOpt(
'f5_loadbalancer_pool_scheduler_driver_v2',
default=(
Expand Down
5 changes: 4 additions & 1 deletion f5lbaasdriver/v2/bigip/service_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,9 @@ def _get_members(self, context, loadbalancer, pools,
pool_members = []

def get_db_members():
if cfg.CONF.f5_driver_perf_mode in (1, 3):
if cfg.CONF.f5_driver_perf_mode in (1, 3) \
and not cfg.CONF.fetch_fresh_db_members:
LOG.debug('inside this logic')
members = []
for p1 in loadbalancer.pools:
for p2 in pools:
Expand All @@ -632,6 +634,7 @@ def get_db_members():
LOG.info(members)
return members
else:
LOG.debug('getting the db members')
return self.plugin.db.get_pool_members(
context,
filters={'pool_id': [p['id'] for p in pools]}
Expand Down