oxidecomputer / falcon

Fast Assessment Laboratory for Computers On Networks
Mozilla Public License 2.0
5 stars 2 forks source link

handle long serial commands #59

Closed rcgoodfellow closed 7 months ago

rcgoodfellow commented 7 months ago

If a serial command goes beyond 79 lines, stwrap, opost and friends are going to do cruel and unusual things to our output buffers. This is an effort to see through mangling of the output. I've tested that this works on strings right at the 79/80 char threshold and longer. Previously the Falcon setup process would just hang on these commands. If host names were long enough, it would cause VM setup to hang on the echo '::1 $nodename.local $nodename command that is run in every VM.

At some point very soon we should bite the bullet, rip out the serial commander and replace it with something like postcard encoded commands with reliable frame delimiters with the TTY in raw mode when executing automated commands.