Skip to content

Unclear error message in fdbbackup if the backup url uses a symlink#3515

Merged
jzhou77 merged 1 commit into
apple:masterfrom
oleg68:fdbbackup_symlink
Jul 15, 2020
Merged

Unclear error message in fdbbackup if the backup url uses a symlink#3515
jzhou77 merged 1 commit into
apple:masterfrom
oleg68:fdbbackup_symlink

Conversation

@oleg68

@oleg68 oleg68 commented Jul 14, 2020

Copy link
Copy Markdown
Collaborator

Unclear error message in fdbbackup if the backup url uses a symlink

Problem statement

If a file backup url usesng a symlink then fdbbackup fails with an unclear error message 'Disk i/o operation failed'

Steps to reproduce

  1. Create a FDB cluster
  2. Create a symlink file to a backup location
  3. Start fdbbackup using the symlink file as the backup destination
fdbbackup start -C fdb-primary.cluster -d file:///mnt/backup/fdb/hot/9

Expected result

Starting backup progress or a clear error message why it can not start

Actual result

ERROR: 'Disk i/o operation failed' on URL 'file:///mnt/backup/fdb/hot/9'

Findings

The BackupContainerLocalDirectory constructor compares the url file path with the it's absolute path and throws io_error if these paths are different. I don't know the reason of this checking, but the exception thrown does not contain any useful information about the failed check

Proposal

  1. Put a clear informational message to IBackupContainer::lastOpenError
  2. Throw backup_invalid_url instead of io_error for forcing fdbbackup exception handler to use IBackupContainer::lastOpenError

This pull request implements this proposal. The new error message is

ERROR: 'Backup Container URL invalid' on URL 'file:///mnt/backup/fdb/hot/9': Backup path '/mnt/backup/fdb/hot/9' must be the absolute path '/mnt/synology/nfs/backup/fdb/hot/9'

@jzhou77

jzhou77 commented Jul 14, 2020

Copy link
Copy Markdown
Collaborator

@fdb-build ok to test

@jzhou77 jzhou77 merged commit 6c06f7f into apple:master Jul 15, 2020
@oleg68

oleg68 commented Jul 15, 2020

Copy link
Copy Markdown
Collaborator Author

Thanks

@oleg68 oleg68 deleted the fdbbackup_symlink branch March 23, 2023 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants