Fail accumulo-service stop/kill when no service name is given - #6537
Open
DomGarguilo wants to merge 1 commit into
Open
DomGarguilo wants to merge 1 commit into
DomGarguilo wants to merge 1 commit into
Conversation
ddanielr
reviewed
Sep 16, 2026
| if [[ -z $command_name ]]; then | ||
| invalid_args "<command> cannot be empty" | ||
| fi | ||
| if [[ $command_name =~ ^(stop|kill)$ && $all_flag != 'true' && -z $ACCUMULO_CLUSTER_ARG && -z $service_name ]]; then |
Contributor
There was a problem hiding this comment.
Is there a reason not to add this arg check in the logic for the stop_service and kill_service functions?
ddanielr
reviewed
Sep 16, 2026
ddanielr
left a comment
Contributor
There was a problem hiding this comment.
The behavior change is beneficial. I'd switch this PR to the 2.1 branch though.
There was a good bit of work done to make sure the control scripts matched between 2.1 and main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Running
accumulo-service manager stopwithout--allor an instance name silently does nothing. The script:Stopping service process:with a blank name,accumulo-.pid, which doesn't exist,The manager keeps running even though the command reported success. A later start then says manager_default_1 already running. kill has the same problem, with no output at all.
This PR adds a check in
function main()before stop/kill are dispatched. When all of these are true:it exits 1 with this message, followed by the usage text:
Invalid arguments: 'stop' requires --all or a service (e.g. manager_default_1; see 'manager list')
Nothing is stopped, and the user is told what to pass instead.
Also: