casper-network / casper-network/casper-node

nctl-assets-setup generates incorrect supervisord.conf

Open
#4,194 0 comments 0 reactions 0 assignees View on GitHub
nctl
Dominant language
Rust
Stars
399
Forks
224
Avg merge
15h 44m
Merged PRs (30d)
2

Description

When I run `nctl-assets-setup nodes=2`, this section in _assets/net-1/daemon/config/supervisord.conf_ is incorrect, so `supervisord` can't be started:

```
[group:validators-2]
programs=casper-net-1-node-4casper-net-1-node-3casper-net-1-node-2
```

It is also incorrect for nodes=3:

```
[group:validators-2]
programs=casper-net-1-node-4casper-net-1-node-3
```

I propose a fix:

```
--- a/utils/nctl/sh/utils/infra.sh
+++ b/utils/nctl/sh/utils/infra.sh
@@ -284,6 +284,9 @@ function get_process_group_members()
elif [ "$PROCESS_GROUP" == "$NCTL_PROCESS_GROUP_2" ]; then
SEQ_START=$(($(get_count_of_bootstrap_nodes) + 1))
SEQ_END=$(get_count_of_genesis_nodes)
+ if [ "$SEQ_END" -lt "$SEQ_START" ]; then
+ SEQ_END=${SEQ_START}
+ fi

elif [ "$PROCESS_GROUP" == "$NCTL_PROCESS_GROUP_3" ]; then
SEQ_START=$(($(get_count_of_genesis_nodes) + 1))
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.