Skip to content

Commit

Permalink
Sync config parameters and make same privatedir key name (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
juztas authored Aug 2, 2023
1 parent 5ba515e commit b60ca21
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packaging/siterm-site-agent/scripts/siterm-prompush
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class MyDaemon(Daemon):
def getThreads(self):
"""Multi threading. Allow multiple sites under single FE"""
outThreads = {}
workDir = self.config.get('general', 'private_dir') + "/SiteRM/background/"
workDir = self.config.get('general', 'privatedir') + "/SiteRM/background/"
# get run ID;
fname = workDir + f"/background-process-{self.inargs.runnum}.json"
if not os.path.isfile(fname):
Expand Down
2 changes: 1 addition & 1 deletion packaging/siterm-site-fe/scripts/siterm-prompush
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class MyDaemon(Daemon):
def getThreads(self):
"""Multi threading. Allow multiple sites under single FE"""
outThreads = {}
workDir = self.config.get('general', 'private_dir') + "/SiteRM/background/"
workDir = self.config.get('general', 'privatedir') + "/SiteRM/background/"
# get run ID;
fname = workDir + f"/background-process-{self.inargs.runnum}.json"
if not os.path.isfile(fname):
Expand Down
2 changes: 1 addition & 1 deletion src/python/SiteFE/SNMPMonitoring/snmpmon.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def _promBackground(self, host):

def _checkBackgroundProcesses(self, item):
"""Start Background work, like prometheus push"""
workDir = self.config.get('general', 'private_dir') + "/SiteRM/background/"
workDir = self.config.get('general', 'privatedir') + "/SiteRM/background/"
createDirs(workDir)
fname = workDir + f"/background-process-{item['id']}.json"
if not os.path.isfile(fname):
Expand Down
2 changes: 1 addition & 1 deletion src/python/SiteRMAgent/Debugger/Debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def publishToFE(self, inDic):

def _startbackgroundwork(self, item):
"""Start Background work, like prometheus push, arppush"""
workDir = self.config.get('general', 'private_dir') + "/SiteRM/background/"
workDir = self.config.get('general', 'privatedir') + "/SiteRM/background/"
createDirs(workDir)
fname = workDir + f"/background-process-{item['id']}.json"
if not os.path.isfile(fname):
Expand Down
2 changes: 1 addition & 1 deletion src/python/SiteRMAgent/RecurringActions/DTNMain.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def appendConfig(self, dic):
def startwork(self):
"""Execute main script for SiteRM Agent output preparation."""

workDir = self.config.get('general', 'private_dir') + "/SiteRM/"
workDir = self.config.get('general', 'privatedir') + "/SiteRM/"
createDirs(workDir)
dic, excMsg = self.prepareJsonOut()
fullUrl = getFullUrl(self.config, self.sitename)
Expand Down
2 changes: 1 addition & 1 deletion src/python/SiteRMAgent/Ruler/Ruler.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Ruler(contentDB, QOS, OverlapLib):
def __init__(self, config, sitename):
self.config = config if config else getGitConfig()
self.logger = getLoggingObject(config=self.config, service='Ruler')
self.workDir = self.config.get('general', 'private_dir') + "/SiteRM/RulerAgent/"
self.workDir = self.config.get('general', 'privatedir') + "/SiteRM/RulerAgent/"
createDirs(self.workDir)
self.fullURL = getFullUrl(self.config, sitename)
self.hostname = self.config.get('agent', 'hostname')
Expand Down
4 changes: 2 additions & 2 deletions src/python/SiteRMLibs/MainUtilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def presetAgentDefaultConfigs(self):
"""Preset default config parameters for Agent"""
defConfig = {'MAIN': {'general': {'logDir': '/var/log/siterm-agent/',
'logLevel': 'INFO',
'private_dir': '/opt/siterm/config/'},
'privatedir': '/opt/siterm/config/'},
'agent': {'norules': False,
'rsts_enabled': 'ipv4,ipv6'},
'qos': {'policy': 'default-not-set',
Expand Down Expand Up @@ -398,7 +398,7 @@ def presetFEDefaultConfigs(self):
"""Preset default config parameters for FE"""
defConfig = {'MAIN': {'general': {'logDir': '/var/log/siterm-site-fe/',
'logLevel': 'INFO',
'private_dir': '/opt/siterm/config/'},
'privatedir': '/opt/siterm/config/'},
'ansible': {'private_data_dir': '/opt/siterm/config/ansible/sense/',
'inventory': '/opt/siterm/config/ansible/sense/inventory/inventory.yaml',
'rotate_artifacts': 100,
Expand Down

0 comments on commit b60ca21

Please sign in to comment.