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

NAS-129867 / 24.10 / setup HA middleware connection on service restart #13971

Merged
merged 1 commit into from
Jul 3, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,12 @@ def sync(self, iface, internal_ip):
async def post_sync(self, internal_ip):
if self.http_site is None:
self.http_site = await self.middleware.start_tcp_site(internal_ip)


async def setup(middleware):
# on HA systems, we bind ourselves on 127.0.0.1:6000, however
# often times developers/CI/CD do `systemctl restart middlewared`
# which will tear down the local listening socket so we need to
# be sure and set it up everytime middleware starts. This is a
# NO-OP otherwise.
await middleware.call('failover.internal_interface.pre_sync')
Loading