Skip to content

HTTP TAPE REST bulk prepare attributes when file does not exist

For details on the original EOS Jira issue, check https://its.cern.ch/jira/browse/EOS-5634


If some files do not exist when submitting a tape staging bulk requests, the attributes are not filled with fid but with massaged file path:

eos attr ls /eos/ctaatlas/proc/tape-rest-api/bulkrequests/stage/fed0e5a0-dd6e-11ed-a3fc-b8599f55d950
creation_time="1681770430"
fid.#:#eos#:#ctaatlas#:#archivetest#:#data18_hi#:#physics_HardProbes#:#00366413#:#data18_hi.00366413.physics_HardProbes.deriv.DAOD_HION9.f1027_m2037_p5116_tid29151556_00#:#DAOD_HION9.29151556._000007.pool.root.1="prepare - file does not exist or is not accessible to you:"
fid.#:#eos#:#ctaatlas#:#archivetest#:#data18_hi#:#physics_HardProbes#:#00366413#:#data18_hi.00366413.physics_HardProbes.deriv.DAOD_HION9.f1027_m2037_p5116_tid29151556_00#:#DAOD_HION9.29151556._000018.pool.root.1="prepare - file does not exist or is not accessible to you:"
fid.#:#eos#:#ctaatlas#:#archivetest#:#data18_hi#:#physics_HardProbes#:#00366413#:#data18_hi.00366413.physics_HardProbes.deriv.DAOD_HION9.f1027_m2037_p5116_tid29151556_00#:#DAOD_HION9.29151556._000392.pool.root.1="prepare - file does not exist or is not accessible to you:"
issuer_uid="10763"
last_accessed_time="1681770431"
sys.eos.btime="1681770430.962148745"

Problem is then to deal with JSON output that is wrongly interpreted:

eos -j attr ls /eos/ctaatlas/proc/tape-rest-api/bulkrequests/stage/fed0e5a0-dd6e-11ed-a3fc-b8599f55d950
{
    "attr" : 
    {
        "ls" : 
        [
           

{                 "creation_time" : "1681770430"             }
,
            {
                "fid" : 
                {
                    "#:#eos#:#ctaatlas#:#archivetest#:#data18_hi#:#physics_HardProbes#:#00366413#:#data18_hi" : 
                    {
                        "00366413" : 
                        {
                            "physics_HardProbes" : 
                            {
                                "deriv" : 
                                {
                                    "DAOD_HION9" : 
                                    {
                                        "f1027_m2037_p5116_tid29151556_00#:#DAOD_HION9" : 
                                        {
                                            "29151556" : 
                                            {
                                                "_000007" : 
                                                {
                                                    "pool" : 
                                                    {
                                                        "root" : 
                                                       

{                                                             "1" : "prepare"                                                         }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            },
...

Does not really go somewhere useful in this case.

Maybe a better convention would solve this issue? base64 encoded file path to avoid syntax clashes with json code? anything else?