Skip to content

Commit 4008c04

Browse files
authored
Merge pull request #7987 from DIRACGridBot/cherry-pick-2-132dc4094-integration
[sweep:integration] fix: dirac-rss-sync: flip the default status to Active
2 parents 8c7adc3 + 5b0f2dc commit 4008c04

File tree

3 files changed

+10
-19
lines changed

3 files changed

+10
-19
lines changed

docs/source/AdministratorGuide/Systems/ResourceStatus/install.rst

+4-13
Original file line numberDiff line numberDiff line change
@@ -85,26 +85,17 @@ Copy over the values that we had on the CS for the StorageElements::
8585

8686
$ dirac-rss-sync --init -o LogLevel=VERBOSE
8787

88-
*WARNING*: If the StorageElement does not have a particular StatusType declared
88+
*WARNING*: If the StorageElement does not have a particular StatusType declared, on the CS, this script will set it to Active.
8989

90-
*WARNING*: on the CS, this script will set it to Banned. If that happens, you will
91-
92-
*WARNING*: have to issue the dirac-rss-status script over the elements that need
93-
94-
*WARNING*: to be fixed.
90+
You can check the status of the resources with the following command::
9591

92+
$ dirac-rss-list-status --element Resource --elementType StorageElement
9693

9794
--------------------
9895
Set statuses by HAND
9996
--------------------
10097

101-
In case you entered the WARNING ! on point 4, you may need to identify the
102-
status of your StorageElements. Try to detect the Banned SEs using the
103-
following::
104-
105-
$ dirac-rss-list-status --element Resource --elementType StorageElement --status Banned
106-
107-
If is there any SE to be modified, you can do it as follows::
98+
If there is any SE status to be modified, you can do it as follows::
10899

109100
$ dirac-rss-set-status --element Resource --name CERN-USER --statusType ReadAccess --status Active --reason "Why not?"
110101
# This matches all StatusTypes

src/DIRAC/ResourceStatusSystem/scripts/dirac_rss_sync.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
By default, it sets their Status to `Unknown`, StatusType to `all` and
55
reason to `Synchronized`. However, it can copy over the status on the CS to
66
the RSS. Important: If the StatusType is not defined on the CS, it will set
7-
it to Banned !
7+
it to Active !
88
"""
99
from DIRAC import S_OK
1010
from DIRAC import exit as DIRACExit
@@ -44,7 +44,7 @@ def parseSwitches():
4444

4545
# Default values
4646
switches.setdefault("element", None)
47-
switches.setdefault("defaultStatus", "Banned")
47+
switches.setdefault("defaultStatus", "Active")
4848
if not switches["element"] in ("all", "Site", "Resource", "Node", None):
4949
gLogger.error(f"Found {switches['element']} as element switch")
5050
gLogger.error("Please, check documentation below")
@@ -242,7 +242,7 @@ def main():
242242

243243
registerSwitches()
244244
switchDict = parseSwitches()
245-
DEFAULT_STATUS = switchDict.get("defaultStatus", "Banned")
245+
DEFAULT_STATUS = switchDict.get("defaultStatus", "Active")
246246

247247
# Run script
248248
run()

tests/Jenkins/dirac_ci.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,11 @@ fullInstallDIRAC() {
377377

378378
# populate RSS
379379
echo "==> Populating RSS DB"
380-
dirac-rss-sync --element Site -o LogLevel=VERBOSE
381-
dirac-rss-sync --element Resource -o LogLevel=VERBOSE
380+
dirac-rss-sync --element Site --defaultStatus Banned -o LogLevel=VERBOSE
381+
dirac-rss-sync --element Resource --defaultStatus Banned -o LogLevel=VERBOSE
382382
# init RSS
383383
echo "==> Initializing status of sites and resources in RSS"
384-
dirac-rss-sync --init -o LogLevel=VERBOSE
384+
dirac-rss-sync --init --defaultStatus Banned -o LogLevel=VERBOSE
385385
# Setting by hand
386386
dirac-rss-set-status --element Resource --name ProductionSandboxSE --status Active --reason "Why not?"
387387
dirac-rss-set-status --element Resource --name jenkins.cern.ch --status Active --reason "Why not?"

0 commit comments

Comments
 (0)