Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xrdfs rm not printing error codes #1885

Closed
costing opened this issue Jan 20, 2023 · 3 comments
Closed

xrdfs rm not printing error codes #1885

costing opened this issue Jan 20, 2023 · 3 comments
Assignees

Comments

@costing
Copy link
Contributor

costing commented Jan 20, 2023

Hi,

There is something funny in the xrootd client command line tools, there is no error message printed if the only file given as an argument cannot be removed. See the first command below, while the second one (with two arguments) prints both errors. And neither returns a non-zero exit code.

It might be related to the changes introduced to allow multiple arguments to the rm command, some revisiting might be needed.

Cheers,

.costin

[grigoras@lxplus734 ~]$ xrdfs lxalird.gsi.de:1094 rm /14/51110/732b358f-98b0-11ed-9a02-6c02e09897e9
[grigoras@lxplus734 ~]$ echo $?
0

[grigoras@lxplus734 ~]$ xrdfs lxalird.gsi.de:1094 rm /14/51110/732b358f-98b0-11ed-9a02-6c02e09897e9 /14/51110/732b358f-98b0-11ed-9a02-6c02e09897e1
rm /14/51110/732b358f-98b0-11ed-9a02-6c02e09897e1 : [ERROR] Error response: permission denied
rm /14/51110/732b358f-98b0-11ed-9a02-6c02e09897e9 : [ERROR] Error response: permission denied
[grigoras@lxplus734 ~]$ echo $?
0
@simonmichal
Copy link
Contributor

simonmichal commented Feb 1, 2023

@costing : thanks for reporting this problem, it should be fix now in: 012c5fe and c1cf1f6

Could you please test and let me know if we can close this ticket?

@costing
Copy link
Contributor Author

costing commented Feb 3, 2023

Thank you @simonmichal ! Looking forward for 5.5.2 :)

@costing
Copy link
Contributor Author

costing commented Oct 5, 2023

Hi,

This bug seems to have reappeared at least from 5.6.0 and beyond. Even for single files, regardless of the success or failure of the operation, the exit code is always 0:

$ v5.6.0-6/bin/xrdfs eosalice.cern.ch rm '/33/33333/33333'
rm /33/33333/33333 : [ERROR] Error response: permission denied
$ echo $?
0

$ v5.6.0-6/bin/xrdfs eosalice.cern.ch rm '/33/33333/33333' '/44/44444/444444'
rm /33/33333/33333 : [ERROR] Error response: permission denied
rm /44/44444/444444 : [ERROR] Error response: permission denied
$ echo $?
0

and the same in 5.6.2:

$ xrdcp -version
v5.6.2
$ xrdfs eosalice.cern.ch rm '/33/33333/33333'
rm /33/33333/33333 : [ERROR] Error response: permission denied
$ echo $?
0

Could you please re-apply the fix?

Cheers,

.costin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants