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

vmadm stdin read limit #753

Open
dn0 opened this issue Dec 15, 2017 · 3 comments
Open

vmadm stdin read limit #753

dn0 opened this issue Dec 15, 2017 · 3 comments

Comments

@dn0
Copy link
Contributor

dn0 commented Dec 15, 2017

Hello,

vmadm and probably other nodejs command line tools are affected by a nodejs bug shipped in SmartOS. Passing a valid json via stdin will lead to an error when the json payload is too large (in my case larger than 20481 bytes):

json --validate -f test.json; echo $?
0
cat test.json | vmadm update <uuid>
Invalid JSON payload: Unexpected end of input

The problem is in fs.readFile() and mentioned here: nodejs/node-v0.x-archive#7412 (fixed here: nodejs/node-v0.x-archive@a6af709)

@dn0
Copy link
Contributor Author

dn0 commented Dec 16, 2017

I realized that this should go into illumos-extra. I made and tested a patch: https://github.com/joyent/illumos-extra/compare/master...erigones:master?expand=1

@bahamat
Copy link
Member

bahamat commented Mar 11, 2018

@dn0 The best way to fix this is for vmadm to read process.stdin rather than patching node itself. I've filed OS-6756 internally for this.

@dn0
Copy link
Contributor Author

dn0 commented Mar 11, 2018

@bahamat Thanks

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