Skip to content

Commit d7dac3f

Browse files
committed
Updated README.md to add mention of the os.unsetenv('LD_LIBRARY_PATH') issue
Added sort_keys to splunkversioncontrol_backup_class.py to attempt to reduce git size over time
1 parent e103205 commit d7dac3f

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ On a Linux-based system
8282

8383
Or the internal index which also has these log files
8484

85+
## Troubleshooting
86+
In some Linux OS distributions an error similar to `OPENSSL_1.0.0 not found` may appear, `os.unsetenv('LD_LIBRARY_PATH')` appears to fix this however AppInspect does not allow modification of OS environment variables.
87+
88+
If you have this issue please add this into the python files to workaround the problem as required
89+
Refer to [this issue on github](https://github.com/gjanders/SplunkVersionControl/issues/3) for more details
90+
8591
## Will this work on a search head cluster?
8692
No, modular inputs run on each member at the same time which would not work well...however you can use a standalone server to backup/restore to a search head cluster.
8793
You could also run the input on a single search head cluster member but this is not a recommended solution

SplunkVersionControl.tgz

203 Bytes
Binary file not shown.

bin/splunkversioncontrol_backup_class.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -360,23 +360,23 @@ def runQueries(self, app, endpoint, type, fieldIgnoreList, aliasAttributes={}, v
360360
if not os.path.isdir(globalStorageDir):
361361
os.mkdir(globalStorageDir)
362362
with open(globalStorageDir + "/" + type, 'w') as f:
363-
json.dump(infoList["global"], f)
363+
json.dump(infoList["global"], f, sort_keys=True)
364364
if infoList.has_key("app"):
365365
#persist app level to disk
366366
appLevelStorageDir = appStorageDir + "/app"
367367
logger.debug("i=\"%s\" Now persisting with knowledge objects of type=%s with sharing=app in app=%s into dir=%s" % (self.stanzaName, type, app, appLevelStorageDir))
368368
if not os.path.isdir(appLevelStorageDir):
369369
os.mkdir(appLevelStorageDir)
370370
with open(appLevelStorageDir + "/" + type, 'w') as f:
371-
json.dump(infoList["app"], f)
371+
json.dump(infoList["app"], f, sort_keys=True)
372372
if infoList.has_key("user"):
373373
#persist user level to disk
374374
userLevelStorageDir = appStorageDir + "/user"
375375
logger.debug("i=\"%s\" Now persisting with knowledge objects of type=%s sharing=user (private) in app=%s into dir=%s" % (self.stanzaName, type, app, userLevelStorageDir))
376376
if not os.path.isdir(userLevelStorageDir):
377377
os.mkdir(userLevelStorageDir)
378378
with open(userLevelStorageDir + "/" + type, 'w') as f:
379-
json.dump(infoList["user"], f)
379+
json.dump(infoList["user"], f, sort_keys=True)
380380
return creationSuccess
381381

382382
###########################
@@ -509,23 +509,23 @@ def macros(self, app):
509509
if not os.path.isdir(globalStorageDir):
510510
os.mkdir(globalStorageDir)
511511
with open(globalStorageDir + "/macros", 'w') as f:
512-
json.dump(macros["global"], f)
512+
json.dump(macros["global"], f, sort_keys=True)
513513
if macros.has_key("app"):
514514
logger.debug("i=\"%s\" Now persisting knowledge objects of type=macro with sharing=app in app=%s" % (self.stanzaName, app))
515515
#persist app level to disk
516516
appLevelStorageDir = appStorageDir + "/app"
517517
if not os.path.isdir(appLevelStorageDir):
518518
os.mkdir(appLevelStorageDir)
519519
with open(appLevelStorageDir + "/macros", 'w') as f:
520-
json.dump(macros["app"], f)
520+
json.dump(macros["app"], f, sort_keys=True)
521521
if macros.has_key("user"):
522522
logger.debug("i=\"%s\" Now persisting knowledge objects of type=macro with sharing=user (private) in app %s" % (self.stanzaName, app))
523523
#persist user level to disk
524524
userLevelStorageDir = appStorageDir + "/user"
525525
if not os.path.isdir(userLevelStorageDir):
526526
os.mkdir(userLevelStorageDir)
527527
with open(userLevelStorageDir + "/macros", 'w') as f:
528-
json.dump(macros["user"], f)
528+
json.dump(macros["user"], f, sort_keys=True)
529529

530530
return macroCreationSuccess
531531

default/app.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ label = SplunkVersionControl
1212
[launcher]
1313
author = Gareth Anderson
1414
description = Version Control software for Splunk instances (backup/restore from git)
15-
version = 0.0.4
15+
version = 0.0.6
1616

1717
[package]
1818
id = SplunkVersionControl

0 commit comments

Comments
 (0)