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

Write delay needed for writing to vRR console #56

Closed
jeffbrl opened this issue Jul 5, 2016 · 2 comments
Closed

Write delay needed for writing to vRR console #56

jeffbrl opened this issue Jul 5, 2016 · 2 comments

Comments

@jeffbrl
Copy link

jeffbrl commented Jul 5, 2016

Based on my experimentation, the vRR console port can buffer about 115 characters when characters are rapidly sent to it. This limitation breaks the uploading of a minimal config. The <load-configuration> RPC will terminate prematurely.

Here is how I was able to fix it in tty_telnet.py:

    def rawwrite(self, content):
        """ write content as-is """
        for chunk in [content[i:i+100] for i in range(0, len(content), 100)]:
            self._tn.write(chunk)
            sleep(0.1)

Should this delay to be based on a command line flag? I'd be glad to submit a PR for this.

By the way, I have not tested vmx so I don't know if its console port has similar behavior.

@stacywsmith
Copy link

There is already a pull request to address this issue.
#48

That pull request needs to be updated to also include SSH connections, but otherwise I believe it's a reasonable fix.

@jeffbrl
Copy link
Author

jeffbrl commented Jul 6, 2016

I verified @mpergament's PR also fixes my issue. I will offer my support to him in adding the ssh bits. I'd motivated to get his fix and #52 merged for fully functioning vRR support. Closing.

@jeffbrl jeffbrl closed this as completed Jul 6, 2016
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