Skip to content

Commit

Permalink
Revert method: Change availability zone back
Browse files Browse the repository at this point in the history
Don't log the current LB's AZ, since that would be one additional DB
query, and the new AZ has already been logged by the execute method.
  • Loading branch information
BenjaminLudwigSAP committed Jan 23, 2025
1 parent 220cc1a commit dfb914b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions octavia_f5/api/drivers/f5_driver/tasks/reschedule_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ def revert(self, result, load_balancer: models.LoadBalancer, candidate: str, rem
LOG.error("RewriteLoadBalancerEntry: Unable to update loadbalancer %s",
load_balancer.id)
return
LOG.warning("RewriteLoadBalancerEntry: Reverting host change of loadbalancer %s from '%s' to '%s'",
load_balancer.id, candidate, removal_host)
self._loadbalancer_repo.update(db_apis.get_session(), load_balancer.id, server_group_id=removal_host)

LOG.warning("RewriteLoadBalancerEntry: Reverting host change of loadbalancer %s: Changing host from '%s' to '%s' and availability zone back to '%s'.",
load_balancer.id, candidate, removal_host, load_balancer.availability_zone)
self._loadbalancer_repo.update(db_apis.get_session(), load_balancer.id,
server_group_id=removal_host, availability_zone=load_balancer.availability_zone)

0 comments on commit dfb914b

Please sign in to comment.