Skip to content
Snippets Groups Projects
  1. May 12, 2010
    • Michael Hanselmann's avatar
      RAPI: Add initial support for instance creation request version · d975f482
      Michael Hanselmann authored
      
      The way the resource /2/instances expects its request data (e.g.
      instance name, disks, NICs) to be formatted in a dict is not
      very extensible. HV and BE parameters are interleaved with all
      other values. In commit 495cfdf0 a new parameter “mode” was added
      which can be misunderstood as the instance creation mode, but is
      actually a mode for the network interface.
      
      Short of bumping the whole RAPI version (currently 2), which would
      involve many, many other changes and potentially break clients,
      we can not change the request format easily as it needs to stay
      backwards and future-compatible as far as possible. This is not an
      internal API, but one used by several external applications.
      
      By introducing a data format version per request, we can still
      support the old request format, and thereby not break existing users,
      while we can add a more flexible request format which will, for
      example, support multiple NICs and move HV/BE parameters to separate
      containers, avoiding conflicts.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      d975f482
    • Guido Trotter's avatar
      Convert some ReadFile calls to ReadOneLineFile · 682f7601
      Guido Trotter authored
      
      For passwords we require strict oneliners, we're a bit more lax with pid
      and uid files.
      
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      682f7601
    • Guido Trotter's avatar
      utils.ReadOneLineFile() · e587b46a
      Guido Trotter authored
      
      Read the first non-empty file line. When strict is set, abort if more
      than one line is non-empty. Some unittests inspired by the reverted ones
      from commit b774bb10, and some new ones.
      
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      e587b46a
    • Guido Trotter's avatar
      Remove oneline= parameter from utils.ReadFile · 582ed043
      Guido Trotter authored
      
      This partially reverts commit b774bb10.
      Unittests unrelated to that particular functionality but introduced in
      that commit are left untouched. Since the temporary directory is now
      only used to check for a non-existing file, it is removed as well, and
      a convenient very-very-unlikely-to-exist file is used instead.
      
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      582ed043
    • Guido Trotter's avatar
      install.rst: update os version and add KVM notes · a425810f
      Guido Trotter authored
      
      The 0.7 version was just an example, but since we're on 0.9 now,
      updating the number cannot be wrong. The new admonition helps KVM users
      to configure debootstrap correctly so that instances can be shutdown
      cleanly.
      
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      a425810f
    • Guido Trotter's avatar
      INSTALL: update hypervisor requirements · c4b2b2e2
      Guido Trotter authored
      
      Xen: Just specify 3.0 or above as a requirement, as versions above 3.1
      have been tested and work fine with Ganeti. Also note that the Xen
      dependency is optional, if one wants to work with KVM.
      
      KVM: list as an alternative, specify that 72 (the one shipped with
      lenny) is the bare minimum, but newer qemu-kvm is recommended.
      
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      c4b2b2e2
    • Michael Hanselmann's avatar
      RAPI client: Fix SSL error reporting for real · 0d9bc5d2
      Michael Hanselmann authored
      
      My previous patch, commit 857705e8, helped in one particular
      situation where the exception didn't contain any arguments
      (pyOpenSSL reporting a WantReadError, which shouldn't occur with a
      blocking socket anyway). With this patch, more common and uncommon
      errors should be easy to recognize.
      
      SSL errors without any of these patches:
      “ganeti.rapi.client.CertificateError: SSL issue:
      [('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE',
      'certificate verify failed')]”
      
      SSL errors with both patches:
      “ganeti.rapi.client.CertificateError: SSL issue:
      [('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE',
      'certificate verify failed')] (<OpenSSL.SSL.Error
      instance at 0x…>)”
      
      WantReadError without any of these two patches:
      “ganeti.rapi.client.CertificateError: SSL issue: ”
      
      WantReadError with both patches:
      “ganeti.rapi.client.CertificateError: SSL issue:
      (<OpenSSL.SSL.WantReadError instance at 0x…>)”
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      0d9bc5d2
  2. May 11, 2010
  3. May 10, 2010
Loading