Skip to content
Snippets Groups Projects
  1. Dec 12, 2007
  2. Dec 03, 2007
  3. Nov 29, 2007
  4. Nov 13, 2007
  5. Nov 05, 2007
    • Guido Trotter's avatar
      Convert os_get to use OS rather than InvalidOS · dfa96ded
      Guido Trotter authored
      In order to do this for simplicity we leave the OSFromDisk function as-is and
      we convert the eventual exception to an OS object in ganeti-noded. The
      unmangling gets simplified and so does the code for checking whether the OS is
      valid.
      
      Reviewed-By: iustinp
      
      dfa96ded
    • Guido Trotter's avatar
      Simplify diagnose mangling/unmangling functions · 4e679f11
      Guido Trotter authored
      The functions in ganeti-noded and rpc.py still deal with the fact that an
      InvalidOS error could be returned by DiagnoseOS. As this is not the case
      anymore simplify their code for the current behavior.
      
      Reviewed-By: iustinp
      
      4e679f11
  6. Nov 02, 2007
    • Iustin Pop's avatar
      Implement device to instance mapping cache · 3f78eef2
      Iustin Pop authored
      Currently, troubleshooting DRBD problems involves a manual process of going
      backwards from the DRBD device to the instance that owns it.
      
      This patch adds a weak (i.e. not guaranteed to be correct or up-to-date)
      cache of device to instance. The cache should be, in normal operation,
      having correct information as the only time when devices change paths
      are when they are started/stopped, and the code in backend.py adds cache
      updates to exactly these operations.
      
      The only drawback of this implementation is that we don't fully update
      the cache on renames of devices (we clean the old entries but we don't
      add new ones). Since the rename changes the path only for LVs (and not
      drbd and md), this is less of a problem as the target of this code is
      debugging DRBD and MD issues.
      
      The patch writes files named bdev_drbd<N> (or bdev_md<N>,
      bdev_xenvg_...) in /var/run/ganeti (more exactly, LOCALSTATEDIR/ganeti).
      The files start with 'bdev_' and continue with the path of the device
      under /dev/ (this prefix stripped), and contain the following values,
      space separated:
        - instance name
        - primary or secondary (depending on how the device is on the primary
          or secondary node)
        - instance visible name: sda or sdb or not_visible, the latter case
          when the device is not the top-level device (i.e. remote_raid1
          templates will have sd[ab] for the md, but not_visible for drbd and
          logical volumes)
      
      The cache is designed to not raise any errors, if there is an I/O error
      it will only be logged in the node daemon log file. This is in order to
      reduce the possible impact of the cache on the block device activation
      and shutdown code.
      
      Reviewed-by: imsnah
      3f78eef2
  7. Oct 29, 2007
    • Iustin Pop's avatar
      Implement block device renaming · f3e513ad
      Iustin Pop authored
      This patch add code for renaming a device; more precisely, for changing
      the unique_id of the device. This means:
        - logical volumes, rename the volume
        - drbd8, change the remote peer
      
      This is needed for the being able to replace disks for drbd8.
      
      Reviewed-by: imsnah
      f3e513ad
  8. Oct 25, 2007
    • Iustin Pop's avatar
      Modify two mirror-device related rpc calls · 153d9724
      Iustin Pop authored
      The two calls mirror_addchild and mirror_removechild take only one child
      for addition/removal. While this is enough for our md usage, for local
      disk replacement in drbd8, we need to be able to specify both the data
      and metadata device. This patch modifies these two rpc calls (and their
      backend implementation and their usage in cmdlib) to take a list of
      children to add/remove.
      
      Reviewed-by: imsnah
      153d9724
  9. Oct 17, 2007
    • Alexander Schreiber's avatar
      Patch series for reboot feature, part 1 · 007a2f3e
      Alexander Schreiber authored
      This patch series implements the reboot command for gnt-instance. It
      supports three types of reboot: soft (hypervisor reboot), hard (instance
      config rebuild and reboot) and full (full instance shutdown and startup
      again).
      
      This patch contains the backend and rpc part of the patch.
      
      
      Reviewed-by: iustinp
      
      007a2f3e
  10. Oct 15, 2007
    • Iustin Pop's avatar
      Fix node daemon log file permissions · b50f022f
      Iustin Pop authored
      The creation of the log file for the node daemon lacks the mode
      parameter, so after applying the current umask, the file got 0700
      permissions. Restrict this to the correct 0600.
      
      Reviewed-by: schreiberal
      b50f022f
  11. Oct 10, 2007
  12. Oct 04, 2007
  13. Sep 21, 2007
    • Iustin Pop's avatar
      Remove requirement that host names are FQDN · 89e1fc26
      Iustin Pop authored
      We currently require that hostnames are FQDN not short names
      (node1.example.com instead of node1). We can allow short names as long
      as:
        - we always resolve the names as returned by socket.gethostname()
        - we rely on having a working resolver
      
      These issues are not as big as may seem, as we only did gethostname() in
      a few places in order to check for the master; we already required
      working resolver all over the code for the other nodes names (and thus
      requiring the same for the current node name is normal).  The patch
      moves some resolver calls from within execution path to the checking
      path (which can abort without any problems). It is important that after
      this patch is applied, no name resolving is called from the execution
      path (LU.Exec() or other code that is called from within those methods)
      as in this case we get much better code flow.
      
      This patch also changes the functions for doing name lookups and
      encapsulates all functionality in a single class.
      
      The final change is that, by requiring working resolver at all times, we
      can change the 'return None' into an exception and thus we don't have to
      check manually each time; only some special cases will check
      (ganeti-daemon and ganeti-watcher which are not covered by the
      generalized exception handling in cli.py). The code is cleaner this way.
      
      Reviewed-by: imsnah
      89e1fc26
    • Iustin Pop's avatar
      Move a constant from ganeti-master to constants.py · 619fdc8e
      Iustin Pop authored
      The EXIT_NODESETUP_ERROR is a useful constant and ganeti-watcher could
      use it too. This patch moves it to constants.py and modifed the
      ganeti-master script to use it from there.
      
      Reviewed-by: imsnah
      619fdc8e
  14. Sep 17, 2007
  15. Aug 20, 2007
  16. Aug 14, 2007
    • Iustin Pop's avatar
      Style changes for pep-8 and python-3000 compliance. · 3ecf6786
      Iustin Pop authored
      This changes the raising of exceptions from:
        raise Exception, value
      to
        raise Exception(value)
      
      as the first form will be removed in python-3000 and the second form is
      preferred now.
      
      The changes also involve a few cases of changing from raising standard
      exceptions and use our own ones.
      
      The new version also fixes many pylint-generated warnings, especially in
      ganeti-noded where I changed many methods to @staticmethod.
      
      There is no functionality changed (barring any bugs).
      3ecf6786
  17. Aug 03, 2007
  18. Jul 26, 2007
  19. Jul 25, 2007
  20. Jul 24, 2007
  21. Jul 23, 2007
    • Iustin Pop's avatar
      Big change/cleanup in relation to the master startup: · 880478f8
      Iustin Pop authored
        - move the master node name from the ConfigWriter to SimpleStore (all
          nodes need this, and it was the only thing pulled in from the
          ConfigWriter on nodes)
        - fix mcpu.py and the testing w.r.t. this change; for testing, rename
          the fake_config.py to mocks.py and add a FakeSStore object
        - then add a ganeti-master script which can be run on any node at boot
          and which will not do anything if not master on start (on stop it
          will still try to remove the ip address)
        - also add a new cluster-wide variable (master_netdev) that determines
          on which interface we add this ip address; it's customizable at
          cluster init time
        - also remove the cluster name file which was separately handled from
          ssconf (not needed anymore)
        - remove the master init.d links from the list of config files as this
          is not our responsibility now
      
      880478f8
  22. Jul 18, 2007
  23. Jul 16, 2007
Loading