dmwm / dbs2go

DBS server written in Go
MIT License
5 stars 4 forks source link

migration stuck in wrong status #74

Closed belforte closed 2 years ago

belforte commented 2 years ago

for this block: /ZeroBias/Run2022A-v1/RAW#c5af2073-2b23-4a2c-b57f-640a2d02438a

it is not in testbed int/phys03

[crab3@crab-prod-tw01 Publisher]$ curl  --cert /data/certs/servicecert.pem --key /data/certs/servicekey.pem https://cmsweb-testbed.cern.ch:8443/dbs/int/phys03/DBSReader/blocks?block_name=/ZeroBias/Run2022A-v1/RAW%23c5af2073-2b23-4a2c-b57f-640a2d02438a
[][crab3@crab-prod-tw01 Publisher]$ 

[note that I replaced in the URL # with %23. and that the output [] is printed "together" with next line prompt]

But a request to migrate it reports status=4 i.e. block is already there and so does nothing

[crab3@crab-prod-tw01 Publisher]$ curl --cert /data/certs/servicecert.pem --key /data/certs/servicekey.pem   -H "Content-Type: application/json"  -d@m.json https://cmsweb-testbed.cern.ch:8443/dbs/int/phys03/DBSMigrate/submit
[{"migration_details":{"migration_request_id":0,"migration_url":"https://cmsweb.cern.ch/dbs/prod/global/DBSReader","migration_input":"/ZeroBias/Run2022A-v1/RAW#c5af2073-2b23-4a2c-b57f-640a2d02438a","migration_status":4,"migration_server":"","create_by":"/DC=ch/DC=cern/OU=computers/CN=tw/crab-prod-tw01.cern.ch","creation_date":1659883401,"last_modified_by":"/DC=ch/DC=cern/OU=computers/CN=tw/crab-prod-tw01.cern.ch","last_modification_date":1659883401,"retry_count":0},"migration_report":"Migration request for /ZeroBias/Run2022A-v1/RAW#c5af2073-2b23-4a2c-b57f-640a2d02438a is already fulfilled, no blocks found for migration","status":"PENDING","error":null}][crab3@crab-prod-tw01 Publisher]$ 
belforte commented 2 years ago

I edited previous comment. In this case migrationSubmit reports status=4 (block already there) together with request_migration_id=0, i.e. there is no migration associated to this block which I may possibly deleted to clear the status. I am stuck.

belforte commented 2 years ago

same problems happens for these datasets

/ZeroBias/Run2022A-v1/RAW /AlCaPPS/Run2022B-v1/RAW /HIMinimumBias2/HIRun2018A-v1/RAW

vkuznet commented 2 years ago

Stefano, thanks for report. I checked the code and indeed was able to reproduce a problem, i.e. a dataset/block which have no parents were not added for migration processing. I fixed the issue and uploaded the new version of the server to testbed. I think now everything will be fine with these migrations. Please retry them and report in this ticket.

belforte commented 2 years ago

thanks Valentin. Perfect work, as usual. I confirm that things work now.