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

Chef client provisioner output is garbled when using the vagrant-1.2 branch of vagrant-windows with Vagrant 1.2.5+ #83

Closed
kashook opened this issue Aug 19, 2013 · 2 comments

Comments

@kashook
Copy link
Contributor

kashook commented Aug 19, 2013

Vagrant has two chef provisioners: chef_solo and chef_client. I noticed recently when using the chef_client provisioner with a windows guest that the chef output is garbled in the console. Each line of the log appears to overwrite the previous line as new lines are printed. I've tracked this down to a combination of two things. First, Vagrant made a change to all of their provisioners that change how new lines are handled. (See the changeset here). Second, in winrmcommunicator.rb in vagrant-windows, the handle_out method splits the log output line by line and calls a block for each line to actually print the output instead of giving the entire output to the block. Since vagrant stopped including new lines in the blocks in the changeset linked above, the log output is now messed up.

This issue currently doesn't show up in chef solo provisioners because chef_solo.rb was copied and monkey patched from an older version of vagrant where new line characters are still being inserted, so we sort of luck out that the monkey patched code is "out of date". However, there is no monkey patch for chef_client.rb, so Vagrant's original version is being used as-is.

@kashook
Copy link
Contributor Author

kashook commented Aug 21, 2013

Pull request: #84

@pmorton
Copy link
Contributor

pmorton commented Sep 13, 2013

Resolved by #84

@pmorton pmorton closed this as completed Sep 13, 2013
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

No branches or pull requests

2 participants