Skip to content
Snippets Groups Projects
  1. Sep 21, 2012
  2. Aug 22, 2012
    • Constantinos Venetsanopoulos's avatar
      Add the gnt-storage client · 9bcef16f
      Constantinos Venetsanopoulos authored
      
      Add a new client called 'gnt-storage'.
      The client interacts with the ExtStorage interface, similarly to
      the way gnt-os interacts with the OS interface.
      
      For now, only two commands are supported: 'info' and 'diagnose'.
      
      'diagnose' calculates the node status of each provider on each node,
      similarly to gnt-os diagnose. Furthermore, for every provider, it
      calculates it's nodegroup validity for each nodegroup. This is done
      inside the LU and not the client (marked as 'TODO' for the  global
      validity of gnt-os diagnose).
      
      In the future, gnt-storage can be used to manage storage pools,
      or even be extended to diagnose other storage types supported by
      Ganeti, such as lvm, drbd (INT_MIRROR) or rbd (EXT_MIRROR).
      
      Signed-off-by: default avatarConstantinos Venetsanopoulos <cven@grnet.gr>
      9bcef16f
    • Constantinos Venetsanopoulos's avatar
    • Constantinos Venetsanopoulos's avatar
      Multiple ExtStorage Providers and ext-params · e74f6291
      Constantinos Venetsanopoulos authored
      
      Add support for passing parameters to the ext template (ext-params).
      Take advantage of disk-params, that don't seem to make much sense in
      this template (ExtStorage Providers are not predefined and we don't
      know their needs) and use them to pass the ext-params dynamically to
      the template.
      
      ext-params are correlated with gnt-os-interface's os-params.
      All ext-params are exported to the ExtStorage Provider through it's
      environment, with variables prefixed with 'EXTP_' (similarly to the
      OS interface's 'OSP_' params).
      
      ext-params are passed through the --disk option. If the disk template
      is of type `ext' during instance add, then any additional options that
      are not in IDISK_PARAMS given to --disk are considered ext-params
      e.g.:
      
       gnt-instance add -t ext --disk=0:size=2G,param1=value1,param2=value2
      
      Finally, we introduce a new IDISK_PARAM called IDISK_PROVIDER, that is
      mandatory for template `ext' and is used to select the desired
      ExtStorage Provider. This parameter is not valid for other template
      types.
      
      The IDISK_PROVIDER parameter becomes the first element of the
      disk's unique_id tuple e.g.:
      
       unique_id = ('sample_provider1', 'UUID.ext.diskX')
      
      Example selecting different ExtStorage Providers for each disk and
      passing different ext-params to them:
      
       -t ext --disk=0:size=2G,provider=sample_provider1,param1=value1
              --disk=1:size=3G,provider=sample_provider2,param2=value2
      
      Signed-off-by: default avatarConstantinos Venetsanopoulos <cven@grnet.gr>
      e74f6291
    • Constantinos Venetsanopoulos's avatar
      Implement the External Storage Interface · 868eab67
      Constantinos Venetsanopoulos authored
      
      With this commit we introduce the External Storage Interface
      to Ganeti, abbreviated: ExtStorage Interface.
      
      The ExtStorage Interface provides Ganeti with the ability to interact
      with externally connected shared storage pools, visible by all
      VM-capable nodes. This means that Ganeti is able to handle VM disks
      that reside inside a NAS/SAN or any distributed block storage provider.
      
      The ExtStorage Interface provides a clear API, heavily inspired by the
      gnt-os-interface API, that can be used by storage vendors or sysadmins
      to write simple ExtStorage Providers (correlated to gnt-os-interface's
      OS Definitions). Those Providers will glue externally attached shared
      storage with Ganeti, without the need of preprovisioned block devices
      on Ganeti VM-capable nodes as confined be the current `blockdev' disk
      template.
      
      To do so, we implement a new disk template called `ext' (of type
      DTS_EXT_MIRROR) that passes control to externally provided scripts
      (the ExtStorage Provider) for the template's basic functions:
      
       create / attach / detach / remove / grow
      
      The scripts reside under ES_SEARCH_PATH (correlated to OS_SEARCH_PATH)
      and only one ExtStorage Provider is supported called `ext'.
      
      The disk's logical id is the tuple ('ext', UUID.ext.diskX), where UUID
      is generated as in disk template `plain' and X is the disk's index.
      
      Signed-off-by: default avatarConstantinos Venetsanopoulos <cven@grnet.gr>
      868eab67
    • Constantinos Venetsanopoulos's avatar
      Fix computation of disk sizes in _ComputeDiskSize · 6a3166cb
      Constantinos Venetsanopoulos authored
      
      Currently, hail fails with FailDisk when trying to add an instance
      of type: 'file', 'sharedfile' and 'rbd'.
      
      This is due to a "0" or None value in the corresponding dict inside
      _ComputeDiskSize, which results in a "O" or non Int value of the
      exported 'disk_space_total' parameter. This in turn makes hail fail,
      when trying to process the value:
      
       - with "Unable to read Int" if value is None (file)
       - with FailDisk if value is 0 (sharedfile, rbd)
      
      The latter happens because the 0 value doesn't match the instance's
      IPolicy, since it is lower than the minimum disk size.
      
      The second problem still exists when using adoption with 'plain'
      and 'blockdev' template and will be addressed in another commit.
      
      Signed-off-by: default avatarConstantinos Venetsanopoulos <cven@grnet.gr>
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      6a3166cb
  3. Aug 15, 2012
    • Iustin Pop's avatar
      Add verification of RPC results in _WipeDisks · f08e5132
      Iustin Pop authored
      
      Due to an oversight, the pause/resume sync RPC calls in _WipeDisks
      lack the verification of the overall RPC status, and directly iterate
      over the payload. The code actually doing the wipe does verify
      correctly the results. This can result in jobs failing with a hard to
      diagnose:
      
      OpExecError ['NoneType' object is not iterable]
      
      instead of proper "RPC failed" message.
      
      This patch adds a hard check on the pause call, but for the resume
      call it just logs a warning if the RPC failed; the rationale being
      that if we can't contact the node for pausing the sync, it's likely
      wiping will fail too, but after the wipe has been done, we can
      continue.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      f08e5132
  4. Aug 10, 2012
  5. Jul 27, 2012
  6. Jul 26, 2012
    • Iustin Pop's avatar
      Fix issue in LUClusterVerifyGroup with multi-group clusters · 350506c6
      Iustin Pop authored
      
      In case LUClusterVerifyGroup is run on a group which doesn't contain
      the master node, the following could happen:
      
      - master node is selected due to the explicit check
      - if the order of nodes in the 'absent_nodes' list is such that the
        master node is the first in it, then we'll select (again) the master
        node
      - passing duplicate nodes to RPC calls will break due to RPC
        internals; this should be fixed separately, but in the meantime we
        just refrain from passing such duplicates
      
      This patch should not change the semantics of the code, since it
      wasn't guaranteed even before that we find a vm_capable node.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarBernardo Dal Seno <bdalseno@google.com>
      350506c6
    • Iustin Pop's avatar
      Fix node group modification of node parameters · 4bf27dab
      Iustin Pop authored
      
      Commit 904b3bfe tried to fix the deletion of custom ndparams from
      group, but instead broke both modification and deletion: because we
      run ForceDictType on self.op.ndparams instead of the updated
      new_ndparams, we can neither delete nor set properly spindle_count
      (since it won't be coerced to int).
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      4bf27dab
  7. Jul 24, 2012
    • Iustin Pop's avatar
      Fix boot=on flag for CDROMs · 24be50e0
      Iustin Pop authored
      
      This generalises commit 4304964a to cdroms too, since they have
      somewhat the same logic. We just abstract the needs_boot_flag into a
      separate variable, and then reuse it in the cdrom section.
      
      Note that the logic of what 'if=' type to pass to KVM was very
      convoluted, and (I think) incorrect; I went and cleaned it to be more
      consistent.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      24be50e0
    • Iustin Pop's avatar
      KVM: only pass boot flag once · 2b846304
      Iustin Pop authored
      
      This addresses issue 230: passing two methods of booting to KVM can,
      depending on the KVM version, confuse it.
      
      Note that commit 4304964a introduced a partial fix for this (but only
      for disks, and keyed on KVM versions). However, it didn't fix cdrom
      booting, which still fails with the same error, so let's fix it more
      generically; we still leave the per-disk check since that is about
      -boot c versus -drive …,boot=on rather than two boot methods.
      
      Patch is based on the one submitted by Vladimir Mencl, many thanks!
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      2b846304
  8. Jul 19, 2012
  9. Jul 18, 2012
  10. Jul 17, 2012
  11. Jul 13, 2012
  12. Jul 11, 2012
  13. Jul 07, 2012
  14. Jul 06, 2012
  15. Jul 05, 2012
  16. Jun 29, 2012
  17. Jun 28, 2012
  18. Jun 27, 2012
  19. Jun 20, 2012
    • Iustin Pop's avatar
      Fix bug in instance net changes · 80b898f9
      Iustin Pop authored
      
      _PrepareNicModification returns the invalid type, which triggers an
      assert resulting in a mysterious error:
      
      Failure: command execution error:
      
      Without any explanation. We fix this by removing the return value from
      _PrepareNicModification, and instead returning the expected type
      (since it differs per create/modification) from the (existing)
      wrappers for this function. We don't need to return actual changes
      from this function as _ApplyNicMods is the function that
      computes/returns the formatted changes.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Signed-off-by: default avatarRené Nussbaumer <rn@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      80b898f9
  20. Jun 19, 2012
  21. Jun 18, 2012
  22. Jun 15, 2012
Loading