Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/diracdoctools/Utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def runCommand(command):
universal_newlines=True)
if 'NOTICE:' in result:
lines = []
LOG.warn('NOTICE in output for: %s; cleaning output from datestamp..', command)
LOG.warning('NOTICE in output for: %s; cleaning output from datestamp..', command)
for line in result.split('\n'):
lines.append(re.sub(r"^.*NOTICE: ", "", line))
# if the output is less than 3 lines something went wrong
Expand Down
5 changes: 4 additions & 1 deletion docs/diracdoctools/cmd/codeReference.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/usr/bin/env python
""" create rst files for documentation of DIRAC """

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import os
import shutil
import socket
Expand Down Expand Up @@ -194,7 +196,7 @@ def getmodules(self, abspath, _direc, files):
LOG.debug('Skipping file: %s/%s', abspath, filename)
continue
if 'test' in filename.lower():
LOG.warn("File contains 'test', but is kept: %s/%s", abspath, filename)
LOG.warning("File contains 'test', but is kept: %s/%s", abspath, filename)

if filename != '__init__.py':
packages.append(filename.split('.py')[0])
Expand Down Expand Up @@ -386,5 +388,6 @@ def run(configFile='docs.conf', logLevel=logging.INFO, debug=False, buildType='f
except ImportError:
return 1


if __name__ == '__main__':
sys.exit(run(**(CLParser().optionDict())))
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

__RCSID__ = "$Id$"

from DIRAC import gLogger, exit as DIRACExit
Expand Down
1 change: 1 addition & 0 deletions src/DIRAC/Core/scripts/dirac_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from DIRAC.Core.Utilities.DIRACScript import DIRACScript
from DIRAC.ConfigurationSystem.Client.LocalConfiguration import LocalConfiguration


@DIRACScript()
def main():
localCfg = LocalConfiguration()
Expand Down
1 change: 1 addition & 0 deletions src/DIRAC/Core/scripts/dirac_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import sys

from DIRAC.ConfigurationSystem.Client.LocalConfiguration import LocalConfiguration
Expand Down
8 changes: 4 additions & 4 deletions src/DIRAC/Core/scripts/install_full.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ LocalInstallation
# Flag determining whether the Web Portal will be installed
WebPortal = Yes
WebApp = yes
#
# The following options defined the MySQL DB connectivity
#

# The following options define the DB's connectivity
# For MySQL
Database
{
User = Dirac
Expand All @@ -175,6 +175,7 @@ LocalInstallation
Host = <db host>
Port = <db port>
}
# For ElasticSearch
NoSQLDatabases
{
User = <username>
Expand All @@ -183,4 +184,3 @@ LocalInstallation
Port = <port>
}
}

23 changes: 13 additions & 10 deletions src/DIRAC/FrameworkSystem/Client/ComponentInstaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,9 +561,10 @@ def removeComponentOptionsFromCS(self, system, component, mySetup=None):
if mySetup is None:
mySetup = self.setup

result = self.monitoringClient.getInstallations({'UnInstallationTime': None, 'Instance': component},
{'System': system},
{}, True)
result = self.monitoringClient.getInstallations(
{'UnInstallationTime': None, 'Instance': component},
{'DIRACSystem': system},
{}, True)
if not result['OK']:
return result
installations = result['Value']
Expand All @@ -586,10 +587,11 @@ def removeComponentOptionsFromCS(self, system, component, mySetup=None):
else:
isRenamed = True

result = self.monitoringClient.getInstallations({'UnInstallationTime': None},
{'System': system,
'Module': installation['Component']['Module']},
{}, True)
result = self.monitoringClient.getInstallations(
{'UnInstallationTime': None},
{'System': system, 'DIRACModule': installation['Component']['Module']},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fstagni should it be DIRACSystem here ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed in my open PR.

{},
True)
if not result['OK']:
return result
installations = result['Value']
Expand Down Expand Up @@ -871,9 +873,10 @@ def removeDatabaseOptionsFromCS(self, gConfig_o, system, dbName, mySetup=None):
if mySetup is None:
mySetup = self.setup

result = self.monitoringClient.installationExists({'UnInstallationTime': None},
{'System': system, 'Type': 'DB', 'Module': dbName},
{})
result = self.monitoringClient.installationExists(
{'UnInstallationTime': None},
{'DIRACSystem': system, 'Type': 'DB', 'DIRACModule': dbName},
{})
if not result['OK']:
return result
exists = result['Value']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

__RCSID__ = "$Id$"

from DIRAC.Core.Base.Client import Client, createClient
Expand Down
12 changes: 6 additions & 6 deletions src/DIRAC/FrameworkSystem/DB/InstalledComponentsDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class Component(componentsBase):
'mysql_charset': 'utf8'}

componentID = Column('ComponentID', Integer, primary_key=True)
system = Column('System', String(32), nullable=False)
module = Column('Module', String(32), nullable=False)
system = Column('DIRACSystem', String(32), nullable=False)
module = Column('DIRACModule', String(32), nullable=False)
cType = Column('Type', String(32), nullable=False)

def __init__(self, system=null(), module=null(), cType=null()):
Expand All @@ -56,8 +56,8 @@ def fromDict(self, dictionary):
"""

self.componentID = dictionary.get('ComponentID', self.componentID)
self.system = dictionary.get('System', self.system)
self.module = dictionary.get('Module', self.module)
self.system = dictionary.get('DIRACSystem', self.system)
self.module = dictionary.get('DIRACModule', self.module)
self.cType = dictionary.get('Type', self.cType)

return S_OK('Successfully read from dictionary')
Expand All @@ -72,8 +72,8 @@ def toDict(self, includeInstallations=False, includeHosts=False):
"""

dictionary = {'ComponentID': self.componentID,
'System': self.system,
'Module': self.module,
'DIRACSystem': self.system,
'DIRACModule': self.module,
'Type': self.cType}

if includeInstallations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def export_updateSoftware(self, version, rootPath="", gridVersion=""):
if "WebApp" in extensionList:
extensionList.remove("WebApp")

webPortal = gConfig.getValue('/LocalInstallation/WebApp', False) # this is the new portal
webPortal = gConfig.getValue('/LocalInstallation/WebApp', False)
if webPortal:
if "WebAppDIRAC" not in extensionList:
extensionList.append("WebAppDIRAC")
Expand Down
18 changes: 9 additions & 9 deletions src/DIRAC/FrameworkSystem/Utilities/MonitoringUtilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ def monitorInstallation(componentType, system, component, module=None, cpu=None,
result = monitoringClient.installationExists({'Instance': instance,
'UnInstallationTime': None},
{'Type': componentType,
'System': system,
'Module': module},
'DIRACSystem': system,
'DIRACModule': module},
{'HostName': hostname,
'CPU': cpu})

Expand All @@ -62,8 +62,8 @@ def monitorInstallation(componentType, system, component, module=None, cpu=None,
'InstalledBy': user,
'Instance': instance},
{'Type': componentType,
'System': system,
'Module': module},
'DIRACSystem': system,
'DIRACModule': module},
{'HostName': hostname,
'CPU': cpu},
True)
Expand Down Expand Up @@ -99,9 +99,9 @@ def monitorUninstallation(system, component, cpu=None, hostname=None):
hostname = socket.getfqdn()
instance = component[0: 32]

result = monitoringClient.updateInstallations({'Instance': instance, 'UnInstallationTime': None},
{'System': system},
{'HostName': hostname, 'CPU': cpu},
{'UnInstallationTime': datetime.datetime.utcnow(),
'UnInstalledBy': user})
result = monitoringClient.updateInstallations(
{'Instance': instance, 'UnInstallationTime': None},
{'DIRACSystem': system},
{'HostName': hostname, 'CPU': cpu},
{'UnInstallationTime': datetime.datetime.utcnow(), 'UnInstalledBy': user})
return result
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class LogLevels(object):
DEBUG = logging.DEBUG
VERBOSE = 15
INFO = logging.INFO
WARN = logging.WARN
WARN = logging.WARNING
NOTICE = 35
ERROR = logging.ERROR
ALWAYS = 45
Expand Down
2 changes: 1 addition & 1 deletion src/DIRAC/WorkloadManagementSystem/ConfigTemplate.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Agents
PilotSyncAgent
{
PollingTime = 600
# Directory where the files can be moved. If running on the WebPortal, use /opt/dirac/webRoot/www/pilot
# Directory where the files can be moved. If running on the WebApp, use /opt/dirac/webRoot/www/pilot
SaveDirectory =
# List of locations where to upload the pilot files. Can be https://some.where, or DIRAC SE names.
UploadLocations =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def pilotWrapperScript(pilotFilesCompressedEncodedDict=None,
except Exception as x:
print("tarfile failed with message %%s" %% repr(x), file=sys.stderr)
logger.error("tarfile failed with message %%s" %% repr(x))
logger.warn("Trying tar command (tar -xvf pilot.tar)")
logger.warning("Trying tar command (tar -xvf pilot.tar)")
res = os.system("tar -xvf pilot.tar")
if res:
logger.error("tar failed with exit code %%d, giving up" %% int(res))
Expand Down
Loading