1. 07 Jan, 2009 7 commits
    • Iustin Pop's avatar
      Pass instance name to rpc call blockdev_close · b2e7666a
      Iustin Pop authored
      This is an extract of commit 1166 on the 1.2 branch (Add a rpc call for
      drbd network reconfiguration), but only the blockdev_close part.
      
      The patch changes the blockdev_close call to take the instance so that
      it can remove the symlinks of the instance.
      
      Originally-Reviewed-by: imsnah
      b2e7666a
    • Iustin Pop's avatar
      Fix the _RemoveBlockDevLinks() function · 03dfa658
      Iustin Pop authored
      This is a forward-port of commit 1163 on the 1.2 branch:
        This fixes the removal of the instance symlinks (probably breakage from
        the glob changes).
      
        Reviewed-by: imsnah
      03dfa658
    • Iustin Pop's avatar
      Remove instance's symlinks · 3c9c571d
      Iustin Pop authored
      This is a forward-port of commits 1150 and 1151 on the 1.2 branch:
        Add _RemoveBlockDevLinks auxiliary function, called when an instance
        fails to start and when it is shut down.
      
        Reviewed-by: iustinp
      
      and:
        Fix cut&paste error when removing symlinks
      
        It's just whitespace... isn't it? uhm... :) Anyway, fixing an error made
        when reformatting the code for the new "safer" behaviour.
      
        Reviewed-by: iustinp
      
      Original-Author: ultrotter
      3c9c571d
    • Iustin Pop's avatar
      Catch BlockDeviceError when starting instance · ec596c24
      Iustin Pop authored
      This is a forward-port of commit 1149 on the 1.2 branch:
        _GatherAndLinkBlockDevs used to raise the errors.BlockDeviceError
        exception when it failed to create a block device, and with this patch
        set it does so also when it fails to create a symlink to it.
      
        With this patch we move the call to this function into a pre-existing
        try-except block in the code, and catch the BlockDeviceError exception,
        logging a message and returning a failure state if it happens.
      
        Reviewed-by: iustinp
      
      The changes are related to the new hypervisor and logging syntax.
      
      Original-Author: ultrotter
      ec596c24
    • Iustin Pop's avatar
      Create symlinks to intances' block devices · 9332fd8a
      Iustin Pop authored
      This is a forward-port of commit 1148 on the 1.2 branch:
        Change the _GatherBlockDevs private function, called only one time by
        StartInstance, to _GatherAndLinkBlockDevs, and make it transform the
        device returned even more by calling the new _SimlinkBlockDev auxiliary
        function.
      
        This makes sure that every time an instance is started symlinks to its
        block devices are created, and the instance is started off them, rather
        than the underlying block devices.
      
        Reviewed-by: iustinp
      
      The changes we make to the patch is related to newer function signatures
      in 2.0, and to the fact that iv_name is deprecated and we use instead
      disk%d based on the disk index.
      
      Original-Author: ultrotter
      9332fd8a
    • Iustin Pop's avatar
      Simplify hypervisor block_devices structure · 069cfbf1
      Iustin Pop authored
      This is a partial forward-port of commit 1136 on the 1.2 branch:
      
        The hypervisor doesn't need to be passed the whole block device
        structure, so we'll just give it the block device name on the local
        node, and the name as seen by the instance. This will make it easier to
        manipulate it later without messing with the block devices (eg. by
        changing the system name to a symlink to the name itself).
      
        Since the HVM hypervisor changes the "virtual" name a note is added
        calling for a redesign that doesn't need this change, as different
        hypervisors and emulation types will anyway have different names for
        exported devices.
      
        Reviewed-by: iustinp
      
      The changes in this patch compared to the original are:
        - we keep passing the original disk object, not for its iv_name, but
          for it's physical_id which is needed by the file driver (this could
          be fixed maybe)
        - we don't use the iv_name anymore, since in 2.0 we already use the
          index of the device
      
      Original-Author: ultrotter
      069cfbf1
    • Iustin Pop's avatar
      _AssembleInstanceDisks: fix rpcresult handling · 2b17c3c4
      Iustin Pop authored
      Commit 2117 changed _AssembleInstanceDisks to correctly parse the
      failure status of the new RpcResult structure, but it didn't fix the
      storing of only the result payload. Since RpcResult is not JSON
      serializable, LUActivateInstanceDisks is failing.
      
      Reviewed-by: ultrotter
      2b17c3c4
  2. 06 Jan, 2009 1 commit
  3. 19 Dec, 2008 13 commits
  4. 18 Dec, 2008 11 commits
  5. 17 Dec, 2008 4 commits
  6. 16 Dec, 2008 4 commits