Skip to content

Commit edaa878

Browse files
authored
Merge pull request #7923 from fstagni/90_moreAndMore_setup_removals
[9.0] even more setup removals
2 parents 33c4ee7 + c20cf50 commit edaa878

File tree

15 files changed

+28
-53
lines changed

15 files changed

+28
-53
lines changed

.github/workflows/cvmfs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
echo "$CVMFS_PROXY_BASE64" | base64 --decode > cvmfs.proxy
2424
export X509_USER_PROXY=cvmfs.proxy
2525
chmod 600 cvmfs.proxy
26-
ls -l
26+
ls -l
2727
cat cvmfs.proxy
2828
export PATH=/usr/share/miniconda3/bin:/opt/conda/bin/:/opt/conda/condabin:$PATH
2929
type -a openssl

docs/source/AdministratorGuide/Configuration/ConfigurationStructure/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ in the order of preference of the option resolution:
5252
For all the DIRAC commands there is option '-o' defined which takes one configuration option
5353
setting. For example::
5454

55-
dirac-wms-job-submit job.jdl -o /DIRAC/Setup=Dirac-Production
55+
dirac-wms-job-submit job.jdl
5656

5757
*Command line argument specifying a CFG file*
5858
A config file can be passed to any dirac command with the ``--cfg`` flag::

docs/source/AdministratorGuide/Systems/WorkloadManagement/Pilots/index.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,6 @@ A simple example using the LHCbPilot extension follows::
215215
DIRAC_SITE="${i#*=}"
216216
shift
217217
;;
218-
--lhcb-setup=*)
219-
LHCBDIRAC_SETUP="${i#*=}"
220-
shift
221-
;;
222218
--ce-name=*)
223219
CE_NAME="${i#*=}"
224220
shift
@@ -237,8 +233,6 @@ A simple example using the LHCbPilot extension follows::
237233
esac
238234
done
239235

240-
# Default if not given explicitly
241-
LHCBDIRAC_SETUP=${LHCBDIRAC_SETUP:-LHCb-Production}
242236

243237
# JOB_ID is used by when reporting LocalJobID by DIRAC watchdog
244238
#export JOB_ID="$VMTYPE:$VM_UUID"
@@ -270,7 +264,6 @@ A simple example using the LHCbPilot extension follows::
270264

271265
#run the dirac-pilot script
272266
python dirac-pilot.py \
273-
--setup $LHCBDIRAC_SETUP \
274267
--project LHCb \
275268
--Name "$CE_NAME" \
276269
--name "$1" \

docs/source/DeveloperGuide/AddingNewComponents/CheckYourInstallation/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ We will now play with a **dirac.cfg** file. For these exercises you can use the
102102
Try this::
103103

104104
>>> from DIRAC import gConfig
105-
>>> gConfig.getValue('/DIRAC/Setup')
106-
'DeveloperSetup'
105+
>>> gConfig.getValue('/DIRAC/DefaultGroup')
106+
'dirac_user'
107107

108-
Where does 'DeveloperSetup' come from? Open that dirac.cfg and search for it. Got it? it's in::
108+
Where does 'dirac_user' come from? Open that dirac.cfg and search for it. Got it? it's in::
109109

110110
DIRAC
111111
{
112112
...
113-
Setup = DeveloperSetup
113+
DefaultGroup = dirac_user
114114
...
115115
}
116116

docs/source/DeveloperGuide/DevelopmentEnvironment/DeveloperInstallation/interactingWithProductionSetups.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ So, the only real thing that you need to have is:
1111

1212
- a DIRAC developer installation
1313
- a (real) certificate, that is recognized by your server installation
14-
- a dirac.cfg that include the (real) setup of the production environment that you want to connect to (in DIRAC/Setup section)
1514
- a dirac.cfg that include the (real) URL of the production Configuration server.
1615

1716
The last 2 bullets can be achieved with the following command::

docs/source/DeveloperGuide/Internals/Core/ClientServer.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@ Complete path of packages are not on the diagram for readability:
166166
- requestHandler: :py:class:`DIRAC.Core.DISET.RequestHandler`
167167

168168

169-
You can see that the client sends a proposalTuple, proposalTuple contain (service, setup, ClientVO) then (typeOfCall, method) and finaly extra-credentials.
169+
You can see that the client sends a proposalTuple, proposalTuple contain (service, ClientVO) then (typeOfCall, method) and finaly extra-credentials.
170170
e.g.::
171171

172-
(('Framework/serviceName', 'DeveloperSetup', 'unknown'), ('RPC', 'methodName'), '')
172+
(('Framework/serviceName', 'unknown'), ('RPC', 'methodName'), '')
173173

174174

175175

src/DIRAC/Core/Utilities/ElasticSearchDB.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ def __init__(
142142
:param str client_cert: Client certificate.
143143
"""
144144

145-
self.__indexPrefix = indexPrefix
146145
self._connected = False
147146
if user and password:
148147
sLog.debug("Specified username and password")
@@ -210,12 +209,6 @@ def __init__(
210209
except ElasticConnectionError as e:
211210
sLog.error(repr(e))
212211

213-
def getIndexPrefix(self):
214-
"""
215-
It returns the DIRAC setup.
216-
"""
217-
return self.__indexPrefix
218-
219212
@ifConnected
220213
def addIndexTemplate(
221214
self, name: str, index_patterns: list, mapping: dict, priority: int = 1, settings: dict = None
@@ -387,7 +380,7 @@ def getIndexes(self, indexName=None):
387380
It returns the available indexes...
388381
"""
389382
if not indexName:
390-
indexName = self.__indexPrefix
383+
indexName = ""
391384
sLog.debug(f"Getting indices alias of {indexName}")
392385
# we only return indexes which belong to a specific prefix for example 'lhcb-production' or 'dirac-production etc.
393386
return list(self.client.indices.get_alias(f"{indexName}*"))
@@ -522,7 +515,7 @@ def bulk_index(self, indexPrefix, data=None, mapping=None, period="day", withTim
522515
523516
:returns: S_OK/S_ERROR
524517
"""
525-
sLog.verbose("Bulk indexing", f"{len(data)} records will be inserted")
518+
sLog.verbose("Bulk indexing", f"{len(data)} records will be inserted in {indexPrefix}")
526519
if mapping is None:
527520
mapping = {}
528521

src/DIRAC/Core/scripts/dirac_configure.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,6 @@ def runDiracConfigure(params):
493493
else:
494494
DIRAC.gLogger.notice(f"Will update {DIRAC.gConfig.diracConfigFilePath}")
495495

496-
if params.setup:
497-
DIRAC.gLogger.verbose("/DIRAC/Setup =", params.setup)
498496
if params.vo:
499497
DIRAC.gLogger.verbose("/DIRAC/VirtualOrganization =", params.vo)
500498
if params.configurationServer:

src/DIRAC/MonitoringSystem/Client/MonitoringReporter.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,12 @@
1616
1717
"""
1818

19-
import threading
2019
import json
20+
import threading
2121

22-
from DIRAC import S_OK, S_ERROR, gLogger
23-
24-
from DIRAC.Resources.MessageQueue.MQCommunication import createConsumer
25-
from DIRAC.Resources.MessageQueue.MQCommunication import createProducer
22+
from DIRAC import S_ERROR, S_OK, gConfig, gLogger
2623
from DIRAC.MonitoringSystem.Client.ServerUtils import getMonitoringDB
27-
from DIRAC.ConfigurationSystem.Client.Config import gConfig
24+
from DIRAC.Resources.MessageQueue.MQCommunication import createConsumer, createProducer
2825

2926

3027
class MonitoringReporter:

src/DIRAC/MonitoringSystem/DB/MonitoringDB.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828
2929
"""
3030

31-
import time
3231
import calendar
32+
import time
3333

34-
from DIRAC import S_OK, S_ERROR
35-
from DIRAC.Core.Base.ElasticDB import ElasticDB
36-
from DIRAC.Core.Utilities.Plotting.TypeLoader import TypeLoader
37-
from DIRAC.ConfigurationSystem.Client.Helpers import CSGlobals
34+
from DIRAC import S_ERROR, S_OK
3835
from DIRAC.ConfigurationSystem.Client.Config import gConfig
36+
from DIRAC.ConfigurationSystem.Client.Helpers import CSGlobals
3937
from DIRAC.ConfigurationSystem.Client.PathFinder import getDatabaseSection
38+
from DIRAC.Core.Base.ElasticDB import ElasticDB
39+
from DIRAC.Core.Utilities.Plotting.TypeLoader import TypeLoader
4040

4141

4242
########################################################################
@@ -63,7 +63,7 @@ def __init__(self, name="Monitoring/MonitoringDB"):
6363
# Load the files
6464
for pythonClassName in sorted(objectsLoaded):
6565
typeClass = objectsLoaded[pythonClassName]
66-
indexName = f"{self.getIndexPrefix()}_{typeClass()._getIndex()}"
66+
indexName = f"{typeClass()._getIndex()}"
6767
monitoringType = typeClass().__class__.__name__
6868
mapping = typeClass().mapping
6969
monfields = typeClass().monitoringFields
@@ -85,6 +85,7 @@ def getIndexName(self, typeName):
8585
indexName = self.documentTypes.get(typeName).get("indexName", None)
8686

8787
if indexName:
88+
self.log.debug("Index name", indexName)
8889
return S_OK(indexName)
8990

9091
return S_ERROR(f"Monitoring type {typeName} is not defined")

0 commit comments

Comments
 (0)