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

nodemanager needlessly respawns advertise threads #94

Open
aaaaalbert opened this issue Jun 20, 2014 · 0 comments
Open

nodemanager needlessly respawns advertise threads #94

aaaaalbert opened this issue Jun 20, 2014 · 0 comments
Assignees

Comments

@aaaaalbert
Copy link
Contributor

The main nodemanager thread includes logic to ensure that the helper threads it requires for functioning correctly keep running at all times. There is an accepter thread taking care of experimenters connecting to vessels, a status monitoring thread for vessels, and also an advertisement thread that announces the node and its vessels under the associated user/node/testbed public keys.
Previously, issue #60 (and #93) described a problem with the advertise thread that would occur on nodes that went offline and online again (like my laptop).

Here's a synopsis of what happens. The advertise thread takes diverse public keys and advertises the node's "name" per the variable myname under it. The existing logic was introduced by and large in SVN r11 (!) already. It assumes that myname is the node's IP address, so whenever it changes, a new advertise thread is spawned that advertises the new name. (Back when most Seattle nodes never changed IP addresses, this would hardly ever happen.) While there exists a function to check for the existence of a previous advertise thread, is_advert_thread_started(), it is never called, and new threads spawned regardless. This is an obvious bug that requires fixing.

Furthermore, now that we incorporate Affix into the nodemanager, myname has become a static string, sha_hash(node_pubkey) + "zenodotus.poly.edu", and we advertise the current IP pointed to my myname separately (not in the advertise thread). Thus, the advertise thread can continue to announce what it has, and IP address changes will be addressed in a different part of the logic.

@aaaaalbert aaaaalbert self-assigned this Jun 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant