Skip to content

Commit 6c6523f

Browse files
committed
docs: answers to the woke police
1 parent 6b374aa commit 6c6523f

File tree

25 files changed

+146
-146
lines changed

25 files changed

+146
-146
lines changed

docs/source/AdministratorGuide/Introduction/configurationbasics.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Normally, services are always exposed on the same port, which is defined in the
1616

1717
As a general rule, services can be duplicated,
1818
meaning you can have the same service running on multiple hosts, thus reducing the load.
19-
There are only 2 cases of DIRAC services that have a "master/slave" concept, and these are the Configuration Service
19+
There are only 2 cases of DIRAC services that have a "controller/worker" concept, and these are the Configuration Service
2020
and the Accounting/DataStore service.
2121
The WorkloadManagement/Matcher service should also not be duplicated.
2222

docs/source/AdministratorGuide/ServerInstallations/InstallingDiracServer.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ operation is the registration of the new host in the already functional Configur
443443

444444
#
445445
# These options define the DIRAC components being installed on "this" DIRAC server.
446-
# The simplest option is to install a slave of the Configuration Server and a
446+
# The simplest option is to install a worker of the Configuration Server and a
447447
# SystemAdministrator for remote management.
448448
#
449449
# The following options defined components to be installed

docs/source/AdministratorGuide/ServerInstallations/scalingAndLimitations.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ Services
9090
+--------------------+---------------------------------------------------------------------------------------------------+-------------+---------------------------------------------------------------------------+-----------+
9191
| **System** | **Component** |**Duplicate**| **Remarque** | **HTTPs** +
9292
+--------------------+---------------------------------------------------------------------------------------------------+-------------+---------------------------------------------------------------------------+-----------+
93-
| Accounting | :mod:`DataStore <DIRAC.AccountingSystem.Service.DataStoreHandler>` | PARTIAL | One master and helpers (See :ref:`datastorehelpers`) | +
93+
| Accounting | :mod:`DataStore <DIRAC.AccountingSystem.Service.DataStoreHandler>` | PARTIAL | One controller and helpers (See :ref:`datastorehelpers`) | +
9494
+ +---------------------------------------------------------------------------------------------------+-------------+---------------------------------------------------------------------------+-----------+
9595
| | :mod:`ReportGenerator <DIRAC.AccountingSystem.Service.ReportGeneratorHandler>` | | | +
9696
+--------------------+---------------------------------------------------------------------------------------------------+-------------+---------------------------------------------------------------------------+-----------+
97-
| Configuration | :mod:`Configuration <DIRAC.ConfigurationSystem.Service.ConfigurationHandler>` | PARTIAL | One master (rw) and slaves (ro). It's advised to have several CS slaves | YES +
97+
| Configuration | :mod:`Configuration <DIRAC.ConfigurationSystem.Service.ConfigurationHandler>` | PARTIAL | One controller (rw) and workers (ro). Should have several CS workers | YES +
9898
+--------------------+---------------------------------------------------------------------------------------------------+-------------+---------------------------------------------------------------------------+-----------+
9999
| DataManagement | :mod:`DataIntegrity <DIRAC.DataManagementSystem.Service.DataIntegrityHandler>` | YES | | YES +
100100
+ +---------------------------------------------------------------------------------------------------+-------------+---------------------------------------------------------------------------+-----------+

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

+10-10
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@ Configuration System
55
====================
66

77
The configuration system serves the configuration to any other client (be it another server or a standard client).
8-
The infrastructure is master/slave based.
8+
The infrastructure is controller/worker based.
99

10-
******
11-
Master
12-
******
10+
**********
11+
Controller
12+
**********
1313

14-
The master Server holds the central configuration in a local file. This file is then served to the clients, and synchronized with the slave servers.
14+
The controller Server holds the central configuration in a local file. This file is then served to the clients, and synchronized with the worker servers.
1515

16-
the master server also regularly pings the slave servers to make sure they are still alive. If not, they are removed from the list of CS.
16+
the controller server also regularly pings the worker servers to make sure they are still alive. If not, they are removed from the list of CS.
1717

18-
When changes are committed to the master, a backup of the existing configuration file is made in ``etc/csbackup``.
18+
When changes are committed to the controller, a backup of the existing configuration file is made in ``etc/csbackup``.
1919

2020
******
21-
Slaves
21+
Workers
2222
******
2323

24-
Slave server registers themselves to the master when starting.
24+
worker server registers themselves to the controller when starting.
2525
They synchronize their configuration on a regular bases (every 5 minutes by default).
26-
Note that the slave CS do not hold the configuration in a local file, but only in memory.
26+
Note that the worker CS do not hold the configuration in a local file, but only in memory.

docs/source/DeveloperGuide/Overview/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Configuration Service
132132
The Configuration Service is built in the DISET framework to provide static configuration parameters to
133133
all the distributed DIRAC components. This is the backbone of the whole system and necessitates excellent
134134
reliability. Therefore, it is organized as a single master service where all the parameter
135-
updates are done and multiple read-only slave services which are distributed geographically, on VO-boxes
135+
updates are done and multiple read-only worker services which are distributed geographically, on VO-boxes
136136
at Tier-1 LCG sites in the case of LHCb. All the servers are queried by clients in a load balancing way.
137137
This arrangement ensures configuration data consistency together with very good scalability properties.
138138

docs/source/DeveloperGuide/Systems/RequestManagement/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ The agent will try to execute request as a whole in one go.
201201
:alt: Treating of Request in the RequestExecutionAgent.
202202
:align: center
203203

204-
The `RequestExecutingAgent` is using the `ProcessPool` utility to create slave workers (subprocesses running `RequestTask`)
204+
The `RequestExecutingAgent` is using the `ProcessPool` utility to create workers (subprocesses running `RequestTask`)
205205
designated to execute requests read from `ReqDB`. Each worker is processing request execution using following steps:
206206

207207
* downloading and setting up request's owner proxy

src/DIRAC/AccountingSystem/Service/DataStoreHandler.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
""" DataStore is the service for inserting accounting reports (rows) in the Accounting DB
22
3-
This service CAN be duplicated iff the first is a "master" and all the others are slaves.
3+
This service CAN be duplicated iff the first is a "controller" and all the others are workers.
44
See the information about :ref:`datastorehelpers`.
55
66
.. literalinclude:: ../ConfigTemplate.cfg
@@ -171,7 +171,7 @@ def export_compactDB(self):
171171
"""
172172
Compact the db by grouping buckets
173173
"""
174-
# if we are running slaves (not only one service) we can redirect the request to the master
174+
# if we are running workers (not only one service) we can redirect the request to the master
175175
# For more information please read the Administrative guide Accounting part!
176176
# ADVICE: If you want to trigger the bucketing, please make sure the bucketing is not running!!!!
177177
if self.runBucketing:

src/DIRAC/ConfigurationSystem/Agent/Bdii2CSAgent.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def execute(self):
103103
if not result["OK"]:
104104
self.log.warn("Could not download a fresh copy of the CS data", result["Message"])
105105

106-
# Refresh the configuration from the master server
106+
# Refresh the configuration from the controller server
107107
gConfig.forceRefresh(fromMaster=True)
108108

109109
if self.processCEs:

src/DIRAC/ConfigurationSystem/Client/CSAPI.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def initialize(self):
9898
return self.__initialized
9999
retVal = gConfig.getOption("/DIRAC/Configuration/MasterServer")
100100
if not retVal["OK"]:
101-
self.__initialized = S_ERROR("Master server is not known. Is everything initialized?")
101+
self.__initialized = S_ERROR("Controller server is not known. Is everything initialized?")
102102
return self.__initialized
103103
self.__rpcClient = ConfigurationClient(url=gConfig.getValue("/DIRAC/Configuration/MasterServer", ""))
104104
self.__csMod = Modificator(
@@ -925,7 +925,7 @@ def getCurrentCFG(self):
925925
def showDiff(self):
926926
"""Just shows the differences accumulated within the Modificator object"""
927927
diffData = self.__csMod.showCurrentDiff()
928-
gLogger.notice("Accumulated diff with master CS")
928+
gLogger.notice("Accumulated diff with Controller CS")
929929
for line in diffData:
930930
if line[0] in ("+", "-"):
931931
gLogger.notice(line)

src/DIRAC/ConfigurationSystem/Client/CSCLI.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class CSCLI(CLI):
4343
def __init__(self):
4444
CLI.__init__(self)
4545
self.connected = False
46-
self.masterURL = "unset"
46+
self.controllerURL = "unset"
4747
self.writeEnabled = False
4848
self.modifiedData = False
4949
self.rpcClient = None
@@ -83,11 +83,11 @@ def _setConnected(self, connected, writeEnabled):
8383
self.writeEnabled = writeEnabled
8484
if connected:
8585
if writeEnabled:
86-
self.prompt = f"({self.masterURL})-{colorize('Connected', 'green')}> "
86+
self.prompt = f"({self.controllerURL})-{colorize('Connected', 'green')}> "
8787
else:
88-
self.prompt = f"({self.masterURL})-{colorize('Connected (RO)', 'yellow')}> "
88+
self.prompt = f"({self.controllerURL})-{colorize('Connected (RO)', 'yellow')}> "
8989
else:
90-
self.prompt = f"({self.masterURL})-{colorize('Disconnected', 'red')}> "
90+
self.prompt = f"({self.controllerURL})-{colorize('Disconnected', 'red')}> "
9191

9292
def do_quit(self, dummy):
9393
"""
@@ -104,7 +104,7 @@ def do_quit(self, dummy):
104104

105105
def _setStatus(self, connected=True):
106106
if not connected:
107-
self.masterURL = "unset"
107+
self.controllerURL = "unset"
108108
self._setConnected(False, False)
109109
else:
110110
retVal = self.rpcClient.writeEnabled()
@@ -118,23 +118,23 @@ def _setStatus(self, connected=True):
118118
self._setConnected(True, False)
119119

120120
def _tryConnection(self):
121-
print(f"Trying connection to {self.masterURL}")
121+
print(f"Trying connection to {self.controllerURL}")
122122
try:
123-
self.rpcClient = ConfigurationClient(url=self.masterURL)
123+
self.rpcClient = ConfigurationClient(url=self.controllerURL)
124124
self._setStatus()
125125
except Exception as x:
126-
gLogger.error("Couldn't connect to master CS server", f"{self.masterURL} ({str(x)})")
126+
gLogger.error("Couldn't connect to controller CS server", f"{self.controllerURL} ({str(x)})")
127127
self._setStatus(False)
128128

129129
def do_connect(self, args=""):
130130
"""
131-
Connects to configuration master server (in specified url if provided).
131+
Connects to configuration controller server (in specified url if provided).
132132
133133
Usage: connect <url>
134134
"""
135135
if not args or not isinstance(args, str):
136-
self.masterURL = gConfigurationData.getMasterServer()
137-
if self.masterURL != "unknown" and self.masterURL:
136+
self.controllerURL = gConfigurationData.getMasterServer()
137+
if self.controllerURL != "unknown" and self.controllerURL:
138138
self._tryConnection()
139139
else:
140140
self._setStatus(False)
@@ -144,7 +144,7 @@ def do_connect(self, args=""):
144144
print("Must specify witch url to connect")
145145
self._setStatus(False)
146146
else:
147-
self.masterURL = splitted[0].strip()
147+
self.controllerURL = splitted[0].strip()
148148
self._tryConnection()
149149

150150
def do_sections(self, args):
@@ -247,7 +247,7 @@ def do_writeToServer(self, dummy):
247247
choice = input("Do you really want to send changes to server? yes/no [no]: ")
248248
choice = choice.lower()
249249
if choice in ("yes", "y"):
250-
print(f"Uploading changes to {self.masterURL} (It may take some seconds)...")
250+
print(f"Uploading changes to {self.controllerURL} (It may take some seconds)...")
251251
response = self.modificator.commit()
252252
if response["OK"]:
253253
self.modifiedData = False

src/DIRAC/ConfigurationSystem/Client/ConfigurationClient.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class ConfigurationClient(Client):
6363

6464
def __init__(self, **kwargs):
6565
# By default we use Configuration/Server as url, client do the resolution
66-
# In some case url has to be static (when a slave register to the master server for example)
66+
# In some case url has to be static (when a worker register to the controller server for example)
6767
# It's why we can use 'url' as keyword arguments
6868
if "url" not in kwargs:
6969
kwargs["url"] = "Configuration/Server"

src/DIRAC/ConfigurationSystem/Service/TornadoConfigurationHandler.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ def export_getCompressedDataIfNewer(self, sClientVersion):
5959

6060
def export_publishSlaveServer(self, sURL):
6161
"""
62-
Used by slave server to register as a slave server.
62+
Used by worker server to register as a worker server.
6363
64-
:param sURL: The url of the slave server.
64+
:param sURL: The url of the worker server.
6565
"""
6666
self.ServiceInterface.publishSlaveServer(sURL)
6767
return S_OK()

src/DIRAC/ConfigurationSystem/private/Refresher.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def autoRefreshAndPublish(self, sURL):
7070
"""
7171
gLogger.debug("Setting configuration refresh as automatic")
7272
if not gConfigurationData.getAutoPublish():
73-
gLogger.debug("Slave server won't auto publish itself")
73+
gLogger.debug("Worker server won't auto publish itself")
7474
if not gConfigurationData.getName():
7575
import DIRAC
7676

src/DIRAC/ConfigurationSystem/private/RefresherBase.py

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import time
2-
import random
3-
42

53
from DIRAC.ConfigurationSystem.Client.ConfigurationData import gConfigurationData
64
from DIRAC.ConfigurationSystem.Client.PathFinder import getGatewayURLs
7-
from DIRAC.FrameworkSystem.Client.Logger import gLogger
85
from DIRAC.Core.Utilities import List
96
from DIRAC.Core.Utilities.EventDispatcher import gEventDispatcher
10-
from DIRAC.Core.Utilities.ReturnValues import S_OK, S_ERROR
7+
from DIRAC.Core.Utilities.ReturnValues import S_ERROR, S_OK
8+
from DIRAC.FrameworkSystem.Client.Logger import gLogger
119

1210

1311
def _updateFromRemoteLocation(serviceClient):
@@ -90,29 +88,31 @@ def _refreshAndPublish(self):
9088
Refresh configuration and publish local updates
9189
"""
9290
self._lastUpdateTime = time.time()
93-
gLogger.info("Refreshing from master server")
94-
sMasterServer = gConfigurationData.getMasterServer()
95-
if sMasterServer:
91+
gLogger.info("Refreshing from controller server")
92+
sControllerServer = gConfigurationData.getMasterServer()
93+
if sControllerServer:
9694
from DIRAC.ConfigurationSystem.Client.ConfigurationClient import ConfigurationClient
9795

9896
oClient = ConfigurationClient(
99-
url=sMasterServer,
97+
url=sControllerServer,
10098
timeout=self._timeout,
10199
useCertificates=gConfigurationData.useServerCertificate(),
102100
skipCACheck=gConfigurationData.skipCACheck(),
103101
)
104102
dRetVal = _updateFromRemoteLocation(oClient)
105103
if not dRetVal["OK"]:
106-
gLogger.error("Can't update from master server", dRetVal["Message"])
104+
gLogger.error("Can't update from controller server", dRetVal["Message"])
107105
return False
108106
if gConfigurationData.getAutoPublish():
109-
gLogger.info("Publishing to master server...")
107+
gLogger.info("Publishing to controller server...")
110108
dRetVal = oClient.publishSlaveServer(self._url)
111109
if not dRetVal["OK"]:
112-
gLogger.error("Can't publish to master server", dRetVal["Message"])
110+
gLogger.error("Can't publish to controller server", dRetVal["Message"])
113111
return True
114112
else:
115-
gLogger.warn("No master server is specified in the configuration, trying to get data from other slaves")
113+
gLogger.warn(
114+
"No controller server is specified in the configuration, trying to get data from other Workers"
115+
)
116116
return self._refresh()["OK"]
117117

118118
def _refresh(self, fromMaster=False):
@@ -127,9 +127,9 @@ def _refresh(self, fromMaster=False):
127127
initialServerList = gatewayList
128128
gLogger.debug("Using configuration gateway", str(initialServerList[0]))
129129
elif fromMaster:
130-
masterServer = gConfigurationData.getMasterServer()
131-
initialServerList = [masterServer]
132-
gLogger.debug(f"Refreshing from master {masterServer}")
130+
controllerServer = gConfigurationData.getMasterServer()
131+
initialServerList = [controllerServer]
132+
gLogger.debug(f"Refreshing from controller {controllerServer}")
133133
else:
134134
initialServerList = gConfigurationData.getServers()
135135
gLogger.debug(f"Refreshing from list {str(initialServerList)}")

src/DIRAC/ConfigurationSystem/private/ServiceInterface.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -11,44 +11,44 @@
1111

1212
class ServiceInterface(ServiceInterfaceBase, threading.Thread):
1313
"""
14-
Service interface, manage Slave/Master server for CS
14+
Service interface, manage Worker/Controller server for CS
1515
Thread components
1616
"""
1717

1818
def __init__(self, sURL):
1919
threading.Thread.__init__(self)
2020
ServiceInterfaceBase.__init__(self, sURL)
2121

22-
def _launchCheckSlaves(self):
22+
def _launchCheckWorkers(self):
2323
"""
24-
Start loop which check if slaves are alive
24+
Start loop which check if Workers are alive
2525
"""
26-
gLogger.info("Starting purge slaves thread")
26+
gLogger.info("Starting purge Workers thread")
2727
self.daemon = True
2828
self.start()
2929

3030
def run(self):
3131
while True:
3232
iWaitTime = gConfigurationData.getSlavesGraceTime()
3333
time.sleep(iWaitTime)
34-
self._checkSlavesStatus()
34+
self._checkWorkersStatus()
3535

36-
def _updateServiceConfiguration(self, urlSet, fromMaster=False):
36+
def _updateServiceConfiguration(self, urlSet, fromController=False):
3737
"""
38-
Update configuration of a set of slave services in parallel
38+
Update configuration of a set of Worker services in parallel
3939
4040
:param set urlSet: a set of service URLs
41-
:param fromMaster: flag to force updating from the master CS
41+
:param fromController: flag to force updating from the master CS
4242
:return: Nothing
4343
"""
4444
if not urlSet:
4545
return
4646
with ThreadPoolExecutor(max_workers=len(urlSet)) as executor:
47-
futureUpdate = {executor.submit(self._forceServiceUpdate, url, fromMaster): url for url in urlSet}
47+
futureUpdate = {executor.submit(self._forceServiceUpdate, url, fromController): url for url in urlSet}
4848
for future in as_completed(futureUpdate):
4949
url = futureUpdate[future]
5050
result = future.result()
5151
if result["OK"]:
52-
gLogger.info("Successfully updated slave configuration", url)
52+
gLogger.info("Successfully updated Worker configuration", url)
5353
else:
54-
gLogger.error("Failed to update slave configuration", url)
54+
gLogger.error("Failed to update Worker configuration", url)

0 commit comments

Comments
 (0)