Skip to content

Commit

Permalink
Merge pull request #7119 from chaen/v8.0_fix_multiple
Browse files Browse the repository at this point in the history
[v8.0] Fix RSS scripts and WLCG accounting file
  • Loading branch information
fstagni authored Jul 25, 2023
2 parents 4aa3fd4 + c036311 commit 091bdba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def main():
DIRAC.exit()

STATUS_TYPES = ["ReadAccess", "WriteAccess", "CheckAccess", "RemoveAccess"]
ALLOWED_STATUSES = ["Unknown", "InActive", "Banned", "Probing", "Degraded"]
ALLOWED_STATUSES = ["Unknown", "InActive", "Banned", "Probing", "Degraded", "Error"]

statusAllowedDict = {}
for statusType in STATUS_TYPES:
Expand Down
4 changes: 2 additions & 2 deletions src/DIRAC/DataManagementSystem/scripts/dirac_admin_ban_se.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ def main():
if seOptions["ReadAccess"] == "Banned":
gLogger.notice("Read access already banned", se)
resR["OK"] = True
elif not seOptions["ReadAccess"] in ["Active", "Degraded", "Probing"]:
elif not seOptions["ReadAccess"] in ["Active", "Degraded", "Probing", "Error"]:
gLogger.notice(
"Read option for %s is %s, instead of %s"
% (se, seOptions["ReadAccess"], ["Active", "Degraded", "Probing"])
% (se, seOptions["ReadAccess"], ["Active", "Degraded", "Probing", "Error"])
)
gLogger.notice("Try specifying the command switches")
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import os
import requests

from DIRAC.Core.Security.Locations import getCAsLocation
from DIRAC.Core.Security.Locations import getCAsLocation, getProxyLocation
from DIRAC.Resources.Storage.OccupancyPlugins.WLCGAccountingJson import WLCGAccountingJson


Expand Down Expand Up @@ -39,11 +39,11 @@ def _downloadJsonFile(self, occupancyLFN, filePath):
:param filePath: destination path for the file
"""

try:
with open(filePath, "w") as fd:
caPath = getCAsLocation()
res = requests.get(occupancyLFN, verify=caPath)
userProxy = getProxyLocation()
res = requests.get(occupancyLFN, cert=userProxy, verify=caPath)
res.raise_for_status()
fd.write(res.text)
except Exception as e:
Expand Down

0 comments on commit 091bdba

Please sign in to comment.