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

don't throw an exception when canceling playbook if play execution was already completed #410

Merged
merged 2 commits into from
Jun 8, 2022

Conversation

dangel101
Copy link
Member

In some cases play execution is completed, but host deploy process is still running and parsing events.
In such case if the timeout was reached, an attempt to cancel the playbook will fail because the play process
no longer exists.
In cases where the command to cancel the playbook fails, an error will be logged with both host-deploy and
stdout logs.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=2087738

…s already completed

In some cases play execution is completed, but host deploy process is still running and parsing events.
In such case if the timeout was reached, an attempt to cancel the playbook will fail because the play process
no longer exists.
In cases where the command to cancel the playbook fails, an error will be logged with both host-deploy and
stdout logs.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=2087738
// if play execution was already completed, the command fails.
} catch (IOException e) {
log.error(String.format("Failed to execute call to cancel playbook. %1$s, %2$s ",
output.toString(), Paths.get(this.getJobEventsDir(uuid.toString()) + "../stdout")));
Copy link
Member

Choose a reason for hiding this comment

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

Please reformat to make more readable and add full stacktrace to debug log:

            log.error(String.format("Failed to execute call to cancel playbook. %1$s, %2$s../stdout ",
                    output.toString(), 
                    Paths.get(this.getJobEventsDir(uuid.toString()))));
            log.debug("Exception:", e);

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Copy link
Member

@mwperina mwperina left a comment

Choose a reason for hiding this comment

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

+1

@mwperina mwperina merged commit a2348f7 into oVirt:master Jun 8, 2022
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