Description of problem: When a file is uploaded to the repository (e.g. using mpgarepo putsrpm), there is not a progress indicator about the amount of data already transfered. An interesting feature would be to know this information during the upload. I heard that actually the mgarepo pipes the data with ssh to a wrapper script (wrapper.upload-bin). As a suggestion, maybe an intermediate pipe counter, could be used between the data and the final wrapper. E.g. if I usually transfer using: cat file.dat | ssh user@hostname "cat > file.dat" I could instead see some progress using: cat file.dat | pv -barti 0.5 | ssh user@hostname "cat > file.dat"
CC: (none) => yves.brungard_mageia
CC: (none) => marja11Assignee: bugsquad => mageiatools
Summary: show a progress indicator during transfer => (mgarepo) show a progress indicator during transfer
Hello, I add exchange between Giuseppe and Pascal: <joeghi> is it possible to have mgarepo showing progress during tranfers? maybe setting some ssh env var? you don't know how long still needed for completing the data transfer <pterjan> I believe it writes the file into stdin of an ssh command, and the remote command which would be the first parameter of ssh should be an option <pterjan> but I doubt you can get a progress bar as it doesn't use a file copy tool so the size is unknown <joeghi> pterjan: can't it use rsync with ssh as RSYNC_SSH? <pterjan> but you can probably try hacking something by making the remote upload command something like "-v real command" <pterjan> it doesn't, as it doesn't write the file, it passes it to a remote command to do whatever <pterjan> upload-bin = /usr/local/bin/wrapper.upload-bin <pterjan> it sends it to stdin of that script <joeghi> pterjan: maybe passing the pipe to a pipe counter (e.g.) should work. You don't know the final size, but you know how much has been transfered. But wrapper.upload-bin is not inside mgarepo package. I don't know where it is coming from.
Hello, Papoteur shows me this file today : http://gitweb.mageia.org/infrastructure/puppet/tree/modules/buildsystem/templates/binrepo/upload-bin#l14 and asked me if the cat was "the transfer" part, to be sure, I wrote a small script to test : > [jybz@localhost test]$ cat ./testfile > #!/bin/bash > > echo "Test starting..." > echo "arguments : $@" > pv > ./resultat > > exit > [jybz@localhost test]$ cat ./imgdisk | ./testfile "A first argument" "The second argument" > Test starting... > arguments : A first argument The second argument > 10.0MiB 0:00:00 [ 949MiB/s] [ <=> ] So I confirm, cat is the app to switch for something else. Here pv, but it can also be dd with the progress bar. Good night all !
CC: (none) => j.biernacki
I submitted a proposition for mgarepo in branch topic/progress Comment and feedback are welcome. https://gitweb.mageia.org/software/build-system/mgarepo/commit/?h=topic/progress&id=30172e7e9bdc6cb0404a6b611fe9bbab5101e44a
Tested here new mgarepo-1.14.6-2.mga10 with new progress bar, nothing particular to report seems to work very well, thanks papoteur :)
CC: (none) => geiger.david68210
I haven't realized it was already passed 6 years... ;-) Anyway it works fine here. Only problem I found is "cosmetic" in case of error, i.e. if something goes wrong at the end of the upload (e.g. imagine some problem about authentication) it would show a bunch of python unrelated errors, instead of a single error reporting line.
Do we report it in Mageia 9?
(In reply to Giuseppe Ghibò from comment #5) > I haven't realized it was already passed 6 years... ;-) > > Anyway it works fine here. Only problem I found is "cosmetic" in case of > error, i.e. if something goes wrong at the end of the upload (e.g. imagine > some problem about authentication) it would show a bunch of python unrelated > errors, instead of a single error reporting line. Hi Guiseppe, Thanks for your tests. Can you be more specific? What are unrelated errors? Is this problem specific to the new version?
Mostly in this cases: - upload fails because there are problems with servers (e.g. not enough space) - upload fails because you haven't authenticated correctly with ssh-agent before. In this case at the end of the transfer it shows some error about all the tracking of python functions. - uploads are interrupted by user by ctrl-c. I don't have the error handy to be more specific (next time I'd track), but mostly happens in those cases.