1. 20 Oct, 2008 6 commits
    • Iustin Pop's avatar
      Convert the gnt scripts to ToStdout/err · 3a24c527
      Iustin Pop authored
      Currently the gnt-* scripts are using a mix of print, logger.ToStd* and
      sys.stderr.write. We convert them all to using cli.ToStdout/err. This
      way, we can easily change the implementation for all at once.
      
      Reviewed-by: imsnah
      3a24c527
    • Iustin Pop's avatar
      Convert cli.py to logging · 46fbdd04
      Iustin Pop authored
      We also add two function for printing messages, so that scripts won't
      have to import logger to get these. They are a simple extension over the
      logger ones, as they accept the call style from logging:
       ToStdout("Message: %s", msg)
      (instead of requiring formatting by the client.
      
      Reviewed-by: imsnah
      46fbdd04
    • Iustin Pop's avatar
      Fix gnt-instance modify with beparams · 61be6ba4
      Iustin Pop authored
      The gnt-instance modify didn't work correctly w.r.t the be parameters.
      There was also a typo in the corresponding LU.
      
      Reviewed-by: imsnah
      61be6ba4
    • Alexander Schreiber's avatar
      Update gnt-cluster man page for removal of --hypervisor-type. · dcd7cbaf
      Alexander Schreiber authored
      We no longer use a single, cluster-wide hypervisor, but configure the
      actual to be used hypervisor on the instance level. The option has already
      been removed from gnt-cluster.
      
      Reviewed-by: imsnah
      
      dcd7cbaf
    • Michael Hanselmann's avatar
      Remove old HTTP server code · fa10bdc5
      Michael Hanselmann authored
      All users of this code have been migrated to the new and shiny HttpServer
      class.
      
      It also fixes a typo in the ApacheLogfile unittests. It has not yet been
      decided whether we should keep ApacheLogfile or not, hence leaving it in.
      
      Reviewed-by: ultrotter
      fa10bdc5
    • Alexander Schreiber's avatar
      Remove --hypervisor-type from gnt-cluster. · 4342e89b
      Alexander Schreiber authored
      We no longer use a single, cluster-wide hypervisor, but configure the
      actual to be used hypervisor on the instance level.
      
      Reviewed-by: imsnah
      
      4342e89b
  2. 18 Oct, 2008 2 commits
  3. 17 Oct, 2008 14 commits
  4. 16 Oct, 2008 12 commits
    • Iustin Pop's avatar
      Enable gnt-cluster modify to hv/beparams · 779c15bb
      Iustin Pop authored
      This patch enables the cluster modify to change:
        - enabled hypervisor list
        - hvparams (per hypervisor)
        - beparams (only the default group)
      
      Syntax:
        gnt-cluster modify -B vcpus=3 -H xen-pvm:no_initrd_path
      
      Validation for parameters is somewhat missing - the individual
      hypervisors will be checked for syntax and validation, but beparams
      doesn't have validation yes (nowhere), it should be added here once we
      have a global method (will come soon).
      
      Reviewed-by: imsnah
      779c15bb
    • Michael Hanselmann's avatar
      rapi: Convert to new HTTP server class · 16a8967d
      Michael Hanselmann authored
      Requests are no longer logged to a separate file.
      
      Reviewed-by: amishchenko
      16a8967d
    • Guido Trotter's avatar
      design-2.0-cluster-parameters: escape final _ · c5e2d3b9
      Guido Trotter authored
      In rst a final _ is used for linking. Escaping it prevents an error at
      compile time on design-2.0-cluster-parameters.rst
      
      Reviewed-by: iustinp
      c5e2d3b9
    • Iustin Pop's avatar
      Show the cluster parametrs in gnt-cluster info · 469f88e1
      Iustin Pop authored
      This is just a raw update without any special formatting.
      
      Reviewed-by: imsnah
      469f88e1
    • Oleksiy Mishchenko's avatar
      RAPI: Instance add/delete implementation. · 2f7635f4
      Oleksiy Mishchenko authored
      Reviewed-by: iustinp
      2f7635f4
    • Guido Trotter's avatar
      OS Design: invert new and old name · 29fc6636
      Guido Trotter authored
      Internally in ganeti we already have renamed the instance, so it's
      better to pass the new name in INSTANCE_NAME and the old one in
      OLD_INSTANCE_NAME rather than the old name in INSTANCE_NAME and the new
      one in NEW_INSTANCE_NAME as this reflects what the cluster thinks.
      
      Reviewed-by: iustinp
      29fc6636
    • Iustin Pop's avatar
      Really fix with the zombie test (hopefully) · 09352fa4
      Iustin Pop authored
      So, instead of any timeouts for synchronization, we move to actual
      events. We still have one (huge) timeout for pathological cases (just to
      cleanup), but we don't sleep at all in normal usage.
      
      The patch moves the zombie/cleaned up child creation out from setUp(),
      and to on-demand by the functions. We remove all signal handler usage,
      instead we rely on the fact that when a process is cleaned up, its FDs
      are closed, so the read end of a pipe will get an event.
      
      Reviewed-by: imsnah
      09352fa4
    • Iustin Pop's avatar
      Fix job queue behaviour when loading jobs · 94ed59a5
      Iustin Pop authored
      Currently, if loading a job fails, the job queue code raises an
      exception and prevents the proper processing of the jobs in the queue.
      We change this so that unparseable jobs are instead archived (if not
      already).
      
      Reviewed-by: imsnah
      94ed59a5
    • Iustin Pop's avatar
      Prevent master failover if we have wrong data · d5927e48
      Iustin Pop authored
      If we don't actually know the current master (as determined via voting),
      we prevent the failover.
      
      The patch also changes some messages (capitalization, typos).
      
      Reviewed-by: ultrotter
      d5927e48
    • Iustin Pop's avatar
      Improvements to the master startup checks · d7cdb55d
      Iustin Pop authored
      In order to account for future improvements to master failover, we move
      the actual data gathering capabilities from ganeti-masterd into
      bootstrap.py, and we leave only the verification into masterd.
      
      The verification procedure is then changed to retry multiple times (up
      to one minute) in case most nodes do not respond, and also the algorithm
      is changed to require at least half (but not half+1) votes, since our
      vote also should count (and we vote for ourselves).
      
      Example for consistent (config-wise) cluster:
        - 5 node cluster, 2 nodes down: still start
        - 4 node cluster, 2 nodes down: retry for one minute, abort
      
      Reviewed-by: ultrotter
      d7cdb55d
    • René Nussbaumer's avatar
      Provide example for backend parameters · 10799c59
      René Nussbaumer authored
      Update the design about cluster parameters and provide
      some example of backend parameters. By now this includes
      all supported parameters.
      
      Reviewed-by: iustinp, ultrotter
      10799c59
    • Iustin Pop's avatar
      Add an interface for the drain flag changes/query · 3ccafd0e
      Iustin Pop authored
      This adds the set/reset in the jqueue and luxi modules, and a way to
      query it in OpQueryConfigValues, and also the comand line interface for
      it:
      $ gnt-cluster queue info
      The drain flag is unset
      $ gnt-cluster queue drain
      $ gnt-cluster queue info
      The drain flag is set
      $ gnt-cluster queue undrain
      $ gnt-cluster queue info
      The drain flag is unset
      
      The choice of making the setting via luxi and not an opcode is that
      opcodes can't be executed when drained, but we don't query via luxi
      since in the future it might become a cluster property as opposed to a
      node one.
      
      Reviewed-by: imsnah
      3ccafd0e
  5. 15 Oct, 2008 6 commits
    • René Nussbaumer's avatar
      Adding batch-create to gnt-instance · 0d0e9090
      René Nussbaumer authored
      This change is part of the integration of tools/batcher from
      Ganeti 1.2 into Ganeti 2.0 core code. It has a compatible
      submission interface to the version from 1.2 with these differences:
      
      * it's integrated into Ganeti directly: gnt-instance batch-create
      * iallocator is now provided by the instance specs
      * log is now held within Ganeti
      * no force needed
      * no sleep needed
      * memory and vcpus goes now into beparams
      * missing stuff from the TODO (see below)
      
      Open TODOs:
      
      * Implement notification about creation status/interactive part (top like)
      * Backup instance allocation specs?
      * Document usage and spec format
      
      Reviewed-by: iustinp
      0d0e9090
    • Iustin Pop's avatar
      Add a rpc call for changing the drain flag · 5d672980
      Iustin Pop authored
      A new multi-node call is added that sets/resets the drain flag.
      
      Reviewed-by: imsnah
      5d672980
    • Iustin Pop's avatar
      Implement the job queue drain flag · 686d7433
      Iustin Pop authored
      We add a (per-node) queue drain flag that blocks new job submission.
      There is not yet an interface to add/remove the flag (will come in next
      patches).
      
      Reviewed-by: imsnah
      686d7433
    • Iustin Pop's avatar
      Implement transport of ganeti errors across luxi · 6797ec29
      Iustin Pop authored
      This patch adds a generic method to identify the ganeti error given its
      class name, and implements this across the luxi protocol.
      
      Reviewed-by: imsnah
      6797ec29
    • Iustin Pop's avatar
      Change the JobQueueError parent class · d11bda8d
      Iustin Pop authored
      Currently this is not derived from GenericError, but there's no reason
      for it to be so.
      
      Reviewed-by: imsnah
      d11bda8d
    • Michael Hanselmann's avatar
      rapi: Don't throw class as an exception · 966405b7
      Michael Hanselmann authored
      Reviewed-by: ultrotter
      966405b7