Skip to content

Determine the most recently created node of hostname in a way that supports multiple nomad servers #11

@mattyg

Description

@mattyg

A user sets their nomad node's hostname when they create it. This is the node Name that we get from the nomad api query. Thus multiple users can create multiple nodes with the same name, or a single user can remove and recreate a node with the same name.

Thus we have some logic for selecting the most recently created node with a hostname. That node's status is displayed in the web interface when the hostname is entered.

Currently the logic selects the most recent node by its CreateIndex, which is a raft index This is accurate because all nodes are created on a single nomad server. If we add multiple nomad servers in holochain/nomad-server#4, it may no longer be accurate.

In that case we will need to refactor. I'm not sure the best approach. One option could be to use the CreateTime to determine which is the most recent. This requires an additional nomad api request to get detailed info about each node.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Ready for refinement

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions