Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

FC CLI: 'meta get ' crashes CLI when called from root directory on a lower-level subdirectory #505

Closed
caitriana opened this Issue · 2 comments

2 participants

caitriana Andrei Tsaregorodtsev
caitriana

A strange bug I've noticed in the CLI (v6r2-pre4 and earlier versions).

If I call 'meta get' from the root directory, on any directory more than 1 level down, the CLI crashes as follows:

FC:/>meta get dfc_test/File/psipp/6.5.5/data/all/exp1
Traceback (most recent call last):
File "/panfs/panfs.ihep.ac.cn/home/data/caitriana/dirac/DIRAC/DataManagementSystem/scripts/dirac-dms-filecatalog-cli.py", line 64, in
cli.cmdloop()
File "/panfs/panfs.ihep.ac.cn/home/data/caitriana/dirac/Linux_x86_64_glibc-2.5/lib/python2.6/cmd.py", line 142, in cmdloop
stop = self.onecmd(line)
File "/panfs/panfs.ihep.ac.cn/home/data/caitriana/dirac/Linux_x86_64_glibc-2.5/lib/python2.6/cmd.py", line 219, in onecmd
return func(arg)
File "/panfs/panfs.ihep.ac.cn/home/data/caitriana/dirac/DIRAC/DataManagementSystem/Client/FileCatalogClientCLI.py", line 1136, in do_meta
return self.metaGet(argss)
File "/panfs/panfs.ihep.ac.cn/home/data/caitriana/dirac/DIRAC/DataManagementSystem/Client/FileCatalogClientCLI.py", line 1203, in metaGet
dirFlag = not result['Value']['Successful'][path]
KeyError: '//dfc_test/File/psipp/6.5.5/data/all/exp1'

If I first cd into the next-lowest subdirectory and then do the meta get, it's OK:

FC:/> cd dfc_test
FC:/dfc_test>meta get File/psipp/6.5.5/data/all/exp1
!expNum : exp1
!dataType : dst
*eventType : all
*bossVer : 6.5.5
!streamId : stream0
*resonance : psipp

When in the root directory, if a leading / is added to the path, it's OK:

FC:/>meta get /dfc_test/File/psipp/6.5.5/data/all/exp1
!expNum : exp1
!dataType : dst
*eventType : all
*bossVer : 6.5.5
!streamId : stream0
*resonance : psipp

I guess it's something to do with parsing the path when in the root directory?

Andrei Tsaregorodtsev atsareg was assigned
Andrei Tsaregorodtsev
Owner

Fixed in v6r2

Andrei Tsaregorodtsev
Owner

released

Andrei Tsaregorodtsev atsareg closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.