Skip to content

Commit 091bdba

Browse files
authored
Merge pull request #7119 from chaen/v8.0_fix_multiple
[v8.0] Fix RSS scripts and WLCG accounting file
2 parents 4aa3fd4 + c036311 commit 091bdba

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/DIRAC/DataManagementSystem/scripts/dirac_admin_allow_se.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def main():
9898
DIRAC.exit()
9999

100100
STATUS_TYPES = ["ReadAccess", "WriteAccess", "CheckAccess", "RemoveAccess"]
101-
ALLOWED_STATUSES = ["Unknown", "InActive", "Banned", "Probing", "Degraded"]
101+
ALLOWED_STATUSES = ["Unknown", "InActive", "Banned", "Probing", "Degraded", "Error"]
102102

103103
statusAllowedDict = {}
104104
for statusType in STATUS_TYPES:

src/DIRAC/DataManagementSystem/scripts/dirac_admin_ban_se.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ def main():
115115
if seOptions["ReadAccess"] == "Banned":
116116
gLogger.notice("Read access already banned", se)
117117
resR["OK"] = True
118-
elif not seOptions["ReadAccess"] in ["Active", "Degraded", "Probing"]:
118+
elif not seOptions["ReadAccess"] in ["Active", "Degraded", "Probing", "Error"]:
119119
gLogger.notice(
120120
"Read option for %s is %s, instead of %s"
121-
% (se, seOptions["ReadAccess"], ["Active", "Degraded", "Probing"])
121+
% (se, seOptions["ReadAccess"], ["Active", "Degraded", "Probing", "Error"])
122122
)
123123
gLogger.notice("Try specifying the command switches")
124124
else:

src/DIRAC/Resources/Storage/OccupancyPlugins/WLCGAccountingHTTPJson.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import os
1111
import requests
1212

13-
from DIRAC.Core.Security.Locations import getCAsLocation
13+
from DIRAC.Core.Security.Locations import getCAsLocation, getProxyLocation
1414
from DIRAC.Resources.Storage.OccupancyPlugins.WLCGAccountingJson import WLCGAccountingJson
1515

1616

@@ -39,11 +39,11 @@ def _downloadJsonFile(self, occupancyLFN, filePath):
3939
:param filePath: destination path for the file
4040
4141
"""
42-
4342
try:
4443
with open(filePath, "w") as fd:
4544
caPath = getCAsLocation()
46-
res = requests.get(occupancyLFN, verify=caPath)
45+
userProxy = getProxyLocation()
46+
res = requests.get(occupancyLFN, cert=userProxy, verify=caPath)
4747
res.raise_for_status()
4848
fd.write(res.text)
4949
except Exception as e:

0 commit comments

Comments
 (0)