1. 16 Apr, 2010 2 commits
    • Michael Hanselmann's avatar
      Add daemon for instance import and export · 2d76b580
      Michael Hanselmann authored
      
      
      This backend daemon for instance import and export will be used to
      transfer instance data to other machines. It is implemented in a generic
      way to support different ways of data input and output. The third-party
      program “socat”, which is already used by the KVM hypervisor abstraction,
      is used to connect to remote machines using SSL/TLS. After starting the
      child processes in a separate process group, the import/export daemon
      monitors their output and updates a status file regularily. This status
      file can then be read by ganeti-noded (not in this patch).
      
      Three I/O methods are supported: Raw disk, file and script. Each of these
      can be used for import and export.
      
      Similar to daemon-util, an incomplete set of tests written in Bash is
      included.
      
      Two future enhancements are planned:
      - Run parts of the command chain as a dedicated user (privilege
        separation).
      - Currently users of this daemon have to poll the status file while data
        is transferred. This is inefficient and creates unnecessary delays. By
        adding “dd” into the chain and sending it SIGUSR1 regularily, we can get
        some statistics, optimize the polling frequenc and even provide the user
        with an ETA (which isn't available with all current methods to
        import/export instance data).
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      2d76b580
    • Michael Hanselmann's avatar
  2. 15 Apr, 2010 4 commits
  3. 12 Apr, 2010 14 commits
  4. 09 Apr, 2010 2 commits
    • Guido Trotter's avatar
      Fix new pylint errors · fe7c59d5
      Guido Trotter authored
      
      
      Under squeeze pylint reports the following errors:
      ************* Module ganeti.serializer
      E1103:155:LoadSignedJson: Instance of 'False' has no 'get' member (but some types could not be inferred)
      ************* Module ganeti-masterd
      E1103:166:ClientRqHandler.handle: Instance of 'False' has no 'get' member (but some types could not be inferred)
      E1103:167:ClientRqHandler.handle: Instance of 'False' has no 'get' member (but some types could not be inferred)
      ************* Module gnt-instance
      E1103:431:BatchCreate: Instance of 'False' has no 'keys' member (but some types could not be inferred)
      
      For the first two cases it's actually wrong: we had checked before that
      the variable on which "get" is called is actually a dict. In the third
      case though such check doesn't exist, so we add it. Then we silence the
      error all three times.
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      fe7c59d5
    • Iustin Pop's avatar
      ConfdClient.SendRequest: allow max coverage · cc6484c4
      Iustin Pop authored
      
      
      This patch changes the coverage parameter to allow specification of max
      coverage (via -1), versus auto-computation (default, 0) and manual
      specification.
      
      Unittests are updated for this case too.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      cc6484c4
  5. 08 Apr, 2010 5 commits
    • Iustin Pop's avatar
      5c465a95
    • Iustin Pop's avatar
      Add a new cluster parameter maintain_node_health · 3953242f
      Iustin Pop authored
      
      
      This will be used to conditionally enable the watcher node maintenance
      feature.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      3953242f
    • Iustin Pop's avatar
      Add a new confd callback (StoreResultCallback) · aa2efc52
      Iustin Pop authored
      
      
      This new callback simply stores (without calling any lower-level
      callback) the last result; coupled with the filtering callback, this
      ensures that it has the 'best' response after all have been received.
      
      The result can then be retrieved via the GetResponse method.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      aa2efc52
    • Iustin Pop's avatar
      ConfdClient: add synchronous wait for replies mode · bfbbc223
      Iustin Pop authored
      
      
      Currently, there is no way for a user of the confd client library to
      know how many replies there should be, whether all have been received,
      etc. This is bad since we can't reliably detect the consistency of the
      results.
      
      This patch attempts to fix this by adding a synchronous WaitForReply
      function that will wait until either a timeout expires, or until a
      minimum number of replies have been received (interested users should
      add similar functionality for the async case). The callback
      functionality will still do call-backs into the user-provided code
      during the wait, but after this function has returned, we know that we
      received all possible replies.
      
      Note: To account for the interval between initial send of the request,
      and calling of this function, we modify the expiration time of the
      request.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      bfbbc223
    • Iustin Pop's avatar
      ConfdClient: unify some internal variables · 71e114da
      Iustin Pop authored
      
      
      Currently the requests are tracked in _request and in _expire_requests.
      This is conventient, but it restricts the ability to extend the request
      tracking, e.g. via packet stats and/or extension of expiration time.
      
      This patch introduces a new simple class _Request that holds all
      properties of pending requests; it then uses instances of this class as
      values in _request instead of tuples, and removes the _expire_requests.
      
      The only drawback is the change in behaviour of _ExpireRequests:
      previously, it used to scan the list only up to the first non-expired
      request, after which it aborted. Now it will scan the entire dict, which
      (depending on workload) could change the time behaviour. I don't think
      this is a problem, as:
      - deleting from the head of a list is very expensive (list.pop(0);
        list.append() is an order of magnitude more expensive than deleting
        an element from a dictionary and re-adding it)
      - we should have more than tens or hundreds of pending requests; in case
        this assumption changes, we could introduce a no-more-often-than-X
        expiration policy, etc.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      71e114da
  6. 07 Apr, 2010 4 commits
  7. 06 Apr, 2010 3 commits
  8. 31 Mar, 2010 2 commits
  9. 25 Mar, 2010 1 commit
  10. 23 Mar, 2010 3 commits