Closed Miciah closed 8 years ago
@Miciah Looks good to me sir, besides the one small comment I made.
I looked over the RoutingDaemon
with these changes in mind too and I don't see it affecting anything there. Fairly confident that there aren't any other issues, although I havn't tested it myself.
Thanks!
[merge] please!
Online Merge Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/test_pull_requests/9346/) (Image: devenv_5808)
Evaluated for online merge up to d3465c76aa588f100ebbaeb1fd4ff8765edaa8f1
Resynchronize the routing daemon with the load balancer when the daemon attempts to perform on operation on an unrecognized pool or pool member.
The intention of this commit is to improve the daemon's reliability when something other than the current instance of the daemon changes the load balancer's state, for example the system administrator or clustered routing daemons.
AsyncLoadBalancerController::Pool
,BatchedLoadBalancerController::Pool
,LoadBalancerController::Pool
,SimpleLoadBalancerController::Pool
: Addsynch
method.AsyncLoadBalancerController
,BatchedLoadBalancerController
,LoadBalancerController
,SimpleLoadBalancerController
: Addsynch_pools
method.RoutingDaemon
: Addwith_pool
method, which checks whether a pool exists, resynchronizes the daemon with the load balancer if it is not found (using the newsynch_pools
controller method), optionally creates the pool if it is still not found, and invokes the supplied block if the pool is found.RoutingDaemon#create_application
: Takepool_name
as a parameter rather than generating the value itself since callers will already have generated the value themselves.RoutingDaemon#delete_application
,RoutingDaemon#add_endpoint
,RoutingDaemon#remove_endpoint
,RoutingDaemon#add_alias
,RoutingDaemon#remove_alias
,RoutingDaemon#add_ssl
,RoutingDaemon#remove_ssl
: Use the daemon's newwith_pool
method in order to check whether the pool exists, esynchronize the daemon with the load balancer if an operation is attempted on an unrecognized pool, and (in the case of add methods) create the pool if it does not exist.RoutingDaemon#remove_endpoint
: Use the controller's newsynch
method for pools to resynchronize the daemon with the load balancer if the operation is attempted on an unknown pool member.