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

revert wait_for_splunk_instance.yml #833

Merged
merged 9 commits into from
May 15, 2024
Merged

Conversation

jmeixensperger
Copy link
Contributor

@jmeixensperger jmeixensperger commented May 8, 2024

Allows wait_for_splunk_instance.yml to target remote hosts instead of only localhost.

Using the previous uri module also always guarantees a response.status value.

@jmeixensperger jmeixensperger requested a review from a team as a code owner May 8, 2024 22:05
@jmeixensperger jmeixensperger marked this pull request as draft May 8, 2024 22:07
@jmeixensperger jmeixensperger changed the title add remote host var for splunk_api revert wait_for_splunk_instance.yml May 13, 2024
@jmeixensperger jmeixensperger marked this pull request as ready for review May 13, 2024 22:47
@jmeixensperger
Copy link
Contributor Author

Verified that this change works on an S3 SVA (3 search heads w/ shc, 1 indexer, 1 deployer)

@jmeixensperger
Copy link
Contributor Author

@jonathan-vega-splunk I am still seeing the occasional error on deployers when the shc captain is not ready yet (see #824). This seems to occur when the shc captain is in the middle of restarting, however it is NOT caused by the wait_for_splunk_instance.yml error that this PR aims to resolve. We may want to take a look at increasing the retry window for deployers (the retry count and/or the retry delay).

@hendolim
Copy link
Contributor

Can we keep using splunk_api to ensure UDS support. And just fix the url param to accommodate remote instance?

@jmeixensperger
Copy link
Contributor Author

Can we keep using splunk_api to ensure UDS support. And just fix the url param to accommodate remote instance?

There are 2 major reasons I didn't use splunk_api:

  1. This task always targets a remote host, and it is impossible to target remote UDS endpoints. This task is also never called against forwarders.
  2. When targeting remote hosts, splunk_api can break the retry functionality of tasks with statements like changed when: response.status_code == 200 or until: response.status_code == 200. If the target host is unreachable, the first attempt/response does not have a status_code, triggers an ansible failure, and prevents all further retries.

@hendolim
Copy link
Contributor

Can we keep using splunk_api to ensure UDS support. And just fix the url param to accommodate remote instance?

There are 2 major reasons I didn't use splunk_api:

  1. This task always targets a remote host, and it is impossible to target remote UDS endpoints. This task is also never called against forwarders.
  2. When targeting remote hosts, splunk_api can break the retry functionality of tasks with statements like changed when: response.status_code == 200 or until: response.status_code == 200. If the target host is unreachable, the first attempt/response does not have a status_code, triggers an ansible failure, and prevents all further retries.

Good callout on 1. I totally forgot about that. When I was debugging this, it appeared as if it is waiting for itself to come up rather than a remote instance, so I was under the impression that the task applies generically for both local and remote host. We might need to clarify the task name or put a comment

hendolim
hendolim previously approved these changes May 14, 2024
hendolim
hendolim previously approved these changes May 14, 2024
ruomeiy-splunk
ruomeiy-splunk previously approved these changes May 14, 2024
@jmeixensperger jmeixensperger merged commit f1cb630 into develop May 15, 2024
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.

3 participants