splunk / splunk/docker-splunk

Splunk Search Heads fail to start in Docker Swarm

Open
#534 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
549
Forks
277
Avg merge
3d 9h
Merged PRs (30d)
2

Description

Issue Description:

So I have been experimenting with docker swarm and run into an issue where splunk containers with role: search_head or search_head captain fail to start in a docker swarm environment.

Project Codebase:

https://github.com/rskntroot/splunk

NOTE: I understand that splunk in docker swarm is unsupported for a reason.

NOTE: I have managed to get a 3x [search_head] 1x [deployer] 1x [indexer] setup to work fully in docker swarm with the following workaround

Work Around: **
  • [deployer] and [indexer] were configured with environment variables & defaults.yml
  • [search_head] containers were deployed without a role and then manually configured for shc

During testing of the workaround I have found that:

  • search functionality, working as expected.
  • app deployment, working as expected.
  • artifact replication, working as expected.
    Issues with workaround:
  • Splunk search head configuration does not persist in the event the docker container fails (it will be rebuilt with no role)

Conclusion:

Pre workaround: I was able to docker exec into a search container and unable to connect to the other search nodes. No issues with connecting to the deployer or indexer.

It seems that the splunk-ansible configurations do not put the container in a state where docker swarm will publish the containers IP to docker DNS.

I'm at wits-end on this one and was wondering if anyone wants to give me some pointers on how to create an ansible playbook for this case 🤷🏻‍♂️ (setting docker state is handled in entrypoint.sh)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing entrypoint.sh, defaults.yml, and the splunk-ansible configuration involved when search_head or search_head captain containers start in Docker Swarm. Compare the configured and manually configured deployments, then determine what change would preserve search head configuration and allow the search nodes to connect through Docker DNS.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, docker, python
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.