1. 07 Nov, 2012 7 commits
    • Iustin Pop's avatar
      Implement base checkFn/prepFn/execFn model for daemons · 2ac2e420
      Iustin Pop authored
      
      
      This mirrors the code in the Python code base, and is required for
      clean error reporting during startup.
      
      This patch implements the basic infrastructure; the confd daemon is
      not yet modified to take advantage of this, just the types are
      adjusted.
      
      Also, the pipe-based error reporting will go in a future patch, once
      we can actually use that for reporting.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      2ac2e420
    • Iustin Pop's avatar
      One more ghc 7.6 fix · 7ae5d703
      Iustin Pop authored
      
      
      This is only in master, so needed to be fixed separately.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      7ae5d703
    • Michael Hanselmann's avatar
      workerpool: Use itertools.count instead of manual counting · c258f110
      Michael Hanselmann authored
      
      
      Instead of having to explicitely increment the value (“… += 1”), a call
      to next() is enough. These numbers should in no case be re-used (they
      are used for ordering tasks). Using “itertools.count” is useful here as
      it guarantees that a returned number won't be returned another time.
      Manual code for this could, over the course of time, gain unintended
      bugs.
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarBernardo Dal Seno <bdalseno@google.com>
      c258f110
    • Iustin Pop's avatar
      Merge branch 'devel-2.6' into submit · b9612abb
      Iustin Pop authored
      
      
      * devel-2.6:
        Fix compatibility with newer Haskell libraries
        Fix gnt-instance console with xl
      
      Conflicts:
              Makefile.am (reordering, fixed)
              htools/Ganeti/Confd/Server.hs (hlint fixes on master)
              htools/Ganeti/Daemon.hs (hlint)
              htools/Ganeti/HTools/Backend/Rapi.hs (hlint)
              htools/Ganeti/HTools/ExtLoader.hs (hlint)
              htools/Ganeti/HTools/QC.hs (file renamed/split in master, fixed)
              htools/test.hs (we don't use maxDiscards, ignored)
              lib/constants.py (move to pathutils)
              lib/hypervisor/hv_xen.py (move to pathutils)
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      b9612abb
    • Iustin Pop's avatar
      Merge branch 'stable-2.6' into devel-2.6 · 27639c4e
      Iustin Pop authored
      
      
      * stable-2.6:
        Fix compatibility with newer Haskell libraries
        Fix gnt-instance console with xl
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      27639c4e
    • Iustin Pop's avatar
      Switch devel/upload to a static file · f9435bdc
      Iustin Pop authored
      
      
      We had twice in the past days questions about devel/upload being
      "broken", since bash re-reads shell scripts during their run and this
      file can get regenerated due to Makefile changes.
      
      Since we only need this to be dynamically built for 3 variables, let's
      make the file static and read those three variables when it is run,
      instead of when it is built, which allows us to re-read the "latest
      version" of these vars as well.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      f9435bdc
    • Iustin Pop's avatar
      Fix compatibility with newer Haskell libraries · 1251817b
      Iustin Pop authored
      
      
      This small patch fixes compatibility with a few newer Haskell libraries:
      
      - base 4.6, included with ghc 7.6, removed the deprecated 'catch'
        function from Prelude, so our "import Prelude hiding (catch)" is now
        an error; we workaround by using fully-qualified
        Control.Exception.catch name
      
      - containers 0.5 changed the signature of 'deleteFindMax'; we
        workaround by using separate 'findMax' and 'deleteMax'
      
      - QuickCheck 2.5 removed the 'maxDiscards' test parameter, replacing
        it with a much better 'maxDiscardsRatio'; however, until we can
        depend on that, we workaround by just removing it (we don't control
        anymore the maxDiscards, instead leaving it default; for our default
        test size, this is no change, as the default value is already 500,
        which is our default as well) and not printing it anymore
      
      Tested on Squeeze (+extra libs), Wheezy and experimental, which covers
      all supported GHC versions.
      
      Also, merging this in master will be a pain, but unless we want to
      stop supporting 2.6…
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      1251817b
  2. 06 Nov, 2012 13 commits
  3. 05 Nov, 2012 1 commit
    • Dato Simó's avatar
      cli.py: use None as name for tag operations on the cluster · bcd35e09
      Dato Simó authored
      
      
      This change is mostly cosmetic. Previously, the literal "cluster" was
      used for the 'name' field of tag operations on the cluster (as opposed
      to a node or an instance). Since this field has a type of TMaybeString
      specifically for the case of the cluster, it seems more correct to use
      None, rather than an arbitrary string (that is not used by the callee).
      
      Additionally: note in opcodes.py that groups also expect a name; the
      previous comment only referred to nodes and instances.
      Signed-off-by: default avatarDato Simó <dato@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      bcd35e09
  4. 02 Nov, 2012 1 commit
  5. 01 Nov, 2012 9 commits
  6. 30 Oct, 2012 5 commits
  7. 29 Oct, 2012 3 commits
  8. 26 Oct, 2012 1 commit
    • Iustin Pop's avatar
      Convert Luxi results to Ganeti errors · 7adb7dff
      Iustin Pop authored
      
      
      This a bit too complex patch converts the result of Luxi calls
      (submitJob, query*, etc.) from Result to ErrorResult. It then
      immediately revers this in the HTools/Backend/Luxi module, where we
      don't need necessarily the full error type (just a nice error
      message), and does the same in Hbal's job execution functions.
      
      While at first sight this doesn't seem to do much, what we get is
      actual error messages from Ganeti, plus improvements to the result
      parsing: instead of "can't parse char", we now get properly (note,
      wrapped manually):
      
        Executing jobset for instances instance1, …
        Job submission error: Failure: the job queue is marked for drain and
          doesn't accept new requests
      
      Or:
      
        Job submission error: Unhandled exception: LuxiError "parsing job
          id: cannot parse string 'a956101'"
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      7adb7dff