1. 12 Oct, 2011 2 commits
    • Iustin Pop's avatar
      Standardise LUXI call argument types · a629ecb9
      Iustin Pop authored
      
      
      Currently, we have 4 types of arguments in LUXI calls:
      
      - most common, a list of values
      - a single argument that is sent as a list of one element
      - a single argument that is sent by itself
      - a dictionary (only Query and QueryFields)
      
      This inconsistency makes it not only harder to auto-generate the
      HTools LUXI interface, but also in general to check the arguments and
      (if we ever want to do it) auto-generate the Python LUXI client.
      
      Compare this with the node daemon, which uses consistently a list for
      its arguments, and even with way more changes over time had no issues
      with extending the interface.
      
      In case we want to extend a call, there are two options:
      
      - preferred: add a new call, keep the old one unchanged
      - possible: add further parameters to the current argument list
      
      The patch against HTools will follow—sending separately as the Python
      changes are very clear by themselves.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      a629ecb9
    • Iustin Pop's avatar
      Rename filter and filter_ to qfilter · 2e5c33db
      Iustin Pop authored
      
      
      We currently use 'filter' as the OpCode, QueryRequest and RAPI field
      name for representing a query filter. However, since 'filter' is a
      built-in function, we actually have to use filter_ throughout the code
      in order to not override the built-in function.
      
      This patch simply goes and does a global sed over the code. Due to the
      fact that the RAPI interface already exposed this field, we add
      compatibility code for now which handles both forms.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      2e5c33db
  2. 30 Sep, 2011 2 commits
  3. 27 Sep, 2011 1 commit
  4. 30 Aug, 2011 1 commit
  5. 25 Aug, 2011 1 commit
  6. 19 Apr, 2011 1 commit
  7. 15 Mar, 2011 2 commits
  8. 18 Jan, 2011 7 commits
  9. 06 Jan, 2011 1 commit
  10. 13 Dec, 2010 1 commit
  11. 06 Dec, 2010 1 commit
  12. 01 Dec, 2010 1 commit
  13. 03 Nov, 2010 1 commit
  14. 29 Oct, 2010 1 commit
  15. 28 Oct, 2010 1 commit
  16. 13 Oct, 2010 1 commit
  17. 07 Oct, 2010 2 commits
  18. 24 Sep, 2010 1 commit
  19. 07 Sep, 2010 1 commit
  20. 24 Aug, 2010 1 commit
    • Michael Hanselmann's avatar
      Add simple lock monitor · 19b9ba9a
      Michael Hanselmann authored
      
      
      This patch adds an initial implementation of a lock monitor, accessible
      for the user through “gnt-debug locks”. It currently shows all resource
      locks: BGL, nodes and instances. Config and job queue locks could be
      shown too, but wouldn't be of much help.  The current owner(s) and mode
      are also shown.
      
      Showing pending acquires will require further changes on the SharedLock
      internals and is not yet implemented.
      
      Example output:
      $ gnt-debug locks -o name,mode,owner
      Name            Mode      Owner
      BGL/BGL         shared    JobQueue19/Job147
      instances/inst1 exclusive JobQueue19/Job147
      instances/inst2 -         -
      instances/inst3 -         -
      instances/inst4 -         -
      nodes/node1     exclusive JobQueue19/Job147
      nodes/node2     exclusive JobQueue19/Job147
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      19b9ba9a
  21. 18 Aug, 2010 1 commit
  22. 29 Jul, 2010 1 commit
    • Michael Hanselmann's avatar
      workerpool: Change signature of AddTask function to not use *args · b2e8a4d9
      Michael Hanselmann authored
      
      
      By changing it to a normal parameter, which must be a sequence, we can
      start using keyword parameters.
      
      Before this patch all arguments to “AddTask(self, *args)” were passed as
      arguments to the worker's “RunTask” method. Priorities, which should be
      optional and will be implemented in a future patch, must be passed as a keyword
      parameter. This means “*args” can no longer be used as one can't combine *args
      and keyword parameters in a clean way:
      
      >>> def f(name=None, *args):
      ...   print "%r, %r" % (args, name)
      ...
      >>> f("p1", "p2", "p3", name="thename")
      Traceback (most recent call last):
       File "<stdin>", line 1, in <module>
       TypeError: f() got multiple values for keyword argument 'name'
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      b2e8a4d9
  23. 26 Jul, 2010 2 commits
    • Iustin Pop's avatar
      masterd: move the IP activation from Exec to Check · 340f4757
      Iustin Pop authored
      
      
      Currently, the master IP activation is done in the Exec function. Since
      the original masterd process returns after forking, and Exec is run in
      the (grand)child process, this means that after 'ganeti-masterd' has
      returned there are still initialization tasks running.
      
      Normally this is not a problem, but in cases where one does quick master
      failovers, this creates a race condition which hits the QA scripts
      especially hard.
      
      To solve this, and make the startup process cleaner (the system is in
      steady state after the command has returned, even though masterd startup
      could still fail), we move the IP activation to Check(). This also
      allows error messages about the IP activation to be seen on the console.
      
      With this patch enabled, I can no longer reproduce the double-failover
      errors, which were occuring before in 4/5 cases.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      340f4757
    • Iustin Pop's avatar
      Move the UsesRPC decorator from cli to rpc · e0e916fe
      Iustin Pop authored
      
      
      This is needed because not just the cli scripts need this decorator, but
      the master daemon too (and it already duplicated the code once).
      
      In cli.py we just leave a stub, so that we don't have to modify all the
      scripts to import rpc.py.
      
      We then change the master daemon code to reuse this decorator, instead
      of duplicating it.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      e0e916fe
  24. 16 Jul, 2010 1 commit
    • Michael Hanselmann's avatar
      Convert RPC client to PycURL · 33231500
      Michael Hanselmann authored
      
      
      Instead of using our custom HTTP client, using PycURL's multi
      interface allows us to get rid of the HTTP client threadpool.
      The majority of the code is still in the ganeti.http.client
      module.
      
      A simple per-thread HTTP client pool gives cURL a chance to
      cache and retain as much information as possible (e.g. SSL certs).
      Unused HTTP clients (e.g. due to removed nodes) are deleted after
      25 requests going through the pool.
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      33231500
  25. 09 Jul, 2010 1 commit
  26. 30 Jun, 2010 1 commit
  27. 29 Jun, 2010 1 commit
  28. 04 Jun, 2010 1 commit
  29. 03 Jun, 2010 1 commit