#37 Issue closed: Redesign OUTPUT_URL and BACKUP_URL to correct improper logic

Labels: bug, discuss / RFC

dagwieers opened issue at 2012-03-29 09:27:

Reported by Kai-Olaf Pieth at SF#3492368 on 2012-02-23 12:32:44 PST

Original report

Duplicate ISO-Transfer happens when using rsync. Because this script ./output/ISO/Linux-i386/90_transfer_image.sh doesnt support all the nice rsync options it lists the rsync modules on my rsyncd instead of copying something.

the script that really copy the iso is: ./output/RSYNC/default/90_copy_result_files.sh

I deactivated rsync in that script as it was done before for all NETFS workflows. Heres the output of diff -p against your git repository:

*** ./output/ISO/Linux-i386/90_transfer_image.sh Thu Feb 23 21:24:08 2012
--- /root/rear-devel-git/source/usr/share/rear/./output/ISO/Linux-i386/90_transfer_image.sh Mon Feb 20 08:50:36 2012
*************** case "$scheme" in
*** 24,31 ****
StopIfError "Problem transferring ISO image to $OUTPUT_URL"
;;
(rsync)
! # The ISO will be copied by RSYNC
! return 0
;;
(*) BugError "Support for $scheme is not implemented yet.";;
esac
--- 24,32 ----
StopIfError "Problem transferring ISO image to $OUTPUT_URL"
;;
(rsync)
! LogPrint "Transferring ISO image to $OUTPUT_URL"
! rsync -a $v "$ISO_DIR/$ISO_PREFIX.iso" "$OUTPUT_URL"
! StopIfError "Problem transferring ISO image to $OUTPUT_URL"
;;
(*) BugError "Support for $scheme is not implemented yet.";;
esac

Additional note by Gratien D'haese on 2012-03-06 06:38:23 PST

I believe when BACKUP_URL = OUTPUT_URL then you have a point.
Therefore, we may not blindly remove it, but do the above check first.

dagwieers commented at 2012-06-10 18:33:

@gdha @kpieth What needs to be done for this issue ?

kpieth commented at 2012-06-11 07:05:

i think you can disable rsync transfer in
./output/ISO/Linux-i386/90_transfer_image.sh
because this script does the work better:
./output/RSYNC/default/90_copy_result_files.sh

dagwieers commented at 2012-06-11 07:34:

Aha, now I see. You seem to have hit a similar problem as I have (#108). Because if you rely on output/RSYNC for the transfer of the ISO image, you are actually expecting BACKUP= to be defined, which should not be mandatory (if you do not expect Rear to take care of backups).

So we definitely need to rethink how this is supposed to work. In my opinion the OUTPUT and BACKUP configuration are complete separate things and if OUTPUT_URL=rsync:// it should transfer the output files and BACKUP_URL=rsync:// should take care of the backup.

For example, you should be able to transfer your ISO image using rsync, nfs or cifs (e.g. OUTPUT_URL=(rsync://|nfs://|cifs://)) and use TSM for backup (BACKUP=TSM). Which is currently not possible...

Also see #108.

kpieth commented at 2012-06-11 09:22:

What do you think of:
If OUTPUT_URL is set, then "./output/ISO/Linux-i386/90_transfer_image.sh" should do the work. If not, then the chosen BACKUP workflow cares about transferring the image.

dagwieers commented at 2012-06-11 15:25:

Personally, I think OUTPUT_URL should take care of the output-related stuff, and BACKUP_URL should take care of the backup-related stuff. But the meat of this matter is that what you are doing is strictly speaking not allowed. OUTPUT_URL was never supposed to have an rsync:// URL. The reason it works (twice) is mostly by accident and carelessness.

Which doesn't mean that we do not want the functionality ! We should have this properly defined and properly designed.

gdha commented at 2013-07-03 11:51:

has been done in the meantime


[Export of Github issue for rear/rear.]