
On Tue, Aug 16, 2011 at 04:26:03PM -0700, Daniel P. Berrange wrote:
On Tue, Aug 16, 2011 at 02:52:07PM -0400, Dave Allan wrote:
On Tue, Aug 16, 2011 at 11:15:04AM -0700, Daniel P. Berrange wrote:
On Mon, Aug 15, 2011 at 02:19:27PM -0400, Dave Allan wrote:
On Mon, Aug 15, 2011 at 10:12:54AM -0700, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange@redhat.com>
After running 'virsh console' in interactive mode, there was a missing call to virStreamAbort, which meant the server kept the stream resources open
The combination of this patch and the other stream related patch makes the problem I was seeing of garbled console following multiple console connect/disconnects go away, but another problem remains in this area. After connecting to the console in interactive virsh and disconnecting, I often see all subsequent commands fail:
virsh # dominfo foo error: failed to get domain 'foo' error: An error occurred, but the cause is unknown
virsh # dominfo foo error: failed to get domain 'foo' error: no call waiting for reply with prog 536903814 vers 1 serial 300
virsh # define bar.xml error: Failed to define domain from bar.xml error: no call waiting for reply with prog 536903814 vers 1 serial 301
Closing and reopening the interactive virsh session makes the problem go away.
Powering down the guest while the console is connected has made the problem 100% reproducible in the 4 or 5 tries I've given it.
Yeah this is a regression. We were accidentally sending back two stream abort RPC packets in some scenarios (with race condition).
I've posted a patch to fix it
It does indeed fix the failure on domain shutdown, but there is still a problem related to high volumes of console output. If I get on the console and execute:
while true ; do echo -n "The quick brown fox jumped over the lazy dogs. The quick brown fox jumped over the lazy dogs. "; done
and exit the console while the output is spraying, I still see a failure:
the lazy dogs. The quick brown fox jumped over the lazy dogs. The quick brown fox jumped over t virsh # console foo error: failed to get domain 'foo' error: An error occurred, but the cause is unknown
virsh # console foo error: failed to get domain 'foo' error: An error occurred, but the cause is unknown
virsh # console foo error: failed to get domain 'foo' error: no call waiting for reply with prog 536903814 vers 1 serial 6
virsh #
BTW, I noticed this first when exiting the console while boot messages were being output; I'm not *trying* to break it, and many thanks for looking into all this. :)
This time i found a bug that pre-dated my RPC refactoring :-)
Sent 2 more patches....
Ok, that makes everything work much better, with one smaller problem remaining: if there is output flowing to the console at the time that I connect, I usually don't see it until I've sent input to the console, at which point it starts flowing. Often on the first connection to the console output will start flowing immediately, but subsequent connections within a single virsh session will not show output until input is sent. Occasionaly output will start after 10 or 15 seconds, but at other times I've let it sit over a minute with no output. Sending input always resumes the output. Dave