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

Enforces an exact match of replica processes #5732

Merged
merged 3 commits into from
Nov 6, 2024
Merged

Conversation

yhabib
Copy link
Contributor

@yhabib yhabib commented Nov 6, 2024

Motivation

A script runs pgrep -l replica to check for replica processes, but it can't receive false positives from a process called replicatord.

$ pgrep -l replica
781 replicatord
95113 replica

Changes

  • The script checks for exact matches with the keyword replica.

Tests

I couldn't run the script that starts the snapshot without this change because it was complaining about a process (replicatord) matching the pattern. This change allowed me to run it without issues. I also tried to start a second snapshot, and it correctly informed me that a replica was already running.

Todos

  • Add entry to changelog (if necessary) - Not necessary

@yhabib yhabib requested a review from a team as a code owner November 6, 2024 12:26
yhabib added a commit to dfinity/snsdemo that referenced this pull request Nov 6, 2024
A script runs `pgrep -l replica` to check for replica processes, but it
can't receive false positives from a process called `replicatord`.

Eg:

```sh
$ pgrep -l replica
781 replicatord
95113 replica
```

This change allowed me to run it without issues. I also tried to start a
second snapshot, and it correctly informed me that a replica was already
running.

Related to dfinity/nns-dapp#5732
@yhabib yhabib force-pushed the fix/snapshot-start-script branch from d890209 to 34063fc Compare November 6, 2024 13:50
@yhabib yhabib added this pull request to the merge queue Nov 6, 2024
Merged via the queue into main with commit 86de7da Nov 6, 2024
30 checks passed
@yhabib yhabib deleted the fix/snapshot-start-script branch November 6, 2024 15:37
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

Successfully merging this pull request may close these issues.

2 participants