1. 23 Jun, 2010 5 commits
    • Iustin Pop's avatar
      Introduce a micro type system for opcodes · 3636400f
      Iustin Pop authored
      
      
      Currently, we have one structual validation for opcode attributes: the
      _OP_REQP, which checks that a given attribute is not 'None', and the
      rest of the checks are done at runtime. This means our type system has
      two types: None versus Not-None.
      
      We have been hit many times by small, trivial bugs in this area, and
      only a huge amount of unittest and/or hand-written checks would ensure
      that we cover all possibilities. This patch attempts to redress the
      needs for manual checks by introducing a micro-type system for the
      validation of the opcode attributes. What we lose, from the start, are
      the custom error messages (e.g. "Invalid reboot mode, choose one of …",
      or "The disk index must be a positive integer"). What we gain is the
      ability to express easily things as:
      
      - this parameter must be None or an int
      - this parameter must be a non-empty list
      - this parameter must be either none or a list of dictionaries with keys
        from the list of valid hypervisors and the values dictionaries with
        keys strings and values either None or strings; furthermore, the list
        must be non-empty
      
      These examples show that we have a composable (as opposed to just a few
      static types) system, and that we can nest it a few times (just for
      sanity; we could nest it up to stack depth).
      
      We also gain lots of ))))))), which is not that nice :)
      
      The current patch moves the existing _OP_REQP to the new framework, but
      if accepted, a lot more validations should move to it. In the end, we
      definitely should declare a type for all the opcode parameters
      (eventually moving _OP_REQP directly to opcodes.py and validating in the
      load/init case, and build __slots__ from it).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      3636400f
    • Iustin Pop's avatar
      Add OS verification support to cluster verify · b0d85178
      Iustin Pop authored
      
      
      For this, we needed to extend the NodeImage class with a few extra
      variables, and we do a trick in the node verification where we pick the
      first node that returned valid OS data as the reference node, and then
      we compare all other nodes against it.
      
      The checks added are:
      
      - consistency of DiagnoseOS responses
      - multiple paths for an OS
      - inconsistent OS between a reference node and the current node
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      b0d85178
    • Iustin Pop's avatar
      Add support for OS parameters during import/export · 535b49cb
      Iustin Pop authored
      
      
      Nothing special here, just copy/adjust the beparams code.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      535b49cb
    • Iustin Pop's avatar
      Introduce an RPC call for OS parameters validation · acd9ff9e
      Iustin Pop authored
      
      
      While we only support the 'parameters' check today, the RPC call is
      generic enough that will be able to support other checks in the future.
      The backend function will both validate the parameters list (so as to
      make sure we don't pass in extra parameters that the OS validation
      doesn't care about) and the parameter values, via the OS verify script.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      acd9ff9e
    • Iustin Pop's avatar
      b41b3516
  2. 22 Jun, 2010 1 commit
  3. 21 Jun, 2010 1 commit
  4. 17 Jun, 2010 1 commit
  5. 14 Jun, 2010 2 commits
  6. 11 Jun, 2010 2 commits
  7. 08 Jun, 2010 1 commit
  8. 04 Jun, 2010 1 commit
  9. 01 Jun, 2010 1 commit
    • Balazs Lecz's avatar
      Add KVM chroot feature · 547a63b7
      Balazs Lecz authored
      This patch adds a new boolean hypervisor parameter to the KVM hypervisor,
      named 'use_chroot'.
      If it's turned on for an instance, than KVM is started in "chroot mode":
      Ganeti creates an empty directory for the instance and passes the path
      of this dir to KVM via the -chroot flag.
      KVM changes its root to this directory after starting up.
      
      It also adds a "quarantine" feature for moving any unexpected files to
      a separate directory for later analysis.
      
      This has been backported from master,
      commit 84c08e4e
      
      Signed-off-by: default avatarBalazs Lecz <leczb@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      547a63b7
  10. 31 May, 2010 1 commit
    • Apollon Oikonomopoulos's avatar
      KVM: Migration bandwidth and downtime control · e43d4f9f
      Apollon Oikonomopoulos authored
      
      
      Introduce 2 new hypervisor options, migration_bandwidth and migration_downtime
      and implement KVM migration bandwidth and downtime control.
      
      migration_bandwidth controls KVM's maximal bandwidth during migration, in
      MiB/s. Default value is 32 MiB/s, same as KVM's internal default. This option
      is a global hypervisor option.
      
      migration_downtime sets the amount of time (in ms) a KVM instance is allowed to
      freeze while copying memory pages. This is useful when migrating busy guests,
      as KVM's internal default of 30ms is too low for the page-copying algorithm to
      converge. This is a per-instance option, with a default of 30ms, same as KVM's
      internal default.
      Signed-off-by: default avatarApollon Oikonomopoulos <apollon@noc.grnet.gr>
      Signed-off-by: default avatarBalazs Lecz <leczb@google.com>
      Reviewed-by: default avatarBalazs Lecz <leczb@google.com>
      e43d4f9f
  11. 28 May, 2010 1 commit
    • Balazs Lecz's avatar
      Add KVM chroot feature · 84c08e4e
      Balazs Lecz authored
      
      
      This patch adds a new boolean hypervisor parameter to the KVM hypervisor,
      named 'use_chroot'.
      If it's turned on for an instance, than KVM is started in "chroot mode":
      Ganeti creates an empty directory for the instance and passes the path
      of this dir to KVM via the -chroot flag.
      KVM changes its root to this directory after starting up.
      
      It also adds a "quarantine" feature for moving any unexpected files to
      a separate directory for later analysis.
      Signed-off-by: default avatarBalazs Lecz <leczb@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      84c08e4e
  12. 21 May, 2010 1 commit
  13. 18 May, 2010 5 commits
  14. 17 May, 2010 1 commit
  15. 13 May, 2010 1 commit
  16. 07 May, 2010 2 commits
  17. 28 Apr, 2010 1 commit
  18. 23 Apr, 2010 1 commit
  19. 16 Apr, 2010 5 commits
  20. 12 Apr, 2010 1 commit
    • Iustin Pop's avatar
      Export more instance parameters in instance export · 3c8954ad
      Iustin Pop authored
      
      
      Currently the backend parameters are not exported automatically, but
      only a few directly in the '[instance]' section. Hypervisor type and
      hypervisor parameters are not exported at all.
      
      This patch creates two separate sections for the be and hv parameters,
      and stores the parameters (including ones that come from the cluster
      defaults, but not the hypervisor globals for example) in the export.
      The import code is not changed yet.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      3c8954ad
  21. 08 Apr, 2010 1 commit
  22. 31 Mar, 2010 1 commit
  23. 23 Mar, 2010 3 commits