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

Continual re-initialization of zeroconf every 5 seconds #8852

Closed
marcellamaki opened this issue Dec 7, 2021 · 1 comment · Fixed by #8865
Closed

Continual re-initialization of zeroconf every 5 seconds #8852

marcellamaki opened this issue Dec 7, 2021 · 1 comment · Fixed by #8865
Assignees
Labels
P0 - critical Priority: Release blocker or regression
Milestone

Comments

@marcellamaki
Copy link
Member

https://www.notion.so/learningequality/BUG-Continual-re-initialization-of-zeroconf-every-5-seconds-9d6917de73024f00b106b50251eff2be

The log files on my Windows machine show "New addresses detected since zeroconf was initialized, updating now" messages every 5 seconds. I added additional logging to the following code:

logger.info(
    "New addresses detected since zeroconf was initialized, updating now"
)
logger.info("Old list: " + str(self.broadcast.addresses))
logger.info("New list: " + str(set(get_all_addresses())))

which shows that the zeroconf-internal list has stripped out the link-local addresses and so the comparison is never true:

INFO 2021-12-07 11:07:22,701 kolibri.utils.server New addresses detected since zeroconf was initialized, updating now
INFO 2021-12-07 11:07:22,702 kolibri.utils.server Old list: {'172.24.32.1', '192.168.137.1', '6.5.75.243', '172.22.48.1', '127.0.0.1'}
INFO 2021-12-07 11:07:22,709 kolibri.utils.server New list: {'172.24.32.1', '169.254.148.11', '169.254.117.77', '169.254.203.37', '192.168.137.1', '10.0.85.2', '169.254.181.43', '6.5.75.243', '127.0.0.1', '169.254.173.0', '169.254.226.233', '172.22.48.1', '169.254.22.56', '169.254.14.241'}

Proposed solution:

  • Update get_all_addresses to exclude link-local addresses
  • Use a local cache of the address list on the ZeroConfPlugin as an additional less brittle way of detecting changes
@marcellamaki marcellamaki added this to the 0.15.0 milestone Dec 7, 2021
@rtibbles rtibbles added the P0 - critical Priority: Release blocker or regression label Dec 7, 2021
@rtibbles
Copy link
Member

rtibbles commented Dec 7, 2021

Seems likely that this is causing global issues on the windows installer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 - critical Priority: Release blocker or regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants