Skip to content

Commit 81b552d

Browse files
authored
CSPL-2088: [Splunk 9.0.x]KV store fails to come up on a pod reset (#700)
When a Pod resets, a new pod comes up and uses the same persistent `etc` and `var` locations. Pod reset causes the file permissions to change. Open permissions on `var/lib/splunk/kvstore/mongo/splunk.key` causing the Mongod 4.2.17 to come up during the migration path, that way the mongod is marked to start with 3.6.x, and that fails forever as the existing mongod db is already 4.2.x compatiable.
1 parent 2b6e92b commit 81b552d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

roles/splunk_common/tasks/get_splunk_status.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
---
2+
- name: "Restrict permissions on splunk.key for Status"
3+
include_tasks: restrict_permissions.yml
4+
vars:
5+
file_path: "{{ item }}"
6+
with_items:
7+
- "{{ splunk.home }}/var/lib/splunk/kvstore/mongo/splunk.key"
8+
29
- name: Get Splunk status
310
command: "{{ splunk.exec }} status --accept-license --answer-yes --no-prompt"
411
become: yes

roles/splunk_common/tasks/restrict_permissions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
- name: "Restrict permissions on {{ file_path }}"
1212
file:
13-
mode: "go-rwx"
13+
mode: u+rw,g-rwx,o-rwx
1414
path: "{{ file_path }}"
1515
become: yes
1616
become_user: "{{ splunk.user }}"

0 commit comments

Comments
 (0)