1. 21 Jan, 2009 2 commits
    • Iustin Pop's avatar
      Change the instance status attribute to boolean · 0d68c45d
      Iustin Pop authored
      Due to historic reasons, the “should run or not” attribute of an
      instance was denoted by its “status” attribute having a string value of
      either ‘up’ or ‘down’. Checking this is in code was done via hardcoding
      of the strings.
      
      This was long done for a redo, and this patch changes this attribute to
      “admin_up” having a boolean value. The patch is in fact shorter than I
      expected, and passes burnin.
      
      The patch also fixes an error in BuildInstanceHookEnvByObject where the
      instance.os was passed as the status value.
      
      Reviewed-by: ultrotter
      0d68c45d
    • Iustin Pop's avatar
      Update the objects.Disk formatting method · 89f28b76
      Iustin Pop authored
      With the addition of minors, this needs to show them too.
      
      Reviewed-by: ultrotter
      89f28b76
  2. 20 Jan, 2009 1 commit
  3. 19 Jan, 2009 2 commits
    • Iustin Pop's avatar
      Fix non-drbd instance creation · 99c7b2a1
      Iustin Pop authored
      Commit 2294 introduced a new instance.all_nodes property, which
      unfortunately is working incorrectly for non-drbd instances.
      
      This patch fixes it by making sure the primary node is always added to
      the set, even before recursing over (any potential) children.
      
      Reviewed-by: imsnah
      99c7b2a1
    • Iustin Pop's avatar
      Small simplification in MapLVsByNode · 7c5abcae
      Iustin Pop authored
      We don't need to pre-create the node entries in lvmap, since they will
      be created at recursion time.
      
      Reviewed-by: ultrotter
      7c5abcae
  4. 16 Jan, 2009 1 commit
    • Iustin Pop's avatar
      Instance: add a new all_nodes property · cfcc5c6d
      Iustin Pop authored
      Since we often need the list of all nodes of an instance, we add a new
      "all_nodes" property that returns all nodes of the instance, and we
      switch secondary_nodes to a simpler implementation based on this new
      function.
      
      Reviewed-by: ultrotter
      cfcc5c6d
  5. 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
      c41eea6e
  6. 05 Dec, 2008 1 commit
    • Iustin Pop's avatar
      Add a new node parameter 'offline' · fc0fe88c
      Iustin Pop authored
      This patch adds a new node parameter called offline that will be used to
      mark nodes which should be touched by commands.
      
      We also add this flag at cluster init, node add, and export it to
      iallocator scripts.
      
      Reviewed-by: ultrotter
      fc0fe88c
  7. 02 Dec, 2008 2 commits
  8. 21 Nov, 2008 1 commit
    • Iustin Pop's avatar
      Change GrowDisk to work with multi-disk · ad24e046
      Iustin Pop authored
      This patch changes the instance.FindDisk method to take index arguments
      (instead of iv_names), and changes GrowDisk and list instances
      accordingly.
      
      Reviewed-by: ultrotter
      ad24e046
  9. 20 Nov, 2008 1 commit
    • Iustin Pop's avatar
      Initial multi-disk/multi-nic support · 08db7c5c
      Iustin Pop authored
      This patch adds support for mult-disk/multi-nic in:
        - instance add
        - burnin
      
      The start/stop/failover/cluster verify work as expected. Replace disk
      and grow disk are TODO.
      
      There's also a change gnt-job to allow dictionaries to be listed in
      gnt-job info.
      
      Reviewed-by: imsnah
      08db7c5c
  10. 20 Oct, 2008 1 commit
    • Alexander Schreiber's avatar
      Set default hypervisor at cluster init · 02691904
      Alexander Schreiber authored
      During cluster init, set the default hypervisor to be used for instances.
      Ensure that the default hypervisor belongs to the set enabled hypervisors
      for this cluster. Also fix a small bug with setting the default enabled
      hypervisor list.
      
      Reviewed-by: imsnah
      
      02691904
  11. 14 Oct, 2008 3 commits
  12. 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
      082a7f91
  13. 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
      types.
      
      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
      e69d05fd
  14. 01 Oct, 2008 1 commit
  15. 29 Sep, 2008 1 commit
    • Iustin Pop's avatar
      Extend DRBD disks with shared secret attribute · f9518d38
      Iustin Pop authored
      This patch, which is similar to r1679 (Extend DRBD disks with minors
      attribute), extends the logical and physical id of the DRBD disks with a
      shared secret attribute. This is generated at disk creation time and
      saved in the config file.
      
      The generation of the secret is done so that we don't have duplicates in
      the configuration (otherwise the goal of preventing cross-connection
      will not be reached), so we add to config.py more than just a simple
      call to utils.GenerateSecret().
      
      The patch does not yet enable the use of the secrets.
      
      Reviewed-by: imsnah
      f9518d38
  16. 27 Sep, 2008 1 commit
    • Iustin Pop's avatar
      Add serial_no attributes to objects · be1fa613
      Iustin Pop authored
      This patch adds the ‘serial_no’ attribute to the other top-level objects
      (the configuration object itself, the nodes and the instances).
      
      Reviewed-by: ultrotter
      be1fa613
  17. 22 Sep, 2008 1 commit
    • Iustin Pop's avatar
      Extend DRBD disks with minors attribute · ffa1c0dc
      Iustin Pop authored
      This patch converts the DRBD disks to contain also a minor (per each
      node) attribute. This minor is not yet used and is always initialized
      with None, so the patch does not have any real-world impact - except for
      automatically upgrading config files (it adds the minors as None, None).
      
      Reviewed-by: imsnah
      ffa1c0dc
  18. 29 Aug, 2008 1 commit
  19. 25 Jun, 2008 1 commit
    • Michael Hanselmann's avatar
      Cleanup old DRBD 0.7.x code · 00fb8246
      Michael Hanselmann authored
      Apparently there were still some leftovers. While removing an instance,
      I got the message "unhandled exception 'module' object has no attribute
      'LD_MD_R1'".
      
      Reviewed-by: iustinp
      00fb8246
  20. 23 Jun, 2008 1 commit
  21. 17 Jun, 2008 2 commits
    • Iustin Pop's avatar
      Allow disk object to set their own physical ID · 0402302c
      Iustin Pop authored
      Currently, the way to customize a DRBD disk from (node name 1, node name
      2, port) to (ip1, port, ip2, port) is to use the ConfigWriter method
      SetDiskID. However, since this needs a ConfigWriter object, it can be
      run only on the master, and therefore disk object can't be passed to
      more than one node unchanged. This, coupled with the rpc layer
      limitation that all nodes in a multi-node call receive the same
      arguments, prevent any kind of multi-node operation that has disks as an
      argument.
      
      This patch takes the SetDiskID method from ConfigWriter and ports it to
      the disk object itself, and instead of the full node configuration it
      uses a simple {node_name: replication_ip} mapping for all the nodes
      involved in the disk tree (currently we only pass primary and secondary
      node since we don't support nested drbd devices).
      
      This allows us to send disks to both the primary and secondary nodes at
      once and perform synchronized drbd activation on primary/secondary
      nodes.
      
      Note that while for the 1.2 branch this will not change old methods, it
      is worth to investigate and possible replace all such calls on the
      master to the nodes themselves for the 2.0 branch.
      
      Reviewed-by: ultrotter
      0402302c
    • Iustin Pop's avatar
      Add method to update a disk object size · acec9d51
      Iustin Pop authored
      This patch adds a method that implements updating of a disk
      (object.Disk) size, together with its children.
      
      While this will not track the exact disk size, it allows at least an
      approximate size to be recorded in the configuration (and queried).
      
      Reviewed-by: imsnah
      acec9d51
  22. 30 May, 2008 1 commit
    • Iustin Pop's avatar
      Complete removal of md/drbd 0.7 code · abdf0113
      Iustin Pop authored
      This patch removes the last of the md and drbd 0.7 code. Cluster which
      have the old device types will be broken if they have this applied.
      
      Reviewed-by: imsnah
      abdf0113
  23. 25 Apr, 2008 1 commit
  24. 21 Apr, 2008 1 commit
    • Iustin Pop's avatar
      Abstract the json functions into a separate module · 8d14b30d
      Iustin Pop authored
      This simple patch adds a new module that holds the simplejson functions
      for serialization/deserialization. This reduces the amount of redundant
      code.
      
      The patch also adds some normalizations to the json output:
        - the output text will always have an EOL as last char
        - extra spaces before EOL are removed
      
      Reviewed-by: ultrotter
      8d14b30d
  25. 25 Mar, 2008 1 commit
  26. 05 Mar, 2008 1 commit
  27. 09 Jan, 2008 1 commit
  28. 08 Jan, 2008 1 commit
    • Iustin Pop's avatar
      Add kernel/initrd paths to the instance object · 2d8c9c2e
      Iustin Pop authored
      This patch adds two new attributes to the instance object:
        - kernel_path
        - object_path
      
      The code ignores them and the configuration handling is not broken by
      this addition.
      
      Reviewed-by: imsnah
      2d8c9c2e
  29. 17 Dec, 2007 1 commit
  30. 06 Nov, 2007 2 commits
    • Iustin Pop's avatar
      Allow DRBD8 operation without backing storage · fc1dc9d7
      Iustin Pop authored
      This patch adds the following functionality:
        - DRBD8 devices can assemble without local storage (done by allowing
          None in the list of children, and making DRBD8 to ignore all
          children if any is None)
        - DRBD8 devices can attach (i.e. identify a device) which is not
          connected to backing storage but to the correct network ports; this
          is a rare case in normal operation (it's what would happen if one
          manually detaches the local disk, and the backing LV still exists)
      
      Reviewed-by: imsnah
      fc1dc9d7
    • Iustin Pop's avatar
      Add a support function to objects.Disk · 222f2dd5
      Iustin Pop authored
      This patch adds a function returning the device path if it is computable
      from the disk object (and we don't need to instantiate a bdev object on
      the target node in order to compute this). Only LVs support this.
      
      Reviewed-by: imsnah
      222f2dd5
  31. 05 Nov, 2007 2 commits
    • Guido Trotter's avatar
      Create OS from an InvalidOS error · d2c807e4
      Guido Trotter authored
      Add a new FromInvalidOS static function to objects.OS that makes it easy to
      create an object representing a broken OS starting from the relevant exception.
      
      Reviewed-By: iustinp
      
      d2c807e4
    • Guido Trotter's avatar
      Make the OS object able to represent broken OSes · 37482e7b
      Guido Trotter authored
      Till now the OS object just represents a correct OS instance.  Change it so it
      can represent a broken one too, by adding a "status" field: if this field is
      different from the OS_VALID_STATUS constant the object is considered to be an
      invalid OS, the "status" field to be a debugging message, and its boolean
      status is set to false.
      
      Reviewed-By: iustinp
      37482e7b
  32. 02 Nov, 2007 1 commit