Skip to content
Snippets Groups Projects
  1. Oct 25, 2012
  2. Oct 12, 2012
  3. Oct 09, 2012
  4. Oct 05, 2012
  5. Sep 12, 2012
  6. Jul 20, 2012
  7. May 09, 2012
    • Iustin Pop's avatar
      Fix exception re-raising in Python Luxi clients · 98dfcaff
      Iustin Pop authored
      
      Commit e687ec01 (present in 2.5 since the 2.5 beta 3) did consistency
      fixes across the code-base. Unfortunately this was done without enough
      checks on the actual meaning of one of the fixes, which means error
      re-raising in lib/errors.py is broken.
      
      The problem is that:
      
        raise cls, args
      
      is different than:
      
        raise cls(args)
      
      And our unit-tests didn't catch this (this patch updates the tests).
      
      This breakage is usually trivial, like wrong error messages:
      
        $ gnt-instance remove no-such-instance
        Failure: prerequisites not met for this operation:
        ("Instance 'no-such-instance' not known", 'unknown_entity')
      
      versus:
      
        $ gnt-instance remove no-such-instance
        Failure: prerequisites not met for this operation:
        error type: unknown_entity, error details:
        Instance 'no-such-instance' not known
      
      or:
      
        $ gnt-instance add … no-such-instance
        Failure: prerequisites not met for this operation:
        ('The given name (no-such-instance) does not resolve: Name or service not known', 'resolver_error')
      
      versus:
      
        $ gnt-instance add … no-such-instance
        Failure: prerequisites not met for this operation:
        error type: resolver_error, error details:
        The given name (no-such-instance) does not resolve: Name or service not known
      
      But in some cases where we rely on a certain data representation
      (e.g. HooksAbort), this actually breaks because we try to iterate over
      the wrong type:
      
        File "/usr/lib/python2.6/dist-packages/ganeti/cli.py", line 1907, in FormatError
           for node, script, out in err.args[0]:
        ValueError: need more than 1 value to unpack
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      98dfcaff
  8. Apr 26, 2012
    • Michael Hanselmann's avatar
      errors: Add exception for RAPI testing utilities · 352e1a26
      Michael Hanselmann authored
      
      This exception is raised to abort before actually sending a LUXI call
      (there is no LUXI server involved in the test). The testing utilities
      catch the exception to report a success (i.e. the code didn't throw
      an exception before due to invalid types, etc.). To allow the exception
      to be thrown all the way to the test utilities, the HTTP server library
      must ignore it. Also some overly generic exception handling is removed
      from the RAPI request handler.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      352e1a26
  9. Dec 08, 2011
  10. Oct 18, 2011
  11. Sep 20, 2011
    • Andrea Spadaccini's avatar
      Implementation of TLS-protected SPICE connections · b6267745
      Andrea Spadaccini authored
      
      Added support for TLS-protected SPICE connections:
      
      client/gnt_cluster.py, cli.py:
      * added three new parameters to renew-crypto (--new-spice-certificate,
        --spice-certificate, --spice-ca-certificate) and their validation.
      
      utils/x509.py:
      * changed GenerateSelfSignedSslCert so that now also returns the
        generated key and certificate;
      * added missing return value in the docstring of
        GenerateSelfSignedX509Cert.
      
      lib/bootstrap.py:
      * changed the signatures of the relevant functions and implemented
        certificates generation/writing.
      
      tools/cfupgrade:
      * changed GenerateClusterCrypto invocation to reflect the new signature;
      * added SPICE certificate names.
      
      lib/errors.py:
      * added the X509CertError class.
      
      lib/hypervisor/hv_kvm.py:
      * silenced pylint warning R0915
      
      Signed-off-by: default avatarAndrea Spadaccini <spadaccio@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      b6267745
  12. Aug 25, 2011
  13. Jul 26, 2011
  14. Apr 18, 2011
  15. Feb 15, 2011
  16. Jan 31, 2011
  17. Oct 28, 2010
  18. Oct 13, 2010
  19. Aug 18, 2010
    • Manuel Franceschini's avatar
      Introduce new IPAddress classes · 8b312c1d
      Manuel Franceschini authored
      
      This patch unifies the netutils functions dealing with IP addresses to
      three classes:
      - IPAddress: Common IP address functionality
      - IPv4Address: IPv4 specific functionality
      - IPv6address: IPv6-specific functionality
      
      Furthermore it adds methods to check whether an address is a loopback
      address, replacing the .startswith("127") for IPv4 and adding IPv6
      support.
      
      It also provides the basis for future IPv6 address handling. Methods to
      convert IP strings to their corresponding interger values will allow to
      canonicalize IPv6 addresses.
      
      Signed-off-by: default avatarManuel Franceschini <livewire@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      8b312c1d
  20. Aug 17, 2010
  21. Jul 16, 2010
  22. Jul 07, 2010
  23. Jun 23, 2010
  24. May 21, 2010
  25. Dec 18, 2009
  26. Nov 06, 2009
  27. Nov 04, 2009
    • Iustin Pop's avatar
      Introduce a wrapper for hostname resolving · 104f4ca1
      Iustin Pop authored
      
      Currently a few of the LU's CheckPrereq use utils.HostInfo which raises
      a resolver error in case of failure. This is an exception from the
      standard that CheckPrereq should raise an OpPrereqError if the error is
      in the 'pre' phase (so that it can be retried).
      
      This patch adds a new error code (resolver_error) and a wrapper over
      utils.HostInfo that just converts the ResolverError into
      OpPrereqError(…, errors.ECODE_RESOLVER). It then uses this wrapper in
      cmdlib, bootstrap and some scripts.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      104f4ca1
  28. Nov 02, 2009
  29. Sep 25, 2009
  30. Sep 16, 2009
  31. Aug 28, 2009
  32. Aug 27, 2009
  33. Aug 10, 2009
  34. Jul 29, 2009
  35. Jul 14, 2009
  36. Jun 15, 2009
    • Iustin Pop's avatar
      Remove old invalid-os related functionality · 8e70b181
      Iustin Pop authored
      
      We no longer need OS objects to be able to represent invalid OSes. This
      cleans up the code handling those cases.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      8e70b181
    • Iustin Pop's avatar
      Conver node_leave_cluster rpc to new style result · 0623d351
      Iustin Pop authored
      
      This patch converts this rpc call to the new style result, and also
      changes in the process the meaning of the QuitGanetiException's
      arguments and the node daemon rpc call exception handler.
      
      The problem with the exception handler is that we used a two-stage one,
      and the inner used to catch all exception (including this one), so in
      the logs we always had an exception logged, instead of the normal
      'leaving cluster message'. The patch also adds logging of the
      exception's arguments, so that we have a trail in the logs about the
      shutdown mode.
      
      The exception's arguments were reversed from the normal RPC results
      style. While it makes somewhat more sense for this exception, we change
      them such that they match the rpc result format.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      0623d351
Loading