1. 21 Nov, 2008 1 commit
  2. 20 Nov, 2008 3 commits
    • Iustin Pop's avatar
      Convert replace-disks (same nodes) to multi-disk · 54155f52
      Iustin Pop authored
      This patch changes the drbd8 replace disk only (no secondary change) to
      work in with multi-disk. This mode of replaces works correctly with
      replacing only a subset of disks.
      
      Reviewed-by: imsnah
      54155f52
    • 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
    • Iustin Pop's avatar
      Add more disk/nic listing options in gnt-instance · 41a776da
      Iustin Pop authored
      This adds some more listing cases (useful for scripting/rapi):
        - disk.sizes for a list of all sizes
        - nic.(ips|macs|bridges)
      
      Reviewed-by: imsnah
      41a776da
  3. 18 Nov, 2008 3 commits
    • Iustin Pop's avatar
      Allow querying of variable number of parameters · 71c1af58
      Iustin Pop authored
      This patch adds support for querying in gnt-instance list of:
        - disk.count
        - nic.count
        - disk.size/$N
        - nic.(ip|mac|bridge)/$N
      
      The patch also disables the exception raised when the header description
      is missing, that should be fixed in the future (together with better
      handling of variable numeric fields).
      
      Reviewed-by: imsnah
      71c1af58
    • Iustin Pop's avatar
      Convert cmdlib.py to _FieldSet · 31bf511f
      Iustin Pop authored
      This patch converts the current usage of _CheckOutputFields to the
      FieldSet class, but it doesn't start to use its variable matching
      features.
      
      Reviewed-by: ultrotter
      31bf511f
    • Iustin Pop's avatar
      Add a FieldSet class for variable parameter sets · 6de7c41d
      Iustin Pop authored
      This patch adds a _FieldSet class that can be used for the new variable
      parameter sets: e.g. the sda_size will change to disk/0.size (or
      similar) and we need to both check validity and extract the index of the
      parameter easily.
      
      The patch also sorts the unittest list in Makefile.am.
      
      Reviewed-by: ultrotter
      6de7c41d
  4. 11 Nov, 2008 2 commits
    • Iustin Pop's avatar
      Fix instance rename · cb4e8387
      Iustin Pop authored
      As can be seen from the patch, we remove from the locking manager
      inst.name. However, we do this right after cfg.RenameInstance, which
      changes inst.name to the new name. So we need to remove old_name not
      the new name.
      
      The real question is why does the glm allow me to remove a not-existing
      instance name...
      
      The symptom before the patch was: run rename, then:
      $ gnt-instance list
      Unhandled protocol error while talking to the master daemon:
      Caught exception: 'NoneType' object has no attribute 'primary_node'
      
      Reviewed-by: imsnah
      cb4e8387
    • Iustin Pop's avatar
      Fix gnt-instance reinstall · bb2ee932
      Iustin Pop authored
      Commit 1881 changed a rpc call but didn't fix all its users. This should
      fix it (but I can't test as HTTP is broken).
      
      Reviewed-by: imsnah
      bb2ee932
  5. 05 Nov, 2008 1 commit
  6. 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
      disks.
      
      The patch also updates the backend.ExportSnapshot docstring.
      
      Reviewed-by: ultrotter
      74c47259
  7. 22 Oct, 2008 4 commits
    • Oleksiy Mishchenko's avatar
      RAPI: Export beparams as dict. The patch also enables LUQueryInstances to... · 1a05d855
      Oleksiy Mishchenko authored
      RAPI: Export beparams as dict. The patch also enables LUQueryInstances to accept beparams as valid field.
      
      Reviewed-by: iustinp
      
      1a05d855
    • Guido Trotter's avatar
      LUCreateInstance: import multiple disks · 09acf207
      Guido Trotter authored
      Previously we used to handle only one disk. Now we'll import all the
      ones present in the export, in order, on the instance's disks. Any disk
      which was present on the original instance but wasn't exported is just
      skipped in the target instance.
      
      Reviewed-by: iustinp
      09acf207
    • 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
      6c0af70e
    • 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
      19d7f90a
  8. 21 Oct, 2008 1 commit
    • Iustin Pop's avatar
      Move some LU logging to use proc.Log* · 86d9d3bb
      Iustin Pop authored
      We change some messages which are obviously intended for the user to use
      the proc.Log* functions instead of (only) the logging ones.
      
      We also fix some wrong uses of feedback_fn.
      
      Reviewed-by: imsnah
      86d9d3bb
  9. 20 Oct, 2008 6 commits
    • 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
    • Guido Trotter's avatar
      Use constants.VALUE_AUTO for ip comparison too · 6fde8221
      Guido Trotter authored
      Forward-port-of: r1889, Reviewed-by: imsnah
      
      Reviewed-by: imsnah
      6fde8221
    • Guido Trotter's avatar
      LUCreateInstance: reuse mac address on import · bc89efc3
      Guido Trotter authored
      When importing an instance with the same name as the exported one if the
      mac address is "auto" we try to reuse the previous mac address. One can
      still force generation of a new one with mac="generate".
      
      Forward-port-of: r1887, Reviewed-by: iustinp
      
      Reviewed-by: imsnah
      bc89efc3
    • Guido Trotter's avatar
      LUCreateInstance: accept mac = VALUE_GENERATE · c78995f0
      Guido Trotter authored
      VALUE_GENERATE is handled exactly the same as VALUE_AUTO and the mac
      address is generated randomly.
      
      Forward-port-of: r1886, Reviewed-by: iustinp
      
      Reviewed-by: imsnah
      c78995f0
    • Iustin Pop's avatar
      Convert cmdlib.py to use the logging module · 9a4f63d1
      Iustin Pop authored
      Note that many uses of logger.Error were used in 1.2 for their
      side-effect of logging to stderr, where the user will see the messages,
      and not for having the entry in the log. As such, we need to go over and
      review every use of logging.* and decide if it should use feedback_fn
      instead of being a logging call.
      
      Reviewed-by: imsnah
      9a4f63d1
    • Iustin Pop's avatar
      Fix gnt-instance modify with beparams · 61be6ba4
      Iustin Pop authored
      The gnt-instance modify didn't work correctly w.r.t the be parameters.
      There was also a typo in the corresponding LU.
      
      Reviewed-by: imsnah
      61be6ba4
  10. 17 Oct, 2008 1 commit
  11. 16 Oct, 2008 3 commits
    • Iustin Pop's avatar
      Enable gnt-cluster modify to hv/beparams · 779c15bb
      Iustin Pop authored
      This patch enables the cluster modify to change:
        - enabled hypervisor list
        - hvparams (per hypervisor)
        - beparams (only the default group)
      
      Syntax:
        gnt-cluster modify -B vcpus=3 -H xen-pvm:no_initrd_path
      
      Validation for parameters is somewhat missing - the individual
      hypervisors will be checked for syntax and validation, but beparams
      doesn't have validation yes (nowhere), it should be added here once we
      have a global method (will come soon).
      
      Reviewed-by: imsnah
      779c15bb
    • Iustin Pop's avatar
      Show the cluster parametrs in gnt-cluster info · 469f88e1
      Iustin Pop authored
      This is just a raw update without any special formatting.
      
      Reviewed-by: imsnah
      469f88e1
    • Iustin Pop's avatar
      Add an interface for the drain flag changes/query · 3ccafd0e
      Iustin Pop authored
      This adds the set/reset in the jqueue and luxi modules, and a way to
      query it in OpQueryConfigValues, and also the comand line interface for
      it:
      $ gnt-cluster queue info
      The drain flag is unset
      $ gnt-cluster queue drain
      $ gnt-cluster queue info
      The drain flag is set
      $ gnt-cluster queue undrain
      $ gnt-cluster queue info
      The drain flag is unset
      
      The choice of making the setting via luxi and not an opcode is that
      opcodes can't be executed when drained, but we don't query via luxi
      since in the future it might become a cluster property as opposed to a
      node one.
      
      Reviewed-by: imsnah
      3ccafd0e
  12. 14 Oct, 2008 12 commits
    • Iustin Pop's avatar
      grow-disk: wait until resync is completed · 6605411d
      Iustin Pop authored
      The patch adds a new ‘--no-wait-for-sync’ parameter to grow-disk similar
      to the one in instance add, and changes the default to wait.
      
      This is cleaner as at the moment when the command returns, we either
      have a fully synced disk or there is an error.
      
      This is a forward-port of rev 1183 on the 1.2 branch.
      
      Reviewed-by: ultrotter
      6605411d
    • Iustin Pop's avatar
      Some fixes related to auto_balance · c0f2b229
      Iustin Pop authored
      Change the constant name to match the value (autobalance ->
      auto_balance).
      
      Also add the auto_balance header so that gnt-instance can list it.
      
      Reviewed-by: ultrotter
      c0f2b229
    • Iustin Pop's avatar
      Fix auto_balance and memory modification · 647a5d80
      Iustin Pop authored
      The secondary nodes should not be checked for free memory in case of non
      auto-balanced instances.
      
      This is a forward-port from rev 1567 on the 1.2 branch.
      
      Reviewed-by: ultrotter
      647a5d80
    • Iustin Pop's avatar
      Use the auto_balance in cluster verify · 3924700f
      Iustin Pop authored
      This patch changes the cluster verify in two ways:
        - do not use instances marked with auto_balance=False in N+1 memory
          checks
        - report, if any, the number of instances with auto_balance=False
      
      Forward port from rev 1562 on the 1.2 branch.
      
      Reviewed-by: ultrotter
      3924700f
    • Iustin Pop's avatar
      Fix ordering of instance/nodes · c1f1cbb2
      Iustin Pop authored
      After the locking changes, and the partial locking of nodes, the
      instance/node list is not ordered anymore. Reorder so that it behaves as
      before.
      
      Reviewed-by: ultrotter
      c1f1cbb2
    • Iustin Pop's avatar
      Change over to beparams · 338e51e8
      Iustin Pop authored
      This big patch changes the master code to use the beparams. Errors might
      have crept in, but it passes a small burnin.
      
      Reviewed-by: ultrotter
      338e51e8
    • Iustin Pop's avatar
      Fix a bug with instance creation and hvparameters · 8705eb96
      Iustin Pop authored
      When creating an instance, we need to check not the opcode hvparams, but
      the final, filled hvparams against validity. While we do this for the
      remote node calls (i.e. ValidateParams), we didn't do this for
      CheckParameterSyntax.
      
      Reviewed-by: imsnah
      8705eb96
    • Iustin Pop's avatar
      Allow instance info to only query the config file · 57821cac
      Iustin Pop authored
      This patch adds a new '-s' parameter to ‘gnt-instance info’ that makes
      it return only 'static' information. This is much faster, especially for
      drbd instances.
      
      This is a forward-port of rev 1570 on the ganeti-1.2 branch, resending
      due to some conflicts.
      
      Reviewed-by: imsnah
      57821cac
    • Iustin Pop's avatar
      Convert gnt-instance info to the hvparams model · 24838135
      Iustin Pop authored
      Some informations are not printed nicely (e.g. “virtual CDROM: False”),
      but this is the first step.
      
      Reviewed-by: imsnah
      24838135
    • Iustin Pop's avatar
      Change gnt-instance modify to the hvparams model · 74409b12
      Iustin Pop authored
      Reviewed-by: imsnah
      74409b12
    • Iustin Pop's avatar
      Change gnt-instance list to the hvparams model · 5018a335
      Iustin Pop authored
      This is just a change of the various hvm_ and pvm parameters to the hv
      model. Parameters are queried via hv/$name or via the whole dict as
      returned by hvparams.
      
      Reviewed-by: ultrotter,imsnah
      5018a335
    • Iustin Pop's avatar
      Switch instance hypervisor parameters to hvparams · 6785674e
      Iustin Pop authored
      This big patch changes instance create to the new hvparams structure.
      Old parameters are removed, so old jobs or old instances file will break
      current clusters.
      
      Reviewed-by: ultrotter
      6785674e
  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
      caad16e2
  14. 10 Oct, 2008 1 commit
    • Guido Trotter's avatar
      LUVerifyCluster: fix error from rpc call · 2eb78bc8
      Guido Trotter authored
      When calling node_verify leads to an error _VerifyNodes tries to iterate
      over a non-sequence. Catch the error before and avoid this from
      happening.
      
      Reviewed-by: iustinp
      2eb78bc8