Skip to content
Snippets Groups Projects
  1. Oct 01, 2009
  2. Sep 30, 2009
  3. Sep 29, 2009
  4. Sep 22, 2009
  5. Sep 16, 2009
  6. Sep 11, 2009
  7. Sep 10, 2009
  8. Sep 04, 2009
  9. Sep 03, 2009
  10. Aug 25, 2009
  11. Aug 24, 2009
  12. Aug 21, 2009
  13. Aug 17, 2009
  14. Aug 07, 2009
  15. Aug 06, 2009
  16. Aug 05, 2009
  17. Jul 20, 2009
  18. Jul 16, 2009
    • Guido Trotter's avatar
      Add enabled hypervisors to TestConfigRunner · 529d13a4
      Guido Trotter authored
      
      This parameter is now mandatory for the cluster config to work.
      
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      529d13a4
    • Guido Trotter's avatar
      Get rid of the default_hypervisor slot · 066f465d
      Guido Trotter authored
      
      Currently we have both a default_hypervisor and an enabled_hypervisors
      list. The former is only settable at cluster init time, while the latter
      can be changed with cluster modify.
      
      This becomes cumbersome in a few ways: at cluster init time for example
      if we pass in a list of enabled hypervisors which doesn't include the
      "default" xen-pvm one, we're also forced to pass a default hypervisor,
      or an error will be reported. It is also currently possible to disable
      the default hypervisor in cluster-modify (with unknown results).
      
      In order to avoid this we get rid of this field altogether, and define
      the "first" enabled hypervisor as the default one. This allows ease of
      changing which one is the default, and at the same time maintains
      coherency.
      
      At configuration upgrade we make sure that the old default is first in
      the list, so that 2.0 cluster defaults are preserved.
      
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      066f465d
  19. Jul 14, 2009
  20. Jun 29, 2009
  21. Jun 15, 2009
  22. Jun 08, 2009
  23. May 22, 2009
  24. May 21, 2009
    • Iustin Pop's avatar
      Export more instance information in hooks · 67fc3042
      Iustin Pop authored
      
      Currently we miss in hooks the instance's hypervisor, hypervisor
      parameters and backend parameters. This forces hooks to query back into
      ganeti, which is dangerous due to possible luxi sockets exhaustion.
      
      This patch adds these three as INSTANCE_HYPERVISOR, INSTANCE_HV_*,
      INSTANCE_BE_*. The hook environment prefixes all keys with “GANETI”, so
      a default settings for a xen-pvm instance would be:
      
        GANETI_INSTANCE_HV_initrd_path=
        GANETI_INSTANCE_HV_kernel_args=ro
        GANETI_INSTANCE_HV_kernel_path=/boot/vmlinuz-2.6-xenU
        GANETI_INSTANCE_HV_root_path=/dev/sda1
      
      Any dashes in parameter names are changed to underscores, since
      variables with dashes are not easy to access from the shell
      (alternatively we could deny those via an unittest for constants.py).
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      67fc3042
  25. May 19, 2009
    • Iustin Pop's avatar
      Fix the SafeEncoding behaviour · d392fa34
      Iustin Pop authored
      
      Currently we have bad behaviour in SafeEncode:
        - binary strings are actually not handled correctly (ahem)
        - the encoding is not stable, due to use of string_escape
      
      For this reason, we replace the use of string_escape with part of the
      code of string escape (PyString_Repr in Objects/stringobject.c); we
      don't escape backslashes or single quotes, since that is that makes it
      nonstable. Furthermore, we only use the encode('ascii', ...) for unicode
      inputs.
      
      The patch also adds unittests for the function that test basic
      behaviour.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      d392fa34
  26. May 05, 2009
    • Iustin Pop's avatar
      Fix compatibility with DRBD 8.3 · 01e2ce3a
      Iustin Pop authored
      
      DRBD 8.3 changes two more things compared to 8.2:
        - /proc/drbd format changed in multiple ways; the part we're
          interested is the ‘st:’ to ‘ro:‘ change (in the changelog named as
          “Renamed 'state' to 'role'”
        - “drbdsetup /dev/drbdN show” changed the ‘device’ stanza from:
            device "/dev/drbd0";
          to:
            device                  minor 0;
      
      This patch fixes these both and adds data files and unittests for DRBD
      8.3.1.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      01e2ce3a
  27. Feb 16, 2009
    • Iustin Pop's avatar
      Convert IOErrors for /proc/drbd into our errors · f6eaed12
      Iustin Pop authored
      If /proc/drbd can't be opened, this raises an IOError, but all the
      error-handling behaviour in backend treats only BlockDeviceErrors. This
      creates a plain failure in cluster verify and in other RPC calls.
      
      This patch simply converts EnvironmentErrors into BlockDeviceErrors, and
      also changes the RPC result for NV_DRBDLIST and its handling to be able
      to show the error. The other RPC calls work by default now, due the
      existing error handling.
      
      Reviewed-by: ultrotter
      f6eaed12
  28. Feb 12, 2009
    • Guido Trotter's avatar
      Apply the right permissions to /etc/hosts · 9b977740
      Guido Trotter authored
      In the current Ganeti version when modifying /etc/hosts we mistakenly
      give it the permissions of the temporary file we create to define its
      content, which is by default 0600. This breaks most non-root
      applications, and thus must be corrected. This patch forces the mode to
      be 0644 (but we might decide to just use the mode of the previous
      /etc/hosts, if we want to be more polite against any eventual
      administrative choice). We also add a new assertFileMode() method for
      unit tests and actually check in the SetEtcHostsEntry and
      RemoveEtcHostsEntry tests that the mode is correct, to be sure not to
      reintroduce this bug again. Also, a FIXME is added in the original
      functions stating that it would be nice to use WriteFile+fn() rather
      than reimplementing its functionality again.
      
      Reviewed-by: iustinp
      9b977740
Loading