1. 27 Feb, 2013 3 commits
  2. 26 Feb, 2013 1 commit
  3. 25 Feb, 2013 21 commits
  4. 22 Feb, 2013 5 commits
  5. 21 Feb, 2013 2 commits
  6. 20 Feb, 2013 8 commits
    • Helga Velroyen's avatar
      Remove test of obsolete getNetworkUuid method · 0b08c8bf
      Helga Velroyen authored
      This will remove the tests for the getNetworkUuid method.
      The method will be obsolete after the changes regarding
      identification of networks by UUID and not name are merged
      into master. Will send another patch for removing the
      actual method.
      Signed-off-by: default avatarHelga Velroyen <helgav@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
    • Iustin Pop's avatar
      Switch the RPC module over to the multi interface · 8920fa09
      Iustin Pop authored
      This replaces the very-basic parMap of IO actions (fully serialised,
      as parMap won't work here), to the multi interface.
      This makes a simple "time gnt-node list" on a 6-node cluster go from
      3.2s to ~0.9s, and allows even better parallelisation - before,
      curlGetString was blocking, whereas the new interface does allow some
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
    • Iustin Pop's avatar
      Add a Ganeti-specific implementation of Curl Multi · cc40185c
      Iustin Pop authored
      As we want to be able to run queries against multiple nodes in
      parallel, and furthermore in parallel with other work, we need to
      implement the Curl Multi interface (see libcurl-multi(3)).
      This patch adds a Ganeti-specific such implementation, to be used
      until upstream Curl bindings provide it. The implemented interface
      (there are two 'multi' interfaces) is the older curl_multi_perform(3).
      It has one downside (which is also, somewhat, and advantage): we use
      polling instead of more properly select() or poll. This is due to how
      waiting for FDs is implemented in Haskell: currently, it's not
      possible to wait for multiple FDs at once nicely, so we'd have to fork
      many threads for each FD to be watched, or alternatively one could use
      FFI select, but that would block the entire runtime.
      With the current poll method, the implementation achieves consistent
      ~100 RPC/s per second (with 10 multi interfaces running in parallel,
      each with 10 easy handles), and over ~1 hour of runtime the memory
      usage is stable, so memory allocation/deallocation (manual when
      dealing with FFI) _seems_ to be well handled.
      Future optimisations could be to move to curl_multi_socket_action(3),
      which might allow better integration with the Haskell runtime.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
    • Iustin Pop's avatar
      Add two utility functions for handling Either lists · da9e2aff
      Iustin Pop authored
      These two functions permit operating in bulk on only the Left or Right
      values in the original list, then reassembling the list back in the
      original order.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
    • Iustin Pop's avatar
      Simplify RPC error cases · 9c0a27d0
      Iustin Pop authored
      This patch removes the node from the RPC error constructurs
      CurlLayerError and OfflineNodeError. The rationale is that we anyway
      return tuples (node, result), and removing this duplication allows
      simplified signatures/calls in the execution of RPC calls.
      Note: this was sent before as well, resending on top of current codebase.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
    • Iustin Pop's avatar
      Reduce duplication of curl options computation · 85f6a869
      Iustin Pop authored
      Some curl option are request-specific, but not node specific: e.g. rpc
      timeout, etc. The patch changes the HttpClientRequest type so that we
      can pre-seed such options, instead of rebuilding the list in each
      individual request execution.
      Note: this was sent before and LGTMed, but on a different codebase, so
      resending an updated version.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
    • Iustin Pop's avatar
      Switch the curl bindings from optional to required · 1ca709c1
      Iustin Pop authored
      Currently, we support curl being optional via some sporting exercises:
      ifdefs in the code, data types that represent 'Curl is disabled'
      state, etc. However, with the future work on RPC, we would have to
      even make the dependencies list conditional on it, etc. This is too
      much work, when the curl library is included even in stable
      This patch changes curl from option to required, the same as the other
      base libraries.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
    • Michael Hanselmann's avatar
      qa_config.AcquireNode: Use sort key function · 41be279f
      Michael Hanselmann authored
      Use a sort key function instead of using a comparing function (“cmp=…”).
      The latter is not supported in Python 3 and using a sort key function is
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarBernardo Dal Seno <bdalseno@google.com>