Print

Print


Hi Gerard,

Indeed, it does not and this is a sticky situation because emulatng the
old behaviour is not correct either.

In the case:

3.3.6
/usr/bin/xrdcp /etc/passwd
root://cmssrmdisk.fnal.gov:1094//dcache/uscmsdisk/store/user/gerard1/
xrdcp: Copy to cmssrmdisk.fnal.gov failed on open!
xrdcp: File already exists

4.4.2
/usr/bin/xrdcp /etc/passwd
root://cmssrmdisk.fnal.gov:1094//dcache/uscmsdisk/store/user/gerard1/

Generally, a specification like the above should copy the source file
into the specified destination dirctory, if it exists. Arugably, 4.4.2
produced the correct result and 3.3.6 did not.

The question then becomes what should happen if the final component in the
target specification does not exist. In 3.3.6 the final component is
always treated as a destination file name specification while 4.4.2 treats
it as a directory specification. I would agree that is incorrect. It
would appear that there is a conflict between path creation and file
creation. So, this is not exactly an simple fix.

The bottom line is we can probably make it close to 3.3.6 behaviour but
making it identical would not be the way to go.

Anyway, I will see what we can do here to make xrdcp be in line with other
copy programs like scp and cp. Though, that isn't a slam dunk since
neither have a way to automatically create a path if the source is a
regular file.

Andy


On Fri, 12 Jun 2015, Gerard Bernabeu wrote:

> Hi,
>
> after testing xrdcp from xrootd-client-4.2.1-1 with XRD_MAKEPATH=true I found that it does not reproduce the old 3.3.6 behavior. I logged all the debugging, which I tried against 2 different servers (EOS and dCache) on https://cdcvs.fnal.gov/redmine/issues/9027.
>
> I'll try to summarize below.
>
> My dCache testsuit is:
>
> rpm -q xrootd-client
> export XRD_MAKEPATH=true
> /usr/bin/xrdcp /etc/passwd root://cmssrmdisk.fnal.gov:1094//dcache/uscmsdisk/store/user/gerard1/
> echo $?
> /usr/bin/xrdcp /etc/passwd root://cmssrmdisk.fnal.gov:1094//dcache/uscmsdisk/store/user/gerard1/xrdcptest-file-on-exisitng-path
> echo $?
> /usr/bin/xrdcp /etc/passwd root://cmssrmdisk.fnal.gov:1094//dcache/uscmsdisk/store/user/gerard1/xrdcptest-newpath1/
> echo $?
> /usr/bin/xrdcp /etc/passwd root://cmssrmdisk.fnal.gov:1094//dcache/uscmsdisk/store/user/gerard1/xrdcptest-newpath2/specificfile-on-new-path
> echo $?
>
> And here are the 2 relevant tests:
> OLD (3.3.6-4) behaviour:
>
> [root@cmswn1750 ~]# rpm -q xrootd-client
> xrootd-client-3.3.6-4.CERN.slc6.x86_64
> [root@cmswn1750 ~]# /usr/bin/xrdcp /etc/passwd root://cmssrmdisk.fnal.gov:1094//dcache/uscmsdisk/store/user/gerard1/
> xrdcp: Copy to cmssrmdisk.fnal.gov failed on open!
> xrdcp: File already exists
> [root@cmswn1750 ~]# echo $?
> 1
> [root@cmswn1750 ~]# /usr/bin/xrdcp /etc/passwd root://cmssrmdisk.fnal.gov:1094//dcache/uscmsdisk/store/user/gerard1/xrdcptest-file-on-exisitng-path
> [xrootd] Total 0.00 MB |====================| 100.00 % [inf MB/s]
> [root@cmswn1750 ~]# echo $?
> 0
> [root@cmswn1750 ~]# /usr/bin/xrdcp /etc/passwd root://cmssrmdisk.fnal.gov:1094//dcache/uscmsdisk/store/user/gerard1/xrdcptest-newpath1/
> [xrootd] Total 0.00 MB |====================| 100.00 % [0.4 MB/s]
> [root@cmswn1750 ~]# echo $?
> 0
> [root@cmswn1750 ~]# /usr/bin/xrdcp /etc/passwd root://cmssrmdisk.fnal.gov:1094//dcache/uscmsdisk/store/user/gerard1/xrdcptest-newpath2/specificfile-on-new-path
> [xrootd] Total 0.00 MB |====================| 100.00 % [0.3 MB/s]
> [root@cmswn1750 ~]# echo $?
> 0
> [root@cmswn1750 ~]#
>
> [root@cmschimeradisk ~]# tree /mnt/dcache/uscmsdisk/store/user/gerard1/
> /mnt/dcache/uscmsdisk/store/user/gerard1/
> ÿÿÿÿÿÿ xrdcptest-file-on-exisitng-path
> ÿÿÿÿÿÿ xrdcptest-newpath1
> ÿÿÿÿÿÿ xrdcptest-newpath2
> ÿÿÿÿÿÿ specificfile-on-new-path
>
> 1 directory, 3 files
>
> New (4.2.1-1) behavior:
>
> [gerard1@dhcp-131-225-86-116 certs]$ rpm -q xrootd-client
> xrootd-client-4.2.1-1.osg32.el6.x86_64
> [gerard1@dhcp-131-225-86-116 certs]$ export XRD_MAKEPATH=true
> [gerard1@dhcp-131-225-86-116 certs]$ /usr/bin/xrdcp /etc/passwd root://cmssrmdisk.fnal.gov:1094//dcache/uscmsdisk/store/user/gerard1/
> [1.862kB/1.862kB][100%][==================================================][1.862kB/s]
> [gerard1@dhcp-131-225-86-116 certs]$ echo $?
> 0
> [gerard1@dhcp-131-225-86-116 certs]$ /usr/bin/xrdcp /etc/passwd root://cmssrmdisk.fnal.gov:1094//dcache/uscmsdisk/store/user/gerard1/xrdcptest-file-on-exisitng-path
> [1.862kB/1.862kB][100%][==================================================][1.862kB/s]
> [gerard1@dhcp-131-225-86-116 certs]$ echo $?
> 0
> [gerard1@dhcp-131-225-86-116 certs]$ /usr/bin/xrdcp /etc/passwd root://cmssrmdisk.fnal.gov:1094//dcache/uscmsdisk/store/user/gerard1/xrdcptest-newpath1/
> [1.862kB/1.862kB][100%][==================================================][1.862kB/s]
> [gerard1@dhcp-131-225-86-116 certs]$ echo $?
> 0
> [gerard1@dhcp-131-225-86-116 certs]$ /usr/bin/xrdcp /etc/passwd root://cmssrmdisk.fnal.gov:1094//dcache/uscmsdisk/store/user/gerard1/xrdcptest-newpath2/specificfile-on-new-path
> [1.862kB/1.862kB][100%][==================================================][1.862kB/s]
> [gerard1@dhcp-131-225-86-116 certs]$ echo $?
> 0
> [gerard1@dhcp-131-225-86-116 certs]$
>
> #Everything works, let's see what it did...
> [root@cmschimeradisk ~]# tree /mnt/dcache/uscmsdisk/store/user/gerard1/
> /mnt/dcache/uscmsdisk/store/user/gerard1/
> ÿÿÿÿÿÿ passwd
> ÿÿÿÿÿÿ xrdcptest-file-on-exisitng-path
> ÿÿ ÿÿÿÿÿÿ passwd
> ÿÿÿÿÿÿ xrdcptest-newpath1
> ÿÿ ÿÿÿÿÿÿ passwd
> ÿÿÿÿÿÿ xrdcptest-newpath2
> ÿÿÿÿÿÿ specificfile-on-new-path
> ÿÿÿÿÿÿ passwd
>
> 4 directories, 4 files
>
> The final path/file names are different, so I believe this will not fix our issue. Do you think the old behaviour could be emulated?
>
> thanks,
> Gerard
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/xrootd/xrootd/issues/243


Reply to this email directly or view it on GitHub.



Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1