Skip to content
Snippets Groups Projects
  1. Oct 29, 2007
    • Iustin Pop's avatar
      Fix a non-clear error message · 233d06c5
      Iustin Pop authored
      Reviewed-by: imsnah
      233d06c5
    • Iustin Pop's avatar
      Implement replace-disks for drbd8 devices · a9e0c397
      Iustin Pop authored
      This patch adds three modes of disk replacement for drbd8:
        - replace the disk on the primary node
        - replace the disk on the secondary node
        - replace the secondary node
      
      It also adds some debugging code to backend.py and increments the
      protocol version for the recent changes of the rpc layer.
      
      Reviewed-by: imsnah
      a9e0c397
    • 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
  2. 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
  3. Oct 19, 2007
    • Iustin Pop's avatar
      Abstract more strings values into constants · fe96220b
      Iustin Pop authored
      Currently, the disk types are defined using constants in the code.
      Convert those into constants so that we can easily find them and check
      their usage.
      
      Note that we don't rename the values of the constants as they are used
      in the configuration file, and as such it's best to leave them as they
      are.
      
      Reviewed-by: imsnah
      fe96220b
  4. 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
  5. Oct 16, 2007
    • Iustin Pop's avatar
      Replace more ssh paths with proper constants · 70d9e3d8
      Iustin Pop authored
      The node's ssh keys filenames are now provided as constants; this should
      allow easier customization.
      
      Also, the user's ssh key computing has been abstracted into ssh.py
      
      Reviewed-by: imsnah
      70d9e3d8
  6. Oct 15, 2007
  7. Oct 12, 2007
    • Iustin Pop's avatar
      Remove some hardcoded names/paths from backend.py · 7900ed01
      Iustin Pop authored
      This patch does the following:
        - add constants.GANETI_RUNAS = "root", which is used to compute
          the homedir (and thus the .ssh directory) instead of hardcoding
          "/root/.ssh" in backend.AddNode and backend.LeaveCluster
        - add constants.SSH_CONFIG_DIR (currently hardcoded to /etc/ssh) that
          is used in backend instead of hardcoding it (preparation for
          selecting that at ./configure time)
        - some more internal cleanup in backend.AddNode
      
      Reviewed-by: imsnah
      7900ed01
    • Iustin Pop's avatar
      Do not walk the whole DATA_DIR on node leave · 71eca7c3
      Iustin Pop authored
      Since we remove only files from DATA_DIR and not from subdirectories,
      let's not walk the entire tree, a simple listdir suffices. Also switch
      to utils.RemoveFile from simple os.unlink.
      
      Reviewed-by: imsnah
      71eca7c3
  8. Oct 10, 2007
    • Iustin Pop's avatar
      Remove the shebang from modules · 2f31098c
      Iustin Pop authored
      Since modules are not directly executables, remove the shebang from
      them. This helps with lintian warnings.
      
      Also make the autogenerated _autoconf.py contain two comment lines at
      the beginning, like the other modules.
      
      Reviewed-by: ultrotter
      2f31098c
  9. Oct 08, 2007
  10. Oct 04, 2007
    • Guido Trotter's avatar
      Remove redundant check. · 0ee60a28
      Guido Trotter authored
      This isdir() check leads to a broken error message. Even fixing it creates some
      cases in which the error message is nebulous and unclear while removing it
      makes this situation be dealt with a lot better by the _OSOndiskVersion checks.
      
      
      Reviewed-by: iustinp
      
      0ee60a28
    • Guido Trotter's avatar
      Ship (and display) path for InvalidOS errors too. · 305a7297
      Guido Trotter authored
      - Document the expected change to errors.InvalidOS
      - Always pass the additional argument
      - Modify DiagnoseOS output to show the path
      
      
      Reviewed-by: iustinp, imsnah
      
      305a7297
  11. Oct 03, 2007
  12. Sep 28, 2007
  13. Sep 25, 2007
  14. Sep 17, 2007
    • Iustin Pop's avatar
      A few minor fixes in backend.py · 9716fdce
      Iustin Pop authored
      This uses the recently-added Instance.FindDisk() method instead of
      hard coded find-disk code.
      
      It also renames one parameter to AddNode from ssh to sshkey in order not
      to shadow the ganeti.ssh module.
      
      Reviewed-by: imsnah
      9716fdce
    • Iustin Pop's avatar
      Implement instance rename operation · decd5f45
      Iustin Pop authored
      This patch adds support for instance rename operation at all remaining
      layers: RPC, OpCode/LU and CLI.
      
      Reviewed-by: imsnah
      decd5f45
    • Iustin Pop's avatar
      Add support for rename operation in the OS API · 386b57af
      Iustin Pop authored
      This patch adds support for renaming at OS level. Because of this, we
      need to bump up the version of the OS api from 4 to 5.
      
      The patch also documents the new script interface in the
      ganeti-os-interface(7) man page and adds a section on upgrading the OS
      definitions to the new version.
      
      Reviewed-by: imsnah
      386b57af
  15. Sep 13, 2007
    • Iustin Pop's avatar
      Fix the ssh change which breaks remote ssh commands · 72f0f7fd
      Iustin Pop authored
      Explanation: since we use lists and not a string, every argument we give
      is passed unchanged to the remote shell. So, for example, passing
      '/etc/init.d/ganeti restart' to the remote shell, it will try to run the
      path /etc/init.d/ganeti\ restart. With the s space included. This
      breaks, for example, gnt-node add and gnt-cluster command.
      
      The original problem with the backup routines that led to the "'" change
      is that they use a plain " ".join(list), but we don't need to quote the
      whole ssh remote command for this. We can simply use the existing
      utils.ShellQuoteCmd(list) which does the proper quoting of the ';' or
      '&&' metacharacters.
      
      With this change, both gnt-node add, gnt-cluster command and
      export/import work.
      
      This also improves the error-handling behaviour of one cat command by
      making it conditional on the preceding mkdir.
      
      Reviewed-by: ultrotter
      72f0f7fd
  16. Sep 07, 2007
    • Guido Trotter's avatar
      Make import/export use the auxiliary ssh library to build the remote commands. · 00003458
      Guido Trotter authored
      This avoids forgetting some parameters, as it's happening right now 
      (the correct known host file is not being passed)
      
      In order to do so we split SSHCall into an auxiliary BuildSSHCmd which builds
      the command but doesn't actually call it, and SSHCall itself which runs RunCmd
      on top of BuildSSHCmd's result. BuildSSHCmd is then explicitely called by 
      import/export who has to build a more complex command to be run later.
      00003458
  17. Aug 30, 2007
  18. Aug 24, 2007
    • Iustin Pop's avatar
      Rework ssh known-hosts handling. · 82122173
      Iustin Pop authored
      This changes:
        - cluster setup, we no longer edit /etc/ssh/ssh_known_hosts but our
          own file
        - node add, we no longer remove root's known_hosts (twice)
        - gnt-instance console, both the LU and the script: since now the ssh
          setup is not standard, we need to build the ssh cmdline in the LU
          (instead of manually building it in the script) with the correct
          parameters and use the command line as returned in the script
        - ssh.py, many changes, split options in module-level constants so
          that building the command line in different places is easier/more
          logical
        - backend.py, we no longer remove root's known_hosts in Add node, and
          we allow our own known_hosts file to be uploaded
      
      Reviewed-by: imsnah
      82122173
  19. 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
  20. Aug 03, 2007
  21. Jul 26, 2007
  22. Jul 25, 2007
  23. Jul 24, 2007
  24. 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
  25. Jul 16, 2007
Loading