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

irsync --link fails on broken symlink #428

Closed
jefscheepers opened this issue Dec 22, 2023 · 3 comments
Closed

irsync --link fails on broken symlink #428

jefscheepers opened this issue Dec 22, 2023 · 3 comments

Comments

@jefscheepers
Copy link

We are facing a similar problem as reported in the closed issue #22.
When we use irsync with the option --link, soft links are ignored except when they are broken.

What did you try to do?

A user wants to upload a directory, which contains (broken) symlinks.
I wanted to check whether we could exclude symlinks with the --link option

What did you expect to happen?

When you upload a symlink with irsync --link i:, it is ignored, no matter whether the symlink works or not.

The main reason why some users were interested in this option in the past is because they have potentially broken symlinks, and would like to avoid errors when syncing large collections.

Note: I'm a bit confused whether this is the intended behaviour or not.
Based on #22, a broken symlink should be ignored, not throwing an error.
However, the thread which it refers to as solution (irods/irods#3988) seems to imply the error is intended behaviour.

What was the actual result?

Working symlinks are ignored, but broken symlinks throw the following error:

remote addresses: 172.23.253.137 ERROR: resolveRodsTarget: source brokenlink does not exist
remote addresses: 172.23.253.137 ERROR: rsyncUtil: resolveRodsTarget status = -317000 USER_INPUT_PATH_ERR

If you upload a directory with a broken symlink in it, the error is as follows:

Running recursive pre-scan... remote addresses: 172.23.253.137 ERROR: USER_INPUT_PATH_ERR: No such file or directory
Path = test_symlinks/brokenlink

pre-scan complete... errors found.
Aborting data transfer.

This causes other files in the directory to not be synced.

Minimal reproducable example

# create two files
echo "hello" > reference1
echo "hello" > reference2

# create soft links
ln -s reference1 workinglink
ln -s reference2 brokenlink

# remove the second file, creating a broken link
rm reference2

# execute irsync --link on good link
# nothing happens, no error occurs
irsync --link workinglink i:workinglink

# execute irsync --link on good link
# will throw a USER_INPUT_PATH_ERR error
irsync --link brokenlink i:brokenlink

Environment details

I tested this on the following setups:

  • iRODS 4.3.1 with iCommands 4.3.1 and a Mysql database (production environment)
  • iRODS 4.3.1 with iCommands 4.3.1 and a Mysql database (test environment)
  • iRODS 4.3.1 with iCommands 4.3.1 and postgres database (test environment)

To be clear, I'm not intending on syncing anything in the holiday period :)
But I wanted to report it before losing track of it.
If I have anything wrong, just let me know.

Best regards and happy holidays,
Jef

@jefscheepers
Copy link
Author

Apologies, just encountered this issue here: irods/irods#5359

Closing this.

@alanking
Copy link
Contributor

I've moved irods/irods#5359 into the milestone for the next 4.3 release so it will get some eyeballs.

@jefscheepers
Copy link
Author

jefscheepers commented Dec 22, 2023

I've moved irods/irods#5359 into the milestone for the next 4.3 release so it will get some eyeballs.

Thank you :)

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

No branches or pull requests

2 participants