• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

xapi-project / xen-api / 12165296982

04 Dec 2024 05:40PM UTC coverage: 78.273%. Remained the same
12165296982

push

github

web-flow
CA-401075: remove misleading logs from HTTP client (#6158)

Recent changes to Http_client were made to log errors and backtraces in
case of unusual errors, in order to better diagnose problems.
Unfortunately, this also led to benign exceptions being logged, which
caused people to suspect problems where the exception was actually
"expected". In particular the following error started appearing in the
logs many times:

    Raised Http_client.Parse_error("Expected initial header []")

The case here is that the client has sent an HTTP request, but the
server disconnects before sending a response.

It turns out that this happens commonly when an external connection is
received by xapi and handed over to another process, such as xcp-rrdd.
The connection's file descriptor is passed to the other process, and the
original HTTP request is forwarded over a local socket. The other
process continues to handle the request and sends responses to the
forwarded socket, but never to the local socket, where xapi is waiting
for the response.

This is a quick change that makes the caller of the receive function
aware that no response was sent, without logging scary errors, to fix
the immediate problem. In addition, we should enhance the handover
process to actually send responses, although funcionally this is not an
issue.

3462 of 4423 relevant lines covered (78.27%)

0.78 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

16.92
/python3/libexec/usb_reset.py


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc