Skip to content
Snippets Groups Projects
  1. Jun 23, 2010
  2. Jun 22, 2010
  3. Jun 14, 2010
    • Iustin Pop's avatar
      Rework LUSetInstanceParams._GetUpdatedParams · 422d4619
      Iustin Pop authored
      
      Currently, this function does three things:
      - special handling of constants.VALUE_DEFAULT
      - type enforcing of the resulting dict
      - filling the dictionary with defaults
      
      However, except for the first one, the second two do not belong in this
      function:
      - in the future, not all parameter dictionaries will be able to be
        enforced
      - filling the dictionary with defaults cannot be done via a defaults
        dict in all cases, and should be done by the specialized functions
        (ideally we'd pass a partial function instance here, but we don't have
        that yet…)
      
      As such, we remove the last items, and move them to the callers; this is
      overall the same complexity, as we were calling this function in just
      three places and constructing the many arguments was also complicated.
      
      Furthermore, we move the function out of LUSetInstanceParams, as in the
      future it will be used by LUSetClusterParams too.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      422d4619
    • Iustin Pop's avatar
      Add cluster.SimpleFill*() functions · 73e0328b
      Iustin Pop authored
      
      Currently, the existing cluster.Fill* functions take as argument an
      instance. This means that in any case where we don't have an actual
      instance object, we have to resort to calling the low-level
      objects.FillDict function.
      
      This is bad for two reasons:
      - we have to know of, and we hardcode, the cluster object internals
        (e.g. that the nicparams are stored in a dict indexed by group)
      - which can result in subtle bugs, if the underlying storage mechanisms
        change
      
      This patch adds a lower-level implementation SimpleFillHV for FillHV and
      SimpleFillBE for FillBE, and adds a completely new SimpleFillNIC (all
      use cases until now hardcoded cluster.nicparams[constant.PP_DEFAULT]
      directly); it then uses these new functions in cmdlib.py.
      
      A side effect is that _CheckNicsBridgesExist loses the 'profile'
      parameter, which was unused. If it's needed, we should add it later via
      a proper profile parameter to SimpleFillNIC.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      73e0328b
    • Iustin Pop's avatar
      Fix a bug in instance startup with custom hvparams · c47478f9
      Iustin Pop authored
      
      Since the introduction of OS-specific hvparams, we shouldn't ever use
      objects.FillDict directly for instances, but instead go via the cluster
      object. Otherwise the os_hvp will be ignored.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      c47478f9
    • Iustin Pop's avatar
      Fix unsafe variant initializer in _TryOSFromDisk · 845da3e8
      Iustin Pop authored
      
      In case an OS has inconsistent declarations, we might get into a case
      where one node reports a valid variants list (with OS API >=15), and
      another node has OS API < 15, in which case its supported_variants gets
      the default value of None. This leads to the same variable having
      inconsistent data types, which leads to subtle bugs later: instead of
      reporting something like "Inconsistent OS API versions", the LU exits
      with a run-time exception. Furthermore, in another datapath, variants is
      initialized to '[]' in case of OS diagnose failures.
      
      The patch changes _TryOSFromDisk to initialize variants to '[]' for
      OS api level below 15, and changes the variants calculation in
      DiagnoseOS to be more readable.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      845da3e8
    • Michael Hanselmann's avatar
      Start instance after creating snapshots for export · 7f7b730a
      Michael Hanselmann authored
      
      This restores functionality lost in commit 387794f8. Found during
      tests using QA scripts. An instance should be started after it
      has been temporarily shutdown for an export.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      7f7b730a
    • Michael Hanselmann's avatar
      Use import/export magic for backup/import and inter-cluster moves · d51ae04c
      Michael Hanselmann authored
      
      This should prevent bugs in our code from accidentally overwriting
      disks.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      d51ae04c
    • Michael Hanselmann's avatar
      import/export: Validate remote host/port · acd65a16
      Michael Hanselmann authored
      
      The hostname and port received from the remote cluster should
      be validated, just in case.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      acd65a16
  4. Jun 11, 2010
  5. Jun 08, 2010
  6. Jun 04, 2010
  7. Jun 01, 2010
  8. May 21, 2010
  9. May 18, 2010
  10. May 17, 2010
  11. May 11, 2010
  12. May 04, 2010
  13. May 03, 2010
  14. Apr 29, 2010
  15. Apr 23, 2010
Loading