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

Closed
caitriana opened this Issue Feb 14, 2012 · 2 comments

Projects

None yet

2 participants

@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?

@atsareg atsareg was assigned Feb 16, 2012
@atsareg
Contributor
atsareg commented Mar 17, 2012

Fixed in v6r2

@atsareg
Contributor
atsareg commented Mar 19, 2012

released

@atsareg atsareg closed this Mar 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment