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

Backport PR #14018 to 7.17: Fix stopped pipeline unable to be deleted in registry #14033

Merged
merged 2 commits into from
Apr 27, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Backport PR #14018 to 7.17 branch, original message:


Release notes

What does this PR do?

This commit makes the stop and delete pipeline action into a single action to make sure the running pipeline is deleted in registry if central pipeline management delete and recreate pipelines in short period of time

Why is it important/What is the impact to the user?

Prior to this change, when the source (central pipeline management / kibana) delete a pipeline, the Logstash pipeline state transforms from stop to delete in two converge cycles. If the source recreates the same pipeline between the cycles, the stop pipeline cannot be deleted in registry because Logstash see them as graceful finish.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files (and/or docker env variables)
  • I have added tests that prove my fix is effective or that my feature works

Author's Checklist

  • [ ]

How to test this PR locally

  1. In Kibana > Logstash pipelines, create a test pipeline
  2. Logstash start with xpack
  3. Delete test pipeline in Kibana. Logstash will delete test pipeline in the coming converge cycle. The log show test in non_running_pipelines
  4. Before the next converge cycle (default 5s), recreate test in Kibana with the same definition
  5. Logstash show test in running_pipelines and the test pipeline is running

Related issues

Fixed: #14017
Relates: #12414

Use cases

Screenshots

Logs

Prior to the change, pipeline `stop` and `delete` happen in two converge cycles, which
has a gap letting the stopped pipeline compare with the same pipeline definition
in central pipeline management, hence Logstash see the stopped pipeline as graceful finish
and not to delete in registry

This commit creates StopAndDelete action to delete running pipeline in one converge cycle

Fixed: #14017
(cherry picked from commit e8cd0d3)
@kaisecheng kaisecheng merged commit fe5172b into 7.17 Apr 27, 2022
@jsvd jsvd deleted the backport_14018_7.17 branch July 18, 2022 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants