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

Progress bar for vagrant-cloud upload #5838

Closed
ndench opened this issue Feb 2, 2018 · 8 comments
Closed

Progress bar for vagrant-cloud upload #5838

ndench opened this issue Feb 2, 2018 · 8 comments

Comments

@ndench
Copy link

ndench commented Feb 2, 2018

When running the vagrant-cloud post processor it appears to stall during the upload. There is not feedback letting me know that the upload is still happening or how long it will take. Packer even ignores ctrl+c which at first led me to believe that it had indeed stalled or become stuck.

Once I realised it was just my upload speeds (which are legitimately terrible, <50kbps 😢) then I decided to leave the upload running overnight, it eventually completed in > 3hrs.

I've managed to find a work around for the moment, by running nethogs I can see the total MB that packer has uploaded which I can use to take a guess, but it would be really great if there was a progress bar, or even just some text saying xMB / yMB uploaded that updated every 10 seconds or so.

I noticed this was a feature request for the atlas post processor (#4364) but it was closed because you were focused on releasing 1.0. Would it be worth taking another look at it now?

@arizvisa
Copy link
Contributor

Hi @ndench, I have a PR #5851, which adds a progress-bar to the download step for packer.

I noticed your issue and figured it shouldn't be too much work to build an upload progress bar for vagrant-cloud upon it. The branch containing these additions is at : arizvisa/packer/GH-5838.

I haven't merged it into the download PR yet because i'm not sure if the upload progress-bar actually works ;-). Since I don't use vagrant-cloud or have an account setup, do you mind testing it? (Let me know if you need a build for it.)

@ndench
Copy link
Author

ndench commented Feb 15, 2018

Yeah sure I can test it for you. A build would be good, or just some instructions on how to build your branch :)

@rickard-von-essen
Copy link
Collaborator

@ndench you can fin instructions for building Packer from source here.

@rickard-von-essen
Copy link
Collaborator

make dev will create a binary for your platform (OS).

@ndench
Copy link
Author

ndench commented Feb 17, 2018

Thanks for that @rickard-von-essen.

@arizvisa I installed your fork and ran a build, however I didn't see a progress bar, maybe I did something wrong? The steps I took to build it:

$ go get github.com/arizvisa/packer
$ cd ~/go/src/github.com/arizvisa/packer
$ git checkout GH-5838
$ make deps
$ make dev

Then I just ran the packer build:

$ ~/go/src/github.com/arizvisa/packer/bin/packer build vagrant.json

It seems to be uploading but there's no progress bar:
2018-02-17_14-50-33

2018-02-17_14-50-20

@arizvisa
Copy link
Contributor

Ok. I guess it wasn't as straightforward as I had thought. I fiddled with it a little bit, and added some logs to my arizvisa/packer/GH-5838 branch so it should be a little bit easier to troubleshoot. If you don't mind trying one more time?

To get the new commit i made, you can do a git pull. So, similar to what you described. Something like the following should rebuild it.

$ cd ~/go/src/github.com/arizvisa/packer
$ git checkout GH-5838
$ git pull
$ make deps
$ make dev

Then when you run it, can you set the PACKER_LOG environment variable? Something like:
$ env PACKER_LOG=1 ~/go/src/github.com/arizvisa/packer/bin/packer build vagrant.json

You should see extra logs that talk about the progress bar, and whether it got the correct maximum file size. After that it should display that it's starting the progress bar, and spit ouy an example of what the progress bar should look like. Once all that crap happens, then the progress bar should begin being rendered.

Those particular logs are here in the commit if you're curious: post-processor/vagrant-cloud/client.go:119

Anyways, depending on what's emitted, that should allow me to figure out which part of it is failing and why it's not drawing the thing.

@SwampDragons
Copy link
Contributor

I believe this should have been fixed with the merge of the progress bar code a few versions ago. Check out v1.3.3 😄

@ghost
Copy link

ghost commented Mar 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants