1. 27 Nov, 2008 1 commit
    • Iustin Pop's avatar
      Fix gnt-backup export · 726d7d68
      Iustin Pop authored
      This patch fixes a bug in disk calculation for gnt-backup export, which
      completely broke one-disk instance export.
      The patch also corrects some error messages and style issues.
      Reviewed-by: ultrotter
  2. 25 Nov, 2008 1 commit
  3. 24 Nov, 2008 1 commit
  4. 21 Nov, 2008 1 commit
  5. 11 Nov, 2008 1 commit
    • Iustin Pop's avatar
      Convert trunk to posix-compatibility · d868edb4
      Iustin Pop authored
      We change two functions to use RunCmd without shell, and the other
      (which needs a ssh command line) is changed to the '>... 2>&1' syntax.
      Reviewed-by: imsnah
  6. 25 Oct, 2008 2 commits
    • Iustin Pop's avatar
      Update backend.py docstrings · 10c2650b
      Iustin Pop authored
      This patch converts all of backend.py to epydoc formatting.
      Reviewed-by: imsnah
    • Iustin Pop's avatar
      Fix another error handling case · 3f5bd234
      Iustin Pop authored
      The return from this error path is a dict, but the actual return value
      (on the non-error handling) is a list of dicts. Change accordingly.
      Reviewed-by: imsnah
  7. 24 Oct, 2008 3 commits
  8. 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
  9. 22 Oct, 2008 4 commits
    • 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
    • Guido Trotter's avatar
      Convert ExportSnapshot to OS API 10 · 0607699d
      Guido Trotter authored
      We pass the data via the environment rather than on the command line, as
      API 10 says. All the rest remains the same, and we export just one disk,
      as the master calls this function for every snapshotted disk.
      Reviewed-by: iustinp
    • Guido Trotter's avatar
      LUExportInstance: snapshot all disks · 19d7f90a
      Guido Trotter authored
      Rather than just snapshotting the "sda" disk, we'll snapshot all of the
      instance disks. If we can't snapshot a disk for any reason we'll log an
      error and proceed anyway: in this case the resulting export will miss a
      disk. This also changes all the warning messages to self.LogWarning().
      Reviewed-by: iustinp
    • Guido Trotter's avatar
      Convert SnapshotBlockDevice's docstring to epydoc · e9e9263d
      Guido Trotter authored
      Reviewed-by: iustinp
  10. 17 Oct, 2008 7 commits
  11. 15 Oct, 2008 1 commit
  12. 14 Oct, 2008 3 commits
    • Iustin Pop's avatar
      Change the backend to use the beparams · 51de46bf
      Iustin Pop authored
      The backend.FinalizeExport function is changed to use the beparams
      instead of the instance attributes. Future enhancements should be done
      in order to export and import/reuse the whole be/hv params.
      Reviewed-by: ultrotter
    • Iustin Pop's avatar
      Temporary fix for dual hvm/pvm instances · f23b5ae8
      Iustin Pop authored
      We have a problem with the current model of combining instance lists
      from multiple hypervisors: we don't allow duplicates, but "xm list"
      gives the same output for both pvm and hvm. This is a lack in the actual
      xen hypervisor implementation/split between pvm and hvm, but for now we
      implement a weak workaround: identical instance params will be allowed,
      and merged. This breaks because there is a delta in listing, and should
      be treated as temporary workaround only.
      Note that there are two cases for duplicate instance: the above one (xen
      is the same, whether pvm or hvm), and the other case, the real error,
      when we have two different hypervisors reporting the same instance name.
      The latter case needs to be handled better (not by refusing to list the
      instances in the backend).
      Reviewed-by: ultrotter
    • Iustin Pop's avatar
      Export the hypervisor.ValidateParameters over RPC · 6217e295
      Iustin Pop authored
      The newly-added node-specific ValidateParams hypervisor method is
      exported over RPC, using the semi-standard (success, message) return
      value. Multi-node call, so that we call on both primary and secondary at
      Reviewed-by: ultrotter
  13. 12 Oct, 2008 1 commit
    • Iustin Pop's avatar
      Abstract checking own address into a function · caad16e2
      Iustin Pop authored
      Currently, we check if we have a given ip address (i.e. it's alive on
      one of our interfaces) but manually calling TcpPing(source=localhost).
      This works, but having it spread all over the code makes it hard to
      change the implementation.
      The patch abstracts this into a separate utils.OwnIpAddress(addr)
      function. We add a rpc call for it, which we use instead of the
      (single-use of) call_node_tcp_ping. We leave node_tcp_ping in, as seems
      useful and eventually it should be removed in a separate patch.
      Reviewed-by: imsnah
  14. 10 Oct, 2008 1 commit
    • Guido Trotter's avatar
      OS API: support for multiple versions in an OS · 082a7f91
      Guido Trotter authored
      Allow multiple api versions in an OS. This is according to the OS API
      changes design doc, by which an OS can support multiple versions of the
      Ganeti API and if one is supported by Ganeti it will work. Since up to
      version 5 of the API mandates an OS could support only one version, this
      change is retrocompatible with it and requires no version bump up.
      Reviewed-by: iustinp
  15. 08 Oct, 2008 1 commit
    • Iustin Pop's avatar
      Move the hypervisor attribute to the instances · e69d05fd
      Iustin Pop authored
      This (big) patch moves the hypervisor type from the cluster to the
      instance level; the cluster attribute remains as the default hypervisor,
      and will be renamed accordingly in a next patch. The cluster also gains
      the ‘enable_hypervisors’ attribute, and instances can be created with
      any of the enabled ones (no provision yet for changing that attribute).
      The many many changes in the rpc/backend layer are due to the fact that
      all backend code read the hypervisor from the local copy of the config,
      and now we have to send it (either in the instance object, or as a
      separate parameter) for each function.
      The node list by default will list the node free/total memory for the
      default hypervisor, a new flag to it should exist to select another
      hypervisor. Instance list has a new field, hypervisor, that shows the
      instance hypervisor. Cluster verify runs for all enabled hypervisor
      The new FIXMEs are related to IAllocator, since now the node
      total/free/used memory counts are wrong (we can't reliably compute the
      free memory).
      Reviewed-by: imsnah
  16. 07 Oct, 2008 1 commit
    • Iustin Pop's avatar
      rpc.call_instance_migrate: pass the whole instance · 9f0e6b37
      Iustin Pop authored
      Currently the call_instance_migrate call only passes the instance name;
      we need to pass the whole object for the hypervisor_type changes (all
      the other individual instance rpc calls already pass the instance
      Reviewed-by: imsnah
  17. 06 Oct, 2008 2 commits
    • Iustin Pop's avatar
      backend.py change to get cluster name from master · 62c9ec92
      Iustin Pop authored
      Currently there are three function in backend that need the cluster name
      in order to instantiate an SshRunner. The patch changes these to get the
      cluster name from the master in the rpc call; once the multi-hypervisor
      change is implemented, then very few places in which we need the SCR
      remain in the backend.
      Reviewed-by: killerfoxi, imsnah
    • Iustin Pop's avatar
      Fix SshRunner breakage from the changed API · 6b0469d2
      Iustin Pop authored
      More places actually use the SshRunner than just the gnt-cluster
      Reviewed-by: ultrotter
  18. 01 Oct, 2008 3 commits
  19. 09 Sep, 2008 2 commits
    • Michael Hanselmann's avatar
      Never remove job queue lock in node daemon · 1bc59f76
      Michael Hanselmann authored
      Otherwise, corruption could occur in some corner cases. E.g. when
      LeaveNode is running in a child and is in the process of removing
      queue files, the main process gets killed, started again and gets
      a request to update the queue. This is rather extreme corner case,
      but we should opt for safety.
      Reviewed-by: iustinp
    • Iustin Pop's avatar
      Change backend._GetMasterInfo to return more data · bd1e4562
      Iustin Pop authored
      The _GetMasterInfo() function needs to export the master name too to be
      useful in master safety checks. This patch makes it a public (no _)
      function and adds a third element in the return tuple. Its callers are
      modified too.
      Reviewed-by: imsnah
  20. 14 Aug, 2008 1 commit
    • Guido Trotter's avatar
      Pass hypervisor type to the OS scripts · 4f0afaf5
      Guido Trotter authored
      It's handy to make the os scripts know which hypervisor the instance is
      going to run under. In order not to change the os API we pass this
      information in the environment, where the os scripts can access it if
      they're hypervisor-aware.
      Reviewed-by: imsnah
  21. 08 Aug, 2008 2 commits