1. 27 Feb, 2009 1 commit
    • Iustin Pop's avatar
      Fix some epydoc style issues · 5fcc718f
      Iustin Pop authored
      99% of the epydoc return tags are "@return:", but each of the modified files
      had one "@returns:" line. We fix this for consistency.
      Reviewed-by: imsnah
  2. 24 Feb, 2009 1 commit
    • Iustin Pop's avatar
      Remove the extra_args parameter in instance start · 07813a9e
      Iustin Pop authored
      This patch removes the extra_args parameter and instead switches the
      instance to the HV_KERNEL_ARGS hypervisor option.
      This is a big change, but it's a needed cleanup, this extra parameter on
      all RPC calls is not generic and we also need to have a persistent value
      Reviewed-by: imsnah
  3. 09 Feb, 2009 1 commit
    • Iustin Pop's avatar
      RpcResult: add a new payload field · f2def43a
      Iustin Pop authored
      For results which use the (status, payload) response type, it's easier
      to define a ‘payload’ field on the result holding the payload than to
      extract it using “data[1]” in the caller code.
      Reviewed-by: ultrotter
  4. 23 Jan, 2009 1 commit
    • Iustin Pop's avatar
      Fill the 'call' attribute of offline rpc results · 84b45587
      Iustin Pop authored
      When creating ‘fake’ results for offline nodes, we currently don't pass
      the call attribute. This complicates debugging, so even though this
      should not matter in practice, it's better to fix it.
      Reviewed-by: imsnah
  5. 21 Jan, 2009 2 commits
    • Iustin Pop's avatar
      Log the rpc call name in the RPC errors message · 1b8acf70
      Iustin Pop authored
      Currently the rpc module logs the error description and target node in
      rpc calls logging, as such:
        2009-01-21 00:50:01,456:  pid=1051/Thread-21 ERROR RPC error from node
          node1.example.com: Connection failed (111: Connection
      but this doesn't help to understand which call caused this (here it's an
      offline node which should not be contacted at all).
      This patch adds the logging of the call too, so cases like the above can
      be debugged easier.
      Reviewed-by: imsnah, ultrotter
    • Guido Trotter's avatar
      Add calls in the intra-node migration protocol · 6906a9d8
      Guido Trotter authored
      Currently the hypervisor is expected to do all the migration from the
      source side. With this patch we also add the option of passing some
      information to the target side, and starting some operation there.
      As a bonus, a function to cleanup any started operation is included.
      Reviewed-by: iustinp
  6. 13 Jan, 2009 1 commit
    • Iustin Pop's avatar
      Forward-port DrbdNetReconfig · 6b93ec9d
      Iustin Pop authored
      This is a modified forward-port of DrbdNetReconfig and their associated
      RPCs. In Ganeti 2.0, these functions will be used for two things:
        - live migration (as in 1.2)
        - and for other network reconfiguration tasks, since DRBD8.Attach()
          doesn't do them anymore
      Because of the Attach() changes, we can now implement the
      AttachNet/DisconnectNet functions as independent entities, and we don't
      need the cache anymore.
      Note these functions are copies of the latest 1.2 code, and not
      cherry-picks of the (many) patches that went into 1.2.
      Reviewed-by: ultrotter
  7. 09 Jan, 2009 1 commit
  8. 08 Jan, 2009 2 commits
    • Iustin Pop's avatar
      rpc: Add a method for easy check of remote results · 3247bbac
      Iustin Pop authored
      The patch adds a new method to the rpc.RpcResult class called
      "RemoteFailMsg" which is useful for the RPC calls which return a
      (status, payload) style result.
      Reviewed-by: imsnah
    • Iustin Pop's avatar
      Add an instance_migratable rpc call · 56e7640c
      Iustin Pop authored
      This is a forward-port of commit 1194 on the 1.2 branch:
        This call will check whether an instance is up on its primary, and that
        it has been started with symlinks. We currently have no on-secondary
        checks, nor any hypervisor specific call.
        Reviewed-by: iustinp
      The difference from the original patch is that we don't include the
      cmdlib changes, since those will come as a copy from the 1.2 cmdlib.py,
      and not as individual patches.
      Original-Author: ultrotter
  9. 07 Jan, 2009 1 commit
    • Iustin Pop's avatar
      Pass instance name to rpc call blockdev_close · b2e7666a
      Iustin Pop authored
      This is an extract of commit 1166 on the 1.2 branch (Add a rpc call for
      drbd network reconfiguration), but only the blockdev_close part.
      The patch changes the blockdev_close call to take the instance so that
      it can remove the symlinks of the instance.
      Originally-Reviewed-by: imsnah
  10. 18 Dec, 2008 1 commit
  11. 14 Dec, 2008 1 commit
    • Iustin Pop's avatar
      cleanup: fix 'variable unused' warning · fab1e3a4
      Iustin Pop authored
      In the iteration we don't care about the node names, so we change the
      for loop to be over the values (and not itervalues).
      Reviewed-by: amishchenko
  12. 11 Dec, 2008 1 commit
    • Iustin Pop's avatar
      Fix epydoc format warnings · c41eea6e
      Iustin Pop authored
      This patch should fix all outstanding epydoc parsing errors; as such, we
      switch epydoc into verbose mode so that any new errors will be visible.
      Reviewed-by: imsnah
  13. 09 Dec, 2008 1 commit
    • Michael Hanselmann's avatar
      RPC: Compress file upload data · 12bce260
      Michael Hanselmann authored
      Adding compression to larger amounts of data is more efficient than
      transferring it (len(nodes) - 1) times over the network without
      compression. We were able to compress a 800KB config file to about
      30 KB, which is about 40 KB with Base64 encoding (required due to
      the way SimpleJson handles strings).
      Reviewed-by: ultrotter
  14. 08 Dec, 2008 1 commit
    • Iustin Pop's avatar
      RPC: do not make calls to offline nodes · ed83f5cc
      Iustin Pop authored
      This patch changes the _MultNodeCall and _SingleNodeCall helpers to not
      actually make calls to offline nodes, but instead generate fake
      responses which have a parameter caller 'offline' set so that callers
      can check for this value if they want (otherwise, it's just a failed RPC
      Reviewed-by: ultrotter
  15. 05 Dec, 2008 1 commit
    • Iustin Pop's avatar
      Cleanup the config file on demotion from candidate · 56aa9fd5
      Iustin Pop authored
      This patch adds a simple rpc which makes a backup of the config file and
      then removes it. This is done so that cluster verify doesn't complain
      immediately after demoting a node.
      Reviewed-by: imsnah
  16. 04 Dec, 2008 1 commit
  17. 02 Dec, 2008 1 commit
    • Iustin Pop's avatar
      Convert rpc results to a custom type · 781de953
      Iustin Pop authored
      For a long time we had the problem that both RPC-layer errors and
      results from the remote node share the same "valuespace". This is
      because we shouldn't raise an exception when only one node failed
      (and lose the results from the other nodes).
      This patch attempts to address this problem by returning a special
      object from RPC calls, which separates the rpc-layer status and the
      remote results into different attributes.
      All the users of rpc (mainly cmdlib, but also bootstrap and the
      HooksMaster in mcpu) have been converted to this new model. The code has
      changed from, e.g. for boolean return types:
        if not self.rpc.call_...
        result = self.rpc.call_
        if result.failed or not result.data:
           ^ rpc-layer error    |
                                - result payload
      While this is slightly more complicated, it will allow cleaner checks in
      the future; right now the code is just a plain port, without
      There's also a "result.Raise()" which raises an OpExecError if the
      rpc-layer had errors.
      One side-effect of the patch is that now all return types from the
      rpc.call_ functions are of either RpcResult (single-node) or dicts of
      (node name, RpcResult); previously, some functions were returning
      different object types based on error status.
      The code passes burnin (after many retries :).
      Reviewed-by: imsnah
  18. 01 Dec, 2008 1 commit
  19. 26 Nov, 2008 1 commit
    • Iustin Pop's avatar
      Reduce duplication of work in rpc.Client · 160e2921
      Iustin Pop authored
      This patch removes the duplicate serialization and calls to
      utils.GetNodeDaemonPort in rpc.Client, and instead moves them to calling
      functions (the _*NodeCall ones recently introduced).
      Reviewed-by: ultrotter
  20. 25 Nov, 2008 1 commit
  21. 24 Nov, 2008 1 commit
  22. 21 Nov, 2008 4 commits
  23. 19 Nov, 2008 1 commit
  24. 12 Nov, 2008 3 commits
  25. 23 Oct, 2008 1 commit
    • Iustin Pop's avatar
      Export the disk index in the import/export scripts · 74c47259
      Iustin Pop authored
      We want to export the disk index as some OSes will only want to export
      the first disk (or the second one, etc.), even if we have multiple
      The patch also updates the backend.ExportSnapshot docstring.
      Reviewed-by: ultrotter
  26. 22 Oct, 2008 1 commit
    • Guido Trotter's avatar
      Convert ImportOSIntoInstance to OS API 10 · 6c0af70e
      Guido Trotter authored
      - Change ImportOSIntoInstance not to get any "os_disk" and "swap_disk"
        arguments but to accept multiple target images to import, and to
        return a list of booleans with the result of each import
      - Change the relevant rpc call and the only caller to conform
      - Pass arguments to the import script through the environment
      - Run one import os script for each disk image, passing an IMPORT_DEVICE
      Reviewed-by: iustinp
  27. 20 Oct, 2008 6 commits
    • Iustin Pop's avatar
      Convert the job queue rpcs to address-based · 99aabbed
      Iustin Pop authored
      The two main multi-node job queue RPC calls (jobqueue_update,
      jobqueue_rename) are converted to address-based calls, in order to speed
      up queue changes. For this, we need to change the _nodes attribute on
      the jobqueue to be a dict {name: ip}, instead of a set.
      Reviewed-by: imsnah
    • Iustin Pop's avatar
      Convert rpc.call_upload_file to use addresses · 6b294c53
      Iustin Pop authored
      This patch allows rpc.call_upload_file to use addresses (if passed), and
      also converts the ConfigWriter._DistributeConfig to pass them, since
      this is an often-done operation.
      Reviewed-by: imsnah
    • Iustin Pop's avatar
      Convert non-static rpc calls to use addresses · 25348212
      Iustin Pop authored
      This patch converts all non-staticmethods rpc calls to pass addresses to
      the Client calls.
      This is done via two new small helpers. These functions also deal with
      nodes that are not (yet) in the configuration file, and pass None for
      the address instead (which allow NodeControllers to do resolving).
      Reviewed-by: imsnah
    • Iustin Pop's avatar
      Add infrastructure for using addresses in rpc.py · bdf7d8c0
      Iustin Pop authored
      The patch adds support for passing node addresses to NodeController
      objects, which should speed up the connect sequence.
      The patch also adds another very small optimization of computing the
      content-length header value in the parent Client class instead of each
      Reviewed-by: imsnah
    • Iustin Pop's avatar
      Improve conformance with the style guide for rpc.py · 3ef3c771
      Iustin Pop authored
      This patch renames some internal function to camel case, for compliance
      with the style guide.
      It also fixes the module docstring (how old was that?).
      Reviewed-by: imsnah
    • Iustin Pop's avatar
      Convert rpc.py to use the logging module · 58b311ca
      Iustin Pop authored
      Reviewed-by: imsnah
  28. 17 Oct, 2008 1 commit