Skip to content
Snippets Groups Projects
  1. Jul 22, 2008
    • Guido Trotter's avatar
      Add missing empty line · 0eed6e61
      Guido Trotter authored
      Two top level definitions were separated only by one empty line.
      Fixing this.
      
      Reviewed-by: imsnah
      0eed6e61
    • Oleksiy Mishchenko's avatar
      Put the poper RAPI baserlib · c2dca9af
      Oleksiy Mishchenko authored
      Reviewed-by: imsnah
      c2dca9af
    • Michael Hanselmann's avatar
      Make argument to CleanCacheUnlocked mandatory · 57f8615f
      Michael Hanselmann authored
      Not passing the argument means it has the value None. Iterating None
      doesn't work:
        >>> "123" in None
        Traceback (most recent call last):
          File "<stdin>", line 1, in ?
        TypeError: iterable argument required
      
      Hence I rename it to "exclude" instead of "exceptions", which may be
      confusing, and make it mandatory. If one wants to clean all cache
      entries, an empty list can be passed.
      
      Reviewed-by: iustinp
      57f8615f
    • Oleksiy Mishchenko's avatar
      Split RAPI resources to pieces · 10b207d4
      Oleksiy Mishchenko authored
      Reviewed-by: iustinp
      10b207d4
    • Michael Hanselmann's avatar
      Split conditions in worker pool · 53b1d12b
      Michael Hanselmann authored
      This patch splits the single threading.Condition object used in the
      worker pool for synchronization into three.
      
      - worker_to_pool: Notified if a worker wants to notify the pool
      - pool_to_worker: Notified if the pool wants to notify a single
        or all workers
      - pool_to_pool: Used for synchronization in Quiesce
      
      Reviewed-by: ultrotter
      53b1d12b
  2. Jul 21, 2008
    • Michael Hanselmann's avatar
      Add signal handler class · de499029
      Michael Hanselmann authored
      This signal handler class abstracts some of the code previously
      used in other places. It also uninstalls its handler when Reset()
      is called or the class is destructed, thereby restoring the
      previous behaviour.
      
      Reviewed-by: iustinp
      de499029
  3. Jul 17, 2008
  4. Jul 16, 2008
  5. Jul 15, 2008
    • Iustin Pop's avatar
      Documentation updates · a7399f66
      Iustin Pop authored
      Reviewed-by: imsnah
      a7399f66
    • Iustin Pop's avatar
      Rename BaseJO to BaseOpCode · 0e46916d
      Iustin Pop authored
      Since we don't have for now a job definition object anymore, we rename
      this class to BaseOpCode. It's still useful (and not merged with OpCode)
      since it holds all the 'pure' logic (no custom field handling, etc.)
      whereas OpCode holds opcode specific data (OP_ID handling, etc).
      
      The patch also fixes the module's docstring.
      
      Reviewed-by: imsnah
      0e46916d
    • Iustin Pop's avatar
      Sort the job list in _GetJobIDsUnlocked · f0d874fe
      Iustin Pop authored
      Since the IDs are integers, we can simply sort them.
      
      Reviewed-by: imsnah
      f0d874fe
  6. Jul 14, 2008
    • Iustin Pop's avatar
      Further fixes to enable RAPI startup · d4104181
      Iustin Pop authored
      Note that since RAPI itself doesn't use luxi.Client yet, nothing works,
      but at least it can startup now.
      
      Reviewed-by: imsnah
      d4104181
    • Iustin Pop's avatar
      Add forgotten RAPI constant · d3f0bf8f
      Iustin Pop authored
      This was forgot on the forward-porting of RAPI.
      
      Reviewed-by: imsnah
      d3f0bf8f
    • Iustin Pop's avatar
      Improve cli.SubmitOpCode · e2212007
      Iustin Pop authored
      Currently, the feedback_fn argument to SubmitOpCode is no longer used.
      We still need it in burnin, so we re-enable it by making the code call
      that function with the msg argument in case feedback_fn is callable. The
      patch also modifies burnin to accept the new argument format (msg is not
      a triple instead of a string).
      
      The patch also removes the ‘proc’ argument as it's obsolete; instead we
      can accept a luxi.Client instance (noone uses this right now).
      
      Reviewed-by: ultrotter
      e2212007
    • Iustin Pop's avatar
      First version of user feedback fixes · f1048938
      Iustin Pop authored
      This patch contains a raw version for fixing feedback_fn.
      
      The new mechanism works as follows:
        - instead of a per-Processor feedback_fn, there's one for each
          ExecOpCode, so that feedback for different opcodes go via possibly
          different functions
        - each _QueuedOpCode gets a message buffer, a method for adding
          feedback and a method for retrieving (parts of) the feedback
        - the _QueuedJob object gets a new attribute that is equal to the
          index of the currently executing opcode
        - job queries get an extra parameter called 'ticker' that will return
          the latest message on the current executing opcode
        - the cli.py job completion poll will show the new status if different
          from the old one
      
      Of course, quick messages will be lost, as currently only the latest one
      is available. Also changes between opcodes are not represented at all.
      
      Reviewed-by: imsnah
      f1048938
    • Iustin Pop's avatar
      Cache some jobs in memory · ac0930b9
      Iustin Pop authored
      This patch adds a caching mechanisms to the JobStorage. Note that is
      does not make the memory cache authoritative.
      
      The algorithm is:
        - all jobs loaded from disks are entered in the cache
        - all new jobs are entered in the cache
        - at each job save (in UpdateJobUnlocked), jobs which are not
          executing or queued are removed from the cache
      
      The end effect is that running jobs will always be in the cache (which
      will fix the opcode log changes) and finished jobs will be kept for a
      while in the cache after being loaded.
      
      Reviewed-by: imsnah
      ac0930b9
    • Iustin Pop's avatar
      Fix JobStorage._GetJobIDsUnlocked · 8a70e415
      Iustin Pop authored
      The job ID returned must be an integer (and the regex enforces that),
      but we didn't convert it manually.
      
      Reviewed-by: imsnah
      8a70e415
    • Iustin Pop's avatar
      Change JobStorage to work with ids not filenames · 911a495b
      Iustin Pop authored
      Currently some of the functions in JobStorage work with filenames (which
      is an implementation detail and should only be used when dealing with
      the storage) and not with job IDs. We need to change this in order to
      implement a job cache.
      
      Reviewed-by: ultrotter
      911a495b
  7. Jul 11, 2008
    • Michael Hanselmann's avatar
      Add experimental persistency to job queue · f1da30e6
      Michael Hanselmann authored
      It's not perfect and it's not finished, but it's a start.
      
      - Serial number is read only once, but written on each update
      - Jobs are kept only on disk (caching will be implemented)
      
      Reviewed-by: iustinp
      f1da30e6
    • Iustin Pop's avatar
      Convert backend.py to the logging module · 18682bca
      Iustin Pop authored
      The patch also switches some of the exception logs to use
      logging.exception (and therefore the log message will have a diferent
      format).
      
      (Note that this might not be a good choice in all cases, though)
      
      Reviewed-by: imsnah
      18682bca
    • Iustin Pop's avatar
      Add PID to all logs · a237d0a8
      Iustin Pop authored
      This patch (for trunk) adds the PID to all daemon logs.
      
      Reviewed-by: imsnah
      a237d0a8
    • Iustin Pop's avatar
      Fix backend.NodeVolumes handling of LVM output · a17a7623
      Iustin Pop authored
      This is the same fix as for GetVolumeList.
      
      I've checked manually and all other places that call lvm commands are
      already checking the output validity in terms of correct number of
      fields.
      
      Reviewed-by: ultrotter
      a17a7623
    • Iustin Pop's avatar
      Fix backend.GetVolumeList handling of LVM output · df4c2628
      Iustin Pop authored
      Sometimes ‘lvs’ can spit error messages on stdout, even when one wants
      to parse the output:
      ...
      Inconsistent metadata copies found - updating to use version 2776
      ...
      
      So we need to validate the output to guard against such cases.
      
      The patch converts the split on the separater to match against a regex
      and extract the fields via groups. The original separator choice is a
      bad one now :(
      
      Reviewed-by: imsnah
      df4c2628
    • Michael Hanselmann's avatar
      Add generic HTTP server classes · a43f68dc
      Michael Hanselmann authored
      Some of the code is adopted from the 1.2 branch
      (lib/rapi/RESTHTTPServer.py). This code can be used as a base for the
      various HTTP servers in Ganeti.
      
      Reviewed-by: iustinp
      a43f68dc
    • Michael Hanselmann's avatar
      Make "gnt-job list" work again · af30b2fd
      Michael Hanselmann authored
      "gnt-job list" was broken after my recent changes in the RPC
      between clients and the master. This patch makes it work again.
      
      Reviewed-by: iustinp
      af30b2fd
    • Oleksiy Mishchenko's avatar
      Initial copy of RAPI filebase to the trunk · 8c229cc7
      Oleksiy Mishchenko authored
      Reviewed-by: iustinp
      8c229cc7
  8. Jul 10, 2008
  9. Jul 09, 2008
    • Iustin Pop's avatar
      Fix double-logging in daemons · ff5fac04
      Iustin Pop authored
      Currently, in debug mode, both the logfile handler and the stderr
      handler will log debug messages. Since the stderr is redirected to the
      same logfile (to catch non-logged errors), it means log entries are
      doubled.
      
      The patch adds an extra parameter to the logger.SetupDaemon() function
      that allows disabling of the stderr logging. The master and node daemon
      will use this to enable stderr logging only when running in foreground.
      
      Reviewed-by: imsnah
      ff5fac04
    • Iustin Pop's avatar
      Move the master socket in the ganeti run dir · 68676a00
      Iustin Pop authored
      ... as it was intended from the beggining, but by mistake left in the
      top run dir.
      
      Reviewed-by: ultrotter
      68676a00
    • Iustin Pop's avatar
      Reduce duplicate Attach() calls in bdev · cb999543
      Iustin Pop authored
      Currently, the 'public' functions of bdev (FindDevice and
      AttachOrAssemble) will call the Attach() method right after class
      instantiation.
      
      But the constructor itself calls this function, and therefore we have
      duplicate Attach() calls (which are not cheap at all).
      
      The patch introduces a new 'attached' instance attribute that tells if
      the last Attach() was successful. The public functions reuse this so
      that we only do the minimum required number of calls.
      
      Reviewed-by: imsnah
      cb999543
    • Iustin Pop's avatar
      Convert bdev.py to the logging module · 468c5f77
      Iustin Pop authored
      This does not enhance in any way the messages; it just switches to the
      new module.
      
      Reviewed-by: imsnah
      468c5f77
    • Iustin Pop's avatar
      Convert utils.py to the logging module · bb698c1f
      Iustin Pop authored
      The patch also logs all commands executed from RunCmd when we are at
      debug level.
      
      Reviewed-by: imsnah
      bb698c1f
    • Iustin Pop's avatar
      Remove the old locking functions · d4fa5c23
      Iustin Pop authored
      This removes (hopefully) all traces of the old locking functions and
      uses.
      
      Reviewed-by: imsnah
      d4fa5c23
    • Michael Hanselmann's avatar
      Remove old job queue code · 2467e0d3
      Michael Hanselmann authored
      Reviewed-by: iustinp
      2467e0d3
    • Michael Hanselmann's avatar
      Change masterd/client RPC protocol · 0bbe448c
      Michael Hanselmann authored
      - Introduce abstraction class on client side
      - Use constants for method names
      - Adopt legacy function SubmitOpCode to use it
      
      Reviewed-by: iustinp
      0bbe448c
    • Michael Hanselmann's avatar
      Make luxi RPC more flexible · 3d8548c4
      Michael Hanselmann authored
      - Use constants for dict entries
      - Handle exceptions on server side
      - Rename client function to CallMethod to match server side naming
      
      Reviewed-by: iustinp
      3d8548c4
    • Michael Hanselmann's avatar
      Add very simple job queue · e2715f69
      Michael Hanselmann authored
      Reviewed-by: iustinp
      e2715f69
Loading