@@ -184,6 +184,35 @@ def __call__(self):
184
184
if self .rmsMonitoring :
185
185
self .rmsMonitoringReporter = MonitoringReporter (monitoringType = "RMSMonitoring" )
186
186
187
+ sourceSE = self .operation .SourceSE if self .operation .SourceSE else None
188
+ if sourceSE :
189
+ # check sourceSE for read
190
+ bannedSource = self .checkSEsRSS (sourceSE , "ReadAccess" )
191
+ if not bannedSource ["OK" ]:
192
+ if self .rmsMonitoring :
193
+ for status in ["Attempted" , "Failed" ]:
194
+ self .rmsMonitoringReporter .addRecord (self .createRMSRecord (status , len (self .operation )))
195
+ self .rmsMonitoringReporter .commit ()
196
+ return bannedSource
197
+
198
+ if bannedSource ["Value" ]:
199
+ self .operation .Error = f"SourceSE { sourceSE } is banned for reading"
200
+ self .log .info (self .operation .Error )
201
+ return S_OK (self .operation .Error )
202
+
203
+ # check targetSEs for write
204
+ bannedTargets = self .checkSEsRSS ()
205
+ if not bannedTargets ["OK" ]:
206
+ if self .rmsMonitoring :
207
+ for status in ["Attempted" , "Failed" ]:
208
+ self .rmsMonitoringReporter .addRecord (self .createRMSRecord (status , len (self .operation )))
209
+ self .rmsMonitoringReporter .commit ()
210
+ return bannedTargets
211
+
212
+ if bannedTargets ["Value" ]:
213
+ self .operation .Error = f"{ ',' .join (bannedTargets ['Value' ])} targets are banned for writing"
214
+ return S_OK (self .operation .Error )
215
+
187
216
# # check replicas first
188
217
checkReplicas = self .__checkReplicas ()
189
218
if not checkReplicas ["OK" ]:
@@ -480,36 +509,6 @@ def fts3Transfer(self):
480
509
481
510
def dmTransfer (self , fromFTS = False ):
482
511
"""replicate and register using dataManager"""
483
- # # get waiting files. If none just return
484
- # # source SE
485
- sourceSE = self .operation .SourceSE if self .operation .SourceSE else None
486
- if sourceSE :
487
- # # check source se for read
488
- bannedSource = self .checkSEsRSS (sourceSE , "ReadAccess" )
489
- if not bannedSource ["OK" ]:
490
- if self .rmsMonitoring :
491
- for status in ["Attempted" , "Failed" ]:
492
- self .rmsMonitoringReporter .addRecord (self .createRMSRecord (status , len (self .operation )))
493
- self .rmsMonitoringReporter .commit ()
494
- return bannedSource
495
-
496
- if bannedSource ["Value" ]:
497
- self .operation .Error = f"SourceSE { sourceSE } is banned for reading"
498
- self .log .info (self .operation .Error )
499
- return S_OK (self .operation .Error )
500
-
501
- # # check targetSEs for write
502
- bannedTargets = self .checkSEsRSS ()
503
- if not bannedTargets ["OK" ]:
504
- if self .rmsMonitoring :
505
- for status in ["Attempted" , "Failed" ]:
506
- self .rmsMonitoringReporter .addRecord (self .createRMSRecord (status , len (self .operation )))
507
- self .rmsMonitoringReporter .commit ()
508
- return bannedTargets
509
-
510
- if bannedTargets ["Value" ]:
511
- self .operation .Error = f"{ ',' .join (bannedTargets ['Value' ])} targets are banned for writing"
512
- return S_OK (self .operation .Error )
513
512
514
513
# Can continue now
515
514
self .log .verbose ("No targets banned for writing" )
0 commit comments