Skip to content
Snippets Groups Projects
  1. Apr 10, 2008
  2. Apr 09, 2008
  3. Apr 08, 2008
  4. Apr 07, 2008
    • Iustin Pop's avatar
      Implement selective job query · 283439c9
      Iustin Pop authored
      This patch implements query-ing of only selected jobs instead of all.
      
      Reviewed-by: ultrotter
      283439c9
    • Iustin Pop's avatar
      Move some checks from cli.py to luxi.py · a14a17fc
      Iustin Pop authored
      The idea of cli.py and luxi.py is that all protocol checks should be in
      luxi, and cli.py should just offer some helpful shortcuts for the
      command line scripts.
      
      This patch removes the result checks from cli and adds some other checks
      to luxi. It does no longer check the success/failure since it's not yet
      clear how that should be handled - probably exceptions.
      
      Reviewed-by: ultrotter
      a14a17fc
    • Iustin Pop's avatar
      A small capitalization change (OpCode.LoadOpcode) · 00abdc96
      Iustin Pop authored
      This small patch fixed the opcodes.OpCode.LoadOpcode capitalization to
      what was intented to be (as the comment says): LoadOpCode.
      
      Reviewed-by: ultrotter
      00abdc96
  5. Apr 05, 2008
    • Iustin Pop's avatar
      Implement forking/master role checking in masterd · c1f2901b
      Iustin Pop authored
      This patch adds checks for the master role and daemonize support to
      ganeti-masterd.
      
      The patch modifies the startup/shutdown of the server because:
        - we want bind()/listen() to the master socket to occur before forking
          so that we can return a correct exit code and write messages to
          stderr
        - but we want thread startup to occur after fork(), otherwise python
          threading gets confused
      
      The patch also has some small cleanups:
        - remove the unix socket after closing it, so we don't need to remove
          it manually
        - instead of just telling the threads to terminate via the new_queue,
          we also join() them so that the logs show what thread clinging to
          life
        - the daemon logs to its own logfile now
        - there is command line parameter support :)
      
      Reviewed-by: imsnah
      c1f2901b
    • Manuel Franceschini's avatar
      Add FileStorage class · 6f695a2e
      Manuel Franceschini authored
      This is the representation of file VBDs on the backend. It's the first
      implementation an supports only raw files.
      
      Reviewed-by: iustinp
      6f695a2e
    • Manuel Franceschini's avatar
      rpc directory functions for file backend · 5e04ed8b
      Manuel Franceschini authored
      Reviewed-by: ultrotter
      5e04ed8b
    • Manuel Franceschini's avatar
      Backend directory functions for file backend · 778b75bb
      Manuel Franceschini authored
      Add _[Create,Remove,Rename]FileStorageDir function which are needed for
      file-based instance management. These function check whether the given
      directory to operate on is under the cluster-wide defined default file
      storage dir. If this is not the case the won't do anything and return
      False. This is to prevent cluster manipulation or damage.
      
      Reviewed-by: ultrotter
      778b75bb
  6. Apr 04, 2008
    • Manuel Franceschini's avatar
      Fix SetVGName() to access object not dict · 2d4011cd
      Manuel Franceschini authored
      Reviewed-by: imsnah
      2d4011cd
    • Iustin Pop's avatar
      Allow utils.Daemonize() to not close some fds · 8ff612c2
      Iustin Pop authored
      This patch implements an optional parameter to utils.Daemonize() which
      allows that function to not close some file descriptors.
      
      This will allow the master daemon to open the listening socket before
      fork - in order to be able to notify errors and return a meaningful exit
      code, and then when we fork we don't close that fd.
      
      Reviewed-by: imsnah
      8ff612c2
    • Iustin Pop's avatar
      Add a simple gnt-job script · 7a1ecaed
      Iustin Pop authored
      This patch adds a very basic gnt-job script that allows job querying.
      This goes on top of the previous master daemon patches.
      
      Currently, because of the not-changed cmd lock, you can't query the jobs
      as long as a job is running - you have to rm the cmd lock and then you
      can query the jobs.
      
      Reviewed-by: imsnah
      7a1ecaed
    • Iustin Pop's avatar
      Move the daemonize function to utils.py · 8f765069
      Iustin Pop authored
      Currently, in ganeti-noded we have the createDaemon function. Since
      we'll need the same in other daemons, we move this function to utils.py
      
      With the move, a few changes were also done:
        - change the name to Daemonize()
        - add a parameter, logfile, as different daemons will want to log to
          different files
        - remove the try.. except.. around the fork calls, since they were
          only re-raising the OS exception with less data; unless we want to
          actually handle fork error (not just re-raising), these try blocks
          are not useful
        - change the return style at the end of the function
      
      Reviewed-by: imsnah
      8f765069
  7. Apr 02, 2008
    • Guido Trotter's avatar
      Improve disk consistency error message again · aa9d0c32
      Guido Trotter authored
      This new version includes all the possible failure options.
      
      Reviewed-by: iustinp
      
      aa9d0c32
    • Guido Trotter's avatar
      Fix misleading error message when checking disks · ad6d3f7d
      Guido Trotter authored
      _CheckDiskConsistency outputs "Can't get any data from node NODE" when no drbd
      is found on the target node. This causes a misleading error message to be
      output for example on failover (when the primary node is down, or the instance
      is not running), stating that no data could be got from the secondary node,
      which scares the user and misleads him. Changing this to "Disk degraded or not
      found on node %s" still reports that something is missing, but on the other
      hand doesn't make the user think the node is down, or has no data at all...
      
      Reviewed-by: imsnah
      
      ad6d3f7d
    • Guido Trotter's avatar
      Handle better failing over non-running instances · a0aaa0d0
      Guido Trotter authored
      Right now if you try to failover an instance which is not marked as up the
      operation will fail unless you pass the --ignore-consistency flag because the
      disks won't be considered to be consistent. Allow them to be if we know the
      instance shouldn't be up.
      
      Reviewed-by: imsnah
      
      a0aaa0d0
    • Guido Trotter's avatar
      Improve export and fix export-on-norun bug · fb300fb7
      Guido Trotter authored
      Currently gnt-backup export chains the ShutdownInstance and StartupInstance
      opcodes to itself. This works but (a) it's suboptimal, because there's no need
      to deactivate the instance's disks as we are about to restart it anyway, and
      (b) doesn't take care of instances which are already down (and should be). This
      patch takes care of this by just calling the shutdown rpc function instead of
      the whole opcode, and just starting up the instance if it's configured as up in
      the first place.
      
      Reviewed-by: imsnah
      
      fb300fb7
    • Michael Hanselmann's avatar
      Forcibly convert export data to str object · 2d3e73c4
      Michael Hanselmann authored
      ConfigParser.SafeConfigParser doesn't support unicode string objects.
      Unicode string objects are returned by simplejson.
      
      Reviewed-by: iustinp
      2d3e73c4
    • Guido Trotter's avatar
      failover: only start instance if we should · 12a0cfbe
      Guido Trotter authored
      gnt-instance failover on an instance marked as down will mistakenly bring it
      up. The watcher will then shut it down again, but it's a lot better (and safer)
      not to start it at all.
      
      Reviewed-by: imsnah
      12a0cfbe
    • Guido Trotter's avatar
      Locking: fix one indentation error (codestyle) · c5cc3403
      Guido Trotter authored
      Reviewed-by: imsnah
      c5cc3403
    • Guido Trotter's avatar
      Locking: fix superlong lines (codestyle) · 4e07ec8c
      Guido Trotter authored
      Reviewed-by: imsnah
      4e07ec8c
  8. Apr 01, 2008
  9. Mar 31, 2008
    • Iustin Pop's avatar
      Change the 'gnt-cluster command' execution order · 5f83e263
      Iustin Pop authored
      This patch makes the command execute last on the master (if the master
      is selected). The order for the other nodes is unchanged.
      
      The patch also updates the man page with some explanations and an
      example.
      
      Reviewed-by: imsnah
      5f83e263
    • Manuel Franceschini's avatar
      parms->params Refactoring · 7767bbf5
      Manuel Franceschini authored
      - Substitute all occurences of name 'parms' with 'params'
      - Small codestyle fix
      
      Reviewed-by: ultrotter
      7767bbf5
    • Manuel Franceschini's avatar
      Map OpSetClusterParams to correponding LU · 0cc05d44
      Manuel Franceschini authored
      Reviewed-by: iustinp
      0cc05d44
    • Manuel Franceschini's avatar
      Add OpSetClusterParams to opcodes · 12515db7
      Manuel Franceschini authored
      Reviewed-by: iustinp
      12515db7
    • Manuel Franceschini's avatar
      Skip HasValidVG when --no-lvm-storage on cluster init · efa14262
      Manuel Franceschini authored
      This patch does two things:
      - Remove "vg_name" from _OP_REQP due to the introduction of
        --no-lvm-storage. Since vg_name option has as default now None and is
        only set to the DEFAULT_VG if lvm_storage is enabled, this is needed
      - It changes LUInitCluster.CheckPrereq() to skip _HasValidVG check
        initializing the cluster with --no-lvm-storage. Furthermore it adds to
        the help message the statement of the possibility to use
        --no-lvm-storage if no 'xenvg' volume group is found.
      
      Reviewed-by: iustinp
      efa14262
    • Manuel Franceschini's avatar
      Add LUSetClusterParams to cmdlib · 8084f9f6
      Manuel Franceschini authored
      Add LUSetClusterParams, which is the LU to modify cluster options.
      This includes checks:
      - not to disable lvm storage when it's already disabled
      - not to enable lvm storage when it is already enabled
      - not to disable lvm when lvm-based instances are present
      - that the specified volume group is valid on all cluster-nodes
        when lvm-storage is going to be enabled
      
      Reviewed-by: iustinp
      8084f9f6
    • Manuel Franceschini's avatar
      Add method SetVGName() to config.py · 89ff8e15
      Manuel Franceschini authored
      Reviewed-by: iustinp
      89ff8e15
    • Manuel Franceschini's avatar
      Add lvm-storage check when creating instances · eedc99de
      Manuel Franceschini authored
      This adds a check to fail instance creation if lvm-storage is disabled
      (cluster-wide). If lvm-storage is disabled (by initializing the cluster
      with --no-lvm-storage) only instances with disk template in frozenset
      DTS_NOT_LVM are allowed to create.
      
      Reviewed-by: iustinp
      eedc99de
    • Manuel Franceschini's avatar
      Add DEFAULT_VG and DTS_NOT_LVM to constants.py · d63e148a
      Manuel Franceschini authored
      DTS_NOT_LVM:
      This constant is needed when checking if an instance can be created with
      the given disk template if no lvm-storage is available, i.e. the ganeti
      cluster does not have a volume group
      
      DEFAULT_VG:
      'xenvg' has been hardcoded before.
      
      Reviewed-by: iustinp
      d63e148a
Loading