Vagrant: rvm download progress output is corrupted

Created on 1 Jun 2014  ·  3Comments  ·  Source: hashicorp/vagrant

I'm working on provisioning via bash shell script, and one step is causing odd output behavior.

Specifically the RVM installation step:

sudo -u vagrant -H sh -c "\curl -sSL https://get.rvm.io | bash -s stable --rails"

This generates the following output -- initially kosher, but during the phase that would normally show a progress bar, instead each character mostly has its own line, as if the letters are streaming as individual print actions.

==> default: Downloading https://github.com/wayneeseguin/rvm/archive/stable.tar.gz
==> default: Installing RVM to /home/vagrant/.rvm/
==> default:     Adding rvm PATH line to /home/vagrant/.profile /home/vagrant/.bashrc /home/vagrant/.zshrc.
==> default:     Adding rvm loading line to /home/vagrant/.bash_profile /home/vagrant/.zlogin.
==> default: Installation of RVM in /home/vagrant/.rvm/ is almost complete:
==> default:   * To start using RVM you need to run `source /home/vagrant/.rvm/scripts/rvm`
==> default:     in all your open shell windows, in rare cases you need to reopen all shell windows.
==> default: # Administrator,
==> default: #
==> default: #   Thank you for using RVM!
==> default: #   We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
==> default: #
==> default: # ~Wayne, Michal & team.
==> default: In case of problems: http://rvm.io/help and https://twitter.com/rvm_io
==> default: rvm 1.25.27 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]
==> default: Searching for binary rubies, this might take some time.
==> default: No binary rubies available for: ubuntu/14.04/i386/ruby-2.1.2.
==> default: Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
==> default: Checking requirements for ubuntu.
==> default: Requirements installation successful.
==> default: Installing Ruby from source to: /home/vagrant/.rvm/rubies/ruby-2.1.2, this may take a while depending on your cpu(s)...
==> default: ruby-2.1.2 - #downloading ruby-2.1.2, this may take a while depending on your connection...
==> default:  
==> default:  
==> default: %
==> default:  
==> default: T
==> default: o
==> default: t
==> default: a
==> default: l
==> default:  
==> default:  
==> default:  
==> default:  
==> default: %
==> default:  
==> default: R
==> default: e
==> default: c
==> default: e
==> default: i
==> default: v
==> default: e
==> default: d % Xferd  Average Speed   Time    Time     Time  Current
==> default:                                  Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
==> default:  
==> default:  
==> default: 0
==> default:  
==> default:  
==> default:  
==> default:  
==> default:  
==> default: 0
==> default:  
==> default:    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:04 --:--:--     0
==> default:  
==> default:  
==> default: 0
==> default:  
==> default:  
==> default:  
==> default:  
==> default:  
==> default: 0
==> default:  
==> default:  
==> default:  
==> default:  
==> default: 0
==> default:  
==> default:  
  0     0    0     0    0     0      0      0 --:--:--  0:00:05 --:--:--     0
==> default:  
==> default:  
==> default: 8
==> default:  
==> default: 1
==> default: 1
==> default: .
==> default: 4
==> default: M
==> default:  
==> default:  
==> default:  
==> default:  
==> default: 8
==> default:  
==> default:  
==> default: 9
==> default: 6
==> default: 1
==> default: k
==> default:  
==> default:  
==> default:  
==> default:  
==> default: 0
==> default:  
==> default:     0   146k      0  0:01:20  0:00:06  0:01:14  237k
==> default:  
==> default: 31 11.4M   31 3694k    0     0   488k      0  0:00:23  0:00:07  0:00:16  916k
==> default:  
==> default: 8
==> default: 3
==> default:  
==> default: 1
==> default: 1
==> default: .
==> default: 4
==> default: M
==> default:  
==> default:  
==> default:  
==> default: 8
==> default: 3
==> default:  
==> default: 9
==> default: 7
==> default: 6
==> default: 1
==> default: k
==> default:  
==> default:    0     0  1141k      0  0:00:10  0:00:08  0:00:02 2429k
==> default: 1
==> default: 0
==> default: 0
==> default:  
==> default: 1
==> default: 1
==> default: .
==> default: 4
==> default: M
==> default:   100 11.4M    0     0  1325k      0  0:00:08  0:00:08 --:--:-- 3558k
==> default: ruby-2.1.2 - #extracting ruby-2.1.2 to /home/vagrant/.rvm/src/ruby-2.1.2
==> default: ...
==> default: ruby-2.1.2 - #configuring

This seems possibly related to https://github.com/mitchellh/vagrant/issues/471, although that issue manifested differently (duplication of lines rather than segmentation of characters).

Environment:
Vagrant 1.6.2
Linux Mint 16 (Petra)

Most helpful comment

Any idea when/if this will get fixed? Quite an annoying problem :/

All 3 comments

Possibly same issue as https://github.com/mitchellh/vagrant/issues/3908 -- although that's based on mitchellh's comment about clearing lines, mostly. The actual manifestation again is strictly different than I'm reporting here -- that ticket has duplicated text, this ticket has strung-out text -- but I could see how they could be different manifestations of the same root issue.

Vagrant outputs the data as soon as it gets it. This is happening because your shell/ssh/rvm/somewhere is just sending each individual byte, and Vagrant is showing it right away.

One option in the future is to buffer full lines and wait until a full line is available. We don't this yet and its not a priority. But this isn't "broken" so much as we just send the byte as we get it.

Any idea when/if this will get fixed? Quite an annoying problem :/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rrzaripov picture rrzaripov  ·  3Comments

StefanScherer picture StefanScherer  ·  3Comments

mpontillo picture mpontillo  ·  3Comments

RobertSwirsky picture RobertSwirsky  ·  3Comments

dorinlazar picture dorinlazar  ·  3Comments