Skip to content

Commit

Permalink
Merge pull request #1048 from Niklaus-xie/zte-pike-2020-1203
Browse files Browse the repository at this point in the history
Zte pike 2020 1203
  • Loading branch information
Niklaus-xie authored Dec 4, 2020
2 parents d5e264f + dc35218 commit e8d9a53
Show file tree
Hide file tree
Showing 9 changed files with 851 additions and 180 deletions.
21 changes: 21 additions & 0 deletions docs/RELEASE-NOTES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,27 @@
Release Notes
=============

v312.4.1 (Pike)
--------------

Added Functionality
```````````````````
* member creation
* performance improvement
* refresh agent
* pass port id argument


Bug Fixes
`````````
* None noted.


Limitations
```````````
* None noted.


v312.2.0 (Pike)
--------------

Expand Down
2 changes: 1 addition & 1 deletion f5lbaasdriver/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "312.2.0"
__version__ = "312.4.1"
8 changes: 6 additions & 2 deletions f5lbaasdriver/v2/bigip/agent_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,18 @@ def delete_pool(self, context, pool, service, host):
topic=topic)

@log_helpers.log_method_call
def create_member(self, context, member, service, host):
def create_member(
self, context, member, service, host,
the_port_id=None
):
topic = '%s.%s' % (self.topic, host)
return self.cast(
context,
self.make_msg(
'create_member',
member=member,
service=service
service=service,
the_port_id=the_port_id
),
topic=topic)

Expand Down
11 changes: 9 additions & 2 deletions f5lbaasdriver/v2/bigip/agent_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,12 @@ def schedule(self, plugin, context, loadbalancer_id, env=None):
"""

with context.session.begin(subtransactions=True):
loadbalancer = plugin.db.get_loadbalancer(context, loadbalancer_id)
# If the loadbalancer is hosted on an active agent
# already, return that agent or one in its env
lbaas_agent = self.get_lbaas_agent_hosting_loadbalancer(
plugin,
context,
loadbalancer.id,
loadbalancer_id,
env
)

Expand All @@ -205,6 +204,14 @@ def schedule(self, plugin, context, loadbalancer_id, env=None):
% (lbaas_agent['id']))
return lbaas_agent

# moving this part here so that this db call basically only called
# while creating lb. If it was for creating lb, then this call
# returns immediately. For other ops, it should have returned
# already above, so this db call is avoided.
LOG.info('get_loadbalancer start inside schedule')
loadbalancer = plugin.db.get_loadbalancer(context, loadbalancer_id)
LOG.info('get_loadbalancer end inside schedule')

# There is no existing loadbalancer agent binding.
# Find all active agent candidates in this env.
# We use environment_prefix to find F5® agents
Expand Down
Loading

0 comments on commit e8d9a53

Please sign in to comment.