1. 18 Dec, 2008 4 commits
  2. 15 Dec, 2008 3 commits
  3. 12 Dec, 2008 2 commits
  4. 10 Dec, 2008 1 commit
  5. 09 Dec, 2008 1 commit
  6. 05 Dec, 2008 1 commit
    • Iustin Pop's avatar
      http: use slicing instead of string modification · b18dd019
      Iustin Pop authored
      The combination of the current buffer splitting method and (4KB) buffer
      size is very inefficient when writing big amounts of data. Just walking
      over a 16 megabyte string using a 4K buffer takes (on a random computer)
      1m06s, whereas using slices will decrease this to 0.080s, and slicing
      with 32 KB size decreases this to 0.073s.
      This means that uploading a big config file (it nears 1MB for big
      clusters) will take more and more time per the number of nodes, since it
      needs lots of slicing.
      I happened upon this by accidentally setting all nodes as master
      candidates, at which point just uploading the config file to all nodes
      took 40s. Applying the patch decreases this to 15s (this probably can
      still be optimized).
      The patch also removes a duplicate constant (the one actually used is in
      http/client.py), and changes the receive buffer size to use the same
      Reviewed-by: imsnah
  7. 04 Dec, 2008 6 commits
  8. 03 Dec, 2008 6 commits
  9. 25 Nov, 2008 1 commit
    • Michael Hanselmann's avatar
      ganeti.http: Don't reuse key and cert objects · 65c6b8e0
      Michael Hanselmann authored
      Reusing the private key and certificate objects gave us problems. This
      patch changes the code to only cache the PEM data, but the objects
      themselves. For every socket, the private key and certificate objects
      are created again.
      Reviewed-by: iustinp
  10. 21 Nov, 2008 1 commit
  11. 19 Nov, 2008 2 commits
    • Michael Hanselmann's avatar
      Make HttpClientManager threadsafe · 33bbdbec
      Michael Hanselmann authored
      This allows a single HttpClientManager to be used from more than one
      thread at the same time. We discussed having one HttpClientManager
      per job queue thread. Assuming there should be one HTTP thread per
      node, this would mean quadratic growth with the number of nodes. By
      being able to reuse the manager, this problem is a defused a bit.
      This patch also fixes a typo in HttpClientRequestExecutor.
      Reviewed-by: iustinp
    • Oleksiy Mishchenko's avatar
      HTTP server: Do not decode empty entity body · 7c46aafd
      Oleksiy Mishchenko authored
      Reviewed-by: imsnah
  12. 11 Nov, 2008 1 commit
    • Michael Hanselmann's avatar
      ganeti.http: Implement SSL for HTTP client · 438a366a
      Michael Hanselmann authored
      Implementing SSL for the HTTP client required more work than I expected.
      For correct error handling, quite a lot of code is needed. To avoid
      code duplication, I moved a lot of the socket handling code into a
      single function named _SocketOperation. It takes care of the polling
      and error handling for OpenSSL. At the same time, the functions calling
      it become a lot smaller.
      This patch brings a few more changes:
      - Error handling for socket.connect_ex (e.g. name resolution failures)
      - Rename "ResponseError" exception class to "_HttpClientError" --
        it's an internal class anyway
      Reviewed-by: iustinp
  13. 10 Nov, 2008 2 commits
  14. 06 Nov, 2008 2 commits
    • Michael Hanselmann's avatar
      Add new HTTP client class · 8a0b06d2
      Michael Hanselmann authored
      It is based on the WorkerPool class which is already used for the job
      queue and master daemon. Each request must be encapsulated in an
      instance of HttpClientRequest, which will then be passed to
      HttpClientManager for processing. Upon completion, the request object
      contains the response or error message.
      While not yet enabled, the HTTP client implementation has been designed
      with HTTP/1.1 and keep-alive in mind. For now it only uses HTTP/1.0,
      HttpClientManager will likely need more changes when integrating with
      the RPC layer. SSL will also be integrated in a second step.
      Reviewed-by: iustinp, ultrotter
    • Michael Hanselmann's avatar
      ganeti.http: Use 411 Length Required in server code · 64357ed8
      Michael Hanselmann authored
      Reviewed-by: iustinp
  15. 05 Nov, 2008 1 commit
  16. 24 Oct, 2008 2 commits
  17. 23 Oct, 2008 1 commit
    • Michael Hanselmann's avatar
      http library: Always fork before reading request · 6526ddcd
      Michael Hanselmann authored
      It turned out that clients not sending a full request will stop
      us from responding to further requests. This patch leverages the
      situation a bit by always forking before handling the request,
      but we still have DoS situations.
      Reviewed-by: ultrotter
  18. 20 Oct, 2008 2 commits
  19. 17 Oct, 2008 1 commit