Skip to content

Commit

Permalink
In order to restart the indy_node_control tool when running under sup…
Browse files Browse the repository at this point in the history
…ervisord, we must kill the process. Restarting indy_node_control from a script started by indy_node_control itself causes a hang.

Signed-off-by: Keith Smith <bksmith@us.ibm.com>
  • Loading branch information
Keith Smith committed Feb 18, 2020
1 parent f827364 commit b23d1ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/restart_indy_node_ubuntu1604.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ elif [ "$INDY_CONTROL" = "supervisorctl" ]; then
echo "Starting indy-node"
supervisorctl start indy-node

echo "Restarting agent"
supervisorctl restart indy-node-control
echo "Killing indy-node-control so that it restarts"
kill -9 `supervisorctl pid indy-node-control`

else

Expand Down

2 comments on commit b23d1ec

@esplinr
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Killing the process could result in data corruption in Indy Node that could prevent that node from rejoining consensus, because the audit ledger write is not consistent with the other ledgers. Additional data recovery handling would need to be added to Indy Node for this to be safe: any writes to other ledgers ahead of the latest write to the audit ledger should be discarded.

@smithbk
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Richard, this is killing indy-node-control, not the indy-node process. So this should not affect consensus.

Please sign in to comment.