Skip to content

Commit

Permalink
noprompt outputs less warnings (arkime#2633)
Browse files Browse the repository at this point in the history
  • Loading branch information
awick authored Feb 8, 2024
1 parent 0c2d014 commit fcec2af
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ NOTICE: Create a parliament config file before upgrading (see https://arkime.com
5.0.1 2024/02/xx
## Viewer
- #2631 upgrade cyberchef to 10.6.0
- #2632 fix field labels not expanding fully

## db.pl
- #2633 noprompt outputs less warnings

5.0.0 2024/02/06
## BREAKING
Expand Down
12 changes: 7 additions & 5 deletions db/db.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7743,11 +7743,13 @@ sub dataNodes

my $nodes = esGet("/_nodes");
$main::numberOfNodes = dataNodes($nodes->{nodes});
logmsg "It is STRONGLY recommended that you stop ALL Arkime captures and viewers before proceeding. Use 'db.pl ${main::elasticsearch} backup' to backup db first.\n\n";
if ($main::numberOfNodes == 1) {
logmsg "There is $main::numberOfNodes OpenSearch/Elasticsearch data node, if you expect more please fix first before proceeding.\n\n";
} else {
logmsg "There are $main::numberOfNodes OpenSearch/Elasticsearch data nodes, if you expect more please fix first before proceeding.\n\n";
if ($ARGV[1] !~ /noprompt$/) {
logmsg "It is STRONGLY recommended that you stop ALL Arkime captures and viewers before proceeding. Use 'db.pl ${main::elasticsearch} backup' to backup db first.\n\n";
if ($main::numberOfNodes == 1) {
logmsg "There is $main::numberOfNodes OpenSearch/Elasticsearch data node, if you expect more please fix first before proceeding.\n\n";
} else {
logmsg "There are $main::numberOfNodes OpenSearch/Elasticsearch data nodes, if you expect more please fix first before proceeding.\n\n";
}
}

if (int($SHARDS) > $main::numberOfNodes) {
Expand Down

0 comments on commit fcec2af

Please sign in to comment.