Skip to content
Snippets Groups Projects
  1. Jun 30, 2008
    • Guido Trotter's avatar
      ganeti-masterd: init and distribute common context · 39dcf2ef
      Guido Trotter authored
      This patch creates a new GanetiContext class, which is used to hold
      context common to all ganeti worker threads. As for the
      GanetiLockingManager class it is paramount that there is only one such
      class throughout the execution of Ganeti, so the class checks for that,
      and also forbids its own modification after it's been initialized. The
      context for now contains a ConfigWriter and a GanetiLockingManager and
      is created by the daemon and propagated to PoolWorker(s) and
      JobRunner(s).
      
      Reviewed-by: iustinp
      39dcf2ef
  2. Jun 27, 2008
    • Guido Trotter's avatar
      AddNode: move the initial setup to boostrap · 827f753e
      Guido Trotter authored
      From the master node we can't start ssh and connect to the remote node,
      nor we can do it from ganeti-noded as this ssh section will possibly ask
      for key confirmation and password. So the code to copy the ganeti-noded
      password and SSL key has been moved to bootstrap.py, and it's called by
      gnt-node before the AddNode opcode.
      
      Reviewed-by: iustinp
      827f753e
    • Guido Trotter's avatar
      AddNode: Check for node existance · 05ccd983
      Guido Trotter authored
      In the "new world" we'll need to setup ganeti-noded via ssh on the node
      before calling the AddNode opcode. Before doing it we'll check that the
      node is not already in the cluster, if --readd was not passed. This
      guarantees we're not going to restart ganeti-noded on a running node.
      
      This patch also incidentally fixes a non-style-guide conformant
      docstring.
      
      Reviewed-by: iustinp
      05ccd983
    • Guido Trotter's avatar
      LUAddNode: use node-verify to check node hostname · 5c0527ed
      Guido Trotter authored
      As we can't use ssh.VerifyNodeHostname directly, we'll set up a mini
      node-verify to do checking between the master and the new node. In the
      future networking checks, or more nodes, can be added as well.
      
      Reviewed-by: iustinp
      5c0527ed
    • Guido Trotter's avatar
      LUAddNode: use self.sstore, not a local ss · 3d1e7706
      Guido Trotter authored
      Since we're inside a LU we have access to self.sstore.
      No need to use ss, which separate instantiation will disappear in a few
      patches! ;)
      
      Reviewed-by: iustinp
      3d1e7706
    • Guido Trotter's avatar
      LUAddNode: upload files via rpc, not scp · b5602d15
      Guido Trotter authored
      We used to scp all the ssconf files, and the vnc password file to the
      new node. With this patch we use the upload_file rpc, specifying just
      the new node as a destination. All the files previously copied by scp
      are already allowed by the backend.
      
      Reviewed-by: iustinp
      b5602d15
    • Guido Trotter's avatar
      Allow VNC_PASSWORD_FILE to be rpc-uploaded · 90fae627
      Guido Trotter authored
      What could possibly go wrong?
      
      Reviewed-by: iustinp
      90fae627
    • Guido Trotter's avatar
      Change fping to TcpPing in two LUs · 937f983d
      Guido Trotter authored
      Two LUs are using RunCmd to call fping, in order to check for an IP
      presence on the network. Substituting it with TcpPing will get rid of
      it, which makes it not break in the new world order, where the master
      cannot fork.
      
      Reviewed-by: iustinp
      937f983d
    • Guido Trotter's avatar
      raise QuitGanetiException in LeaveCluster · 6d8b6238
      Guido Trotter authored
      Reviewed-by: iustinp
      6d8b6238
    • Guido Trotter's avatar
      ganeti-noded: Fix handling of QuitGanetiException · c3d7f69b
      Guido Trotter authored
      - s/GanetiQuitException/QuitGanetiException/
      - Look for the arguments in err.args, not err itself
      
      Reviewed-by: iustinp
      c3d7f69b
    • Guido Trotter's avatar
      Simplify QuitGanetiException instantiation · 9f9c8ee2
      Guido Trotter authored
      Rather than packing all the arguments in a tuple, let's pass them
      plainly. The superclass won't complain.
      
      Reviewed-by: iustinp
      9f9c8ee2
    • Michael Hanselmann's avatar
      logger: Set formatter for stderr · 5023934a
      Michael Hanselmann authored
      Having a timestamp on log messages is very useful. The default
      format string doesn't include a timestamp.
      
      Reviewed-by: ultrotter
      5023934a
  3. Jun 26, 2008
    • Guido Trotter's avatar
      When removing a node don't ssh to it · d489ca4f
      Guido Trotter authored
      Even in 1.2 this behaviour is broken, as the rpc call will remove the
      ssh keys before we get a chance to log in. Now the rpc takes care of
      shutting down the node daemon as well, so we definitely can avoid this.
      
      This makes the LURemoveNode operation work again with the threaded
      master daemon.
      
      Reviewed-by: iustinp
      d489ca4f
    • Guido Trotter's avatar
      ganeti-noded: quit on QuitGanetiException · 9ae49f27
      Guido Trotter authored
      Accoring to the usage documented in the QuitGanetiException docstring,
      if we receive such an exception we'll set the global _EXIT_GANETI_NODED
      variable to True, and then return either a valid value or an error
      message to the user. This will be the last request we serve, though,
      because the main loop will be interrupted and the daemon will terminate.
      
      Reviewed-by: iustinp
      9ae49f27
    • Guido Trotter's avatar
      Add errors.QuitGanetiException · e50bdd68
      Guido Trotter authored
      This exception does not signal an error but serves the purpose of making
      the ganeti daemon shut down after handling a request. Currently it will
      be used by ganeti-noded but in the future ganeti-masterd might make use
      of it as well. Its usage is documented in the docstring.
      
      Reviewed-by: iustinp
      e50bdd68
    • Guido Trotter's avatar
      ganeti-noded: serve not quite forever · 3b3db8fd
      Guido Trotter authored
      Rather than calling httpd.serve_forever() in ganeti-noded we'll call
      httpd.handle_request() but just while a global variable, which we'll
      call _EXIT_GANETI_NODED, remains false.
      
      Reviewed-by: iustinp
      3b3db8fd
    • Guido Trotter's avatar
      Add missing empty line in SshKeyError's docstring · b0059682
      Guido Trotter authored
      Reviewed-by: iustinp
      b0059682
    • Guido Trotter's avatar
      Remove spurious check during LUAddNode · 49abbd3e
      Guido Trotter authored
      There is no point in checking whether the cluster VNC password file
      exists as a prerequisite for AddNode, considering the check happens on
      the master node, not the target one. Removing this check.
      
      Reviewed-by: iustinp
      49abbd3e
    • Guido Trotter's avatar
      Improve LURemoveNode BuildHooksEnv docstring · d08869ee
      Guido Trotter authored
      Reviewed-by: iustinp
      d08869ee
    • Michael Hanselmann's avatar
      devel/upload: Add --no-restart option · f63eed35
      Michael Hanselmann authored
      If --no-restart is passed to devel/upload, it'll not run
      "/etc/init.d/ganeti restart" (which kills processes), making
      debugging on a terminal a bit easier.
      
      Reviewed-by: iustinp, ultrotter
      f63eed35
  4. Jun 25, 2008
    • Michael Hanselmann's avatar
      Cleanup old DRBD 0.7.x code · 00fb8246
      Michael Hanselmann authored
      Apparently there were still some leftovers. While removing an instance,
      I got the message "unhandled exception 'module' object has no attribute
      'LD_MD_R1'".
      
      Reviewed-by: iustinp
      00fb8246
    • Iustin Pop's avatar
      Cleanup LV status computation · 99e8295c
      Iustin Pop authored
      Currently, when seeing if a LV is degraded or not (i.e. virtual volume),
      we first attach to the device (which does an lvdisplay), then do a lvs
      in order to display the lv_attr. This generates two external commands to
      do (almost) the same thing.
      
      This patch changes the Attach() method for LVs to call lvs and display
      both the major/minor (needed for attach) and the lv_status (needed for
      GetSyncStatus). Thus, later in GetSyncStatus, we don't need to run lvs
      again, and instead just return the value computed in Attach().
      
      Reviewed-by: imsnah
      99e8295c
  5. Jun 24, 2008
    • Iustin Pop's avatar
      Add a .gitignore file · 7a47c582
      Iustin Pop authored
      This makes it easier to setup new git repositories, and makes it more
      likely all people have the same ignore rules.
      
      Reviewed-by: imsnah
      7a47c582
  6. Jun 23, 2008
  7. Jun 22, 2008
    • Iustin Pop's avatar
      Add a ‘tags’ field to instance and node listing · 130a6a6f
      Iustin Pop authored
      Currently there isn't any easy way to list all nodes or instance and
      their tags; you have to query each node in turn, or list all the tags
      via something like “gnt-cluster search-tags '.*'”. Of course, this is
      not optimal.
      
      The patch adds a new fields to “gnt-instance list” and “gnt-node list”
      called ‘tags’, that will list the tags of the object in comma-separated
      form. This field will be empty if there are no tags (when using a
      separator this output can still be parsed by other scripts).
      
      At opcode level, there is a new fields called ‘tags’ that returns a
      (python) list of the object tags.
      
      Reviewed-by: ultrotter
      130a6a6f
  8. Jun 21, 2008
    • Iustin Pop's avatar
      Implement handling of luxi errors in cli.py · 03a8dbdc
      Iustin Pop authored
      Currently the generic handling of ganeti errors in cli.py (GenericMain
      and FormatError) only handles the core ganeti errors, and not the client
      protocol errors (which live in a separate hierarchy).
      
      This patch adds handling of luxi errors too, and also adds another luxi
      error for the case when the master is not running. This gives us a nice:
      
        gnta1:~# gnt-node list
        Cannot communicate with the master daemon.
        Is it running and listening on '/var/run/ganeti-master.sock'?
      
      error message instead of a traceback.
      
      Reviewed-by: amishchenko
      03a8dbdc
    • Iustin Pop's avatar
      Remove twisted checks from configure.ac · 11fb401c
      Iustin Pop authored
      Currently we don't use twisted, so we remove the twisted checks from the
      configure stage.
      
      Reviewed-by: amishchenko
      11fb401c
  9. Jun 20, 2008
    • Iustin Pop's avatar
      Add a rpc call for BlockDev.Close() · d61cbe76
      Iustin Pop authored
      This patch adds rpc layer calls (in rpc.py and the equivalent in
      ganeti-noded) to close a list of block devices, and the wrapper in
      backend.py that takes a list of Disk objects, identifies them and
      returns correctly formatted results.
      
      The reason why this very basic call was missing until now from the rpc
      layer is that we usually don't care about device closes (though we
      should, and will do so in the future) as only drbd has a meaningful
      Close() operation; right now we directly do Shutdown().
      
      The patch is clean enough that it's actually independent of the live
      migration implementation.
      
      Reviewed-by: imsnah
      d61cbe76
Loading