Skip to content

Allow passing list of nodes to :amoc_dist.do for distributed test #192

Description

@probably-not

Currently, AMoC does not allow telling :amoc_dist setting up a cluster dynamically - nodes are expected to be explicitly listed in the AMOC_NODES environment variable. The :amoc_cluster module and :amoc_dist don't expect clusters to be dynamic, the list of nodes should be static at startup when the :amoc_cluster genserver starts up.

With clusters that are created ad-hoc, and not ahead of time with known node names, it would be useful to allow telling :amoc_dist which nodes to run on and allow :amoc_cluster to enable building a dynamic cluster.

The current workaround that I've found is to run something like this:

# On each node to use as an amoc runner node
:pg.join(:amoc_runner_nodes, self())

# On the master node
runner_nodes = :pg.get_members(:amoc_runner_nodes)
## :amoc_cluster is marked as private and is undocumented
:ok = :amoc_cluster.connect_nodes(runner_nodes)
:amoc_dist.do(scenario, user_count, settings)

Ideally, the API for :amoc_dist would allow us to do something like:

:amoc_dist.do(scenario, user_count, settings, node_list)

which would allow a cluster to be dynamically created.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions