Skip to content

Commit

Permalink
fix: even more setup removals
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni committed Dec 2, 2024
1 parent 6997c75 commit b58384c
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ in the order of preference of the option resolution:
For all the DIRAC commands there is option '-o' defined which takes one configuration option
setting. For example::

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

*Command line argument specifying a CFG file*
A config file can be passed to any dirac command with the ``--cfg`` flag::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,6 @@ A simple example using the LHCbPilot extension follows::
DIRAC_SITE="${i#*=}"
shift
;;
--lhcb-setup=*)
LHCBDIRAC_SETUP="${i#*=}"
shift
;;
--ce-name=*)
CE_NAME="${i#*=}"
shift
Expand All @@ -237,8 +233,6 @@ A simple example using the LHCbPilot extension follows::
esac
done

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

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

#run the dirac-pilot script
python dirac-pilot.py \
--setup $LHCBDIRAC_SETUP \
--project LHCb \
--Name "$CE_NAME" \
--name "$1" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ We will now play with a **dirac.cfg** file. For these exercises you can use the
Try this::

>>> from DIRAC import gConfig
>>> gConfig.getValue('/DIRAC/Setup')
'DeveloperSetup'
>>> gConfig.getValue('/DIRAC/DefaultGroup')
'dirac_user'

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

DIRAC
{
...
Setup = DeveloperSetup
DefaultGroup = dirac_user
...
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ So, the only real thing that you need to have is:

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

The last 2 bullets can be achieved with the following command::
Expand Down
4 changes: 2 additions & 2 deletions docs/source/DeveloperGuide/Internals/Core/ClientServer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ Complete path of packages are not on the diagram for readability:
- requestHandler: :py:class:`DIRAC.Core.DISET.RequestHandler`


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

(('Framework/serviceName', 'DeveloperSetup', 'unknown'), ('RPC', 'methodName'), '')
(('Framework/serviceName', 'unknown'), ('RPC', 'methodName'), '')



Expand Down
2 changes: 0 additions & 2 deletions src/DIRAC/Core/scripts/dirac_configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,6 @@ def runDiracConfigure(params):
else:
DIRAC.gLogger.notice(f"Will update {DIRAC.gConfig.diracConfigFilePath}")

if params.setup:
DIRAC.gLogger.verbose("/DIRAC/Setup =", params.setup)
if params.vo:
DIRAC.gLogger.verbose("/DIRAC/VirtualOrganization =", params.vo)
if params.configurationServer:
Expand Down
4 changes: 0 additions & 4 deletions src/DIRAC/MonitoringSystem/Service/MonitoringHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ def initializeHandler(cls, serviceInfo):
return S_ERROR(f"Data location is not writable: {repr(err)}")
gDataCache.setGraphsLocation(dataPath)

cls.diracSetup = CSGlobals.getSetup().lower()

return S_OK()

types_listUniqueKeyValues = [str]
Expand Down Expand Up @@ -277,7 +275,6 @@ def export_addRecords(self, indexname, monitoringType, data):
:param list data: data to insert
:returns: S_OK or S_ERROR
"""
indexname = f"{self.diracSetup.lower()}_{indexname}"
gLogger.debug("Bulk index:", indexname)
mapping = self.__db.getMapping(monitoringType)
gLogger.debug("Mapping:", mapping)
Expand All @@ -292,7 +289,6 @@ def export_deleteIndex(self, indexName):
:param str indexName: name of the index
"""
indexName = f"{self.diracSetup.lower()}_{indexName}"
gLogger.debug("delete index:", indexName)
return self.__db.deleteIndex(indexName)

Expand Down
1 change: 0 additions & 1 deletion tests/CI/install_client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ echo -e "*** $(date -u) **** Got the DIRAC tests ****\n"

source "${DIRAC_CI_SETUP_SCRIPT}"
# shellcheck disable=SC2034
DIRACSETUP=$(< "${INSTALL_CFG_FILE}" grep "Setup = " | cut -f5 -d " ")

echo -e "*** $(date -u) **** Client INSTALLATION START ****\n"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
```
DIRAC
{
Setup = DeveloperSetup
Configuration
{
Servers = dips://localhost:9135/Configuration/Server # Case 1
Expand Down Expand Up @@ -95,7 +94,6 @@
```
DIRAC
{
Setup = DeveloperSetup
Configuration
{
Servers = dips://localhost:9135/Configuration/Server
Expand Down

0 comments on commit b58384c

Please sign in to comment.