Force to close http connection after notify about HA router status
Neutron-keepalived-state-change-monitor process is using HTTP to notify L3 agent that state of the HA router was changed. It is done through unix socket. With HTTP 1.1 connection isn't closed properly and if router's state was changed more than once in short time, it could happen that wsgi worker on the L3 agent's side didn't process second request at all. That caused problem with transitioning router to master state after creation. Request to close connection should be explicitly defined in the header [1] and this patch adds "connection: close" header to the headers send in such request to do exactly that. [1] https://www.geeksforgeeks.org/http-headers-connection/ Closes-Bug: #1923633 Change-Id: Ic08ca5b167db4884efa07112cf9a6c3637e1b827
This commit is contained in:
parent
f042d690be
commit
976cba6133
|
@ -150,7 +150,8 @@ class MonitorDaemon(daemon.Daemon):
|
|||
# the URL doesn't matter.
|
||||
'http://127.0.0.1/',
|
||||
headers={'X-Neutron-Router-Id': self.router_id,
|
||||
'X-Neutron-State': state},
|
||||
'X-Neutron-State': state,
|
||||
'Connection': 'close'},
|
||||
connection_type=KeepalivedUnixDomainConnection)
|
||||
|
||||
if resp.status != 200:
|
||||
|
|
Loading…
Reference in New Issue