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

Attempts aren't failed if the final command fails #16

Closed
vs49688 opened this issue May 23, 2019 · 2 comments
Closed

Attempts aren't failed if the final command fails #16

vs49688 opened this issue May 23, 2019 · 2 comments
Labels
bug Something isn't working priority scheduler
Milestone

Comments

@vs49688
Copy link
Contributor

vs49688 commented May 23, 2019

If onerror == fail and the last command in a job fails, the job scheduler doesn't count it as a failure.

This is a logic error in DefaultJobScheduler.java:

if(au.getAction() == AgentUpdate.Action.Stop) {
	if(cr.index < maxIdx || cr.status != CommandResult.CommandResultStatus.SUCCESS) {
		/* A command has failed and caused the job to stop. */
		ops.updateJobFinished(att, true);
	} else {
		/* We've finished successfully. */
		ops.updateJobFinished(att, false);
	}
}
@vs49688
Copy link
Contributor Author

vs49688 commented May 23, 2019

There's no real way to fix this as the CommandResult structures look the same regardless of the onerror status.

@vs49688 vs49688 mentioned this issue May 23, 2019
18 tasks
@vs49688
Copy link
Contributor Author

vs49688 commented May 23, 2019

Current workaround is to add exec /bin/true as the final command in a planfile

@vs49688 vs49688 added this to the Version 2.0 milestone May 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority scheduler
Projects
None yet
Development

No branches or pull requests

1 participant