Workarounds to run 9.4 with KVStore on Docker for Mac running on Apple Silicon (M1-M4)
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 32/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- bash, docker, mongodb
- Domain
- databases, devops, operating-systems
Research direction
Start by reproducing Splunk 9.4 KVStore on Docker for Mac with Apple Silicon and review the reported changes to /opt/splunk/bin/mongod, including the mongod-4.2 wrapper and filtered parameter. Check whether the workaround is reproducible and whether a supported compatibility path can be identified. Done requires a clearly documented, validated workaround or compatibility outcome.
Written by the indexing model from the issue text.
Description
Splunk 9.4 uses mongod 7 which does not run under Rosetta2 (see https://www.mongodb.com/community/forums/t/mongo-5-on-apple-m1-laptops-via-docker/136506 )
So by hacking around I kind of made it work by switching back to mongod-4.2
-
Removed mongod link to mongo-7.0 (file /opt/splunk/bin/mongod )
-
Instead wrote a bash script that will pass everything to mongod-4.2 (see below)
-
In bash script get rid of one parameter that is not supported by mongod-4.2 --setParameter=minSnapshotHistoryWindowInSeconds=5
-
Made bash script executable. (chmod +x /opt/splunk/bin/mongod)
Script:
#!/bin/bash
# Define an array to store filtered arguments
filtered_args=()
# Iterate over all input arguments
while [[ $# -gt 0 ]]; do
case "$1" in
--setParameter=minSnapshotHistoryWindowInSeconds=5)
shift # Skip this parameter
;;
*)
filtered_args+=("$1")
shift
;;
esac
done
# Execute /opt/splunk/bin/mongod-4.2 with the filtered arguments
exec /opt/splunk/bin/mongod-4.2 "${filtered_args[@]}"
It seems like that made it to work.
Curious if there are any better workarounds or better compatibility? I know it is not very supported scenario running Splunk under rosetta, but a LOT of developers use it in that configuration.
- Dominant language
- Python
- Stars
- 549
- Forks
- 277
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from splunk/docker-splunk
-
Difficulty 2/5 Half a day Newbie friendliness 78/100
splunk/docker-splunk#730 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
splunk/docker-splunk#737 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
splunk/docker-splunk#732 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
splunk/docker-splunk#731 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
splunk/docker-splunk#724 ·
All issues in splunk/docker-splunk
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100