1. 10 May, 2012 2 commits
  2. 26 Apr, 2012 1 commit
  3. 20 Apr, 2012 2 commits
  4. 19 Apr, 2012 1 commit
  5. 16 Apr, 2012 1 commit
  6. 11 Apr, 2012 3 commits
    • Iustin Pop's avatar
      Fix extra whitespace · 612f7fd4
      Iustin Pop authored
      
      
      Sorry, didn't catch this before…
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      (cherry picked from commit 54b010ca
      
      )
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      612f7fd4
    • Dimitris Aragiorgis's avatar
      Further fixes concerning drbd port release · 42f25b0b
      Dimitris Aragiorgis authored
      Commit 3b3b1bca does not entirely fix the bug introduced in commit
      f396ad8c
      
      . It fixes consistency of config data in permanent storage, but
      does not ensure consistency in data held in runtime memory of masterd.
      
      The bug of duplicate ports is still triggered when LUInstanceRemove()
      invokes _RemoveDisks() and this returns False (in case
      call_blockdev_remove RPC fails). The drbd ports get returned in the
      pool, but execution is aborted and RemoveInstance() is never invoked.
      
      Due to the fact that port handling is not done with
      TemporaryReservationManager, ensure that ports are released, only if
      disk related config data is deleted.
      
      In _RemoveDisks() release ports only if all RPCs succeed.
      
      Extend _RemoveDisks() to include ignore_failures argument passed by
      _RemoveInstance() to handle the ports appropriately.
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      42f25b0b
    • Dimitris Aragiorgis's avatar
      Fix a bug concerning TCP port release · 2522b7c4
      Dimitris Aragiorgis authored
      Commit f396ad8c
      
       returns the TCP port used by DRBD disk back to the
      TCP/UDP port pool using AddTcpUdpPort().
      
      However, AddTcpUdpPort() writes the config on every invocation,
      using _WriteConfig(). This causes two problems:
      
       * it causes critical errors logged by VerifyConfig(), after the DRBD
         disk removal, and until the actual instance removal.
       * if the code following AddTcpUdpPort() fails, the port is already
         returned back the pool, which causes the port to have duplicates
         (inconsistent config).
      
      AddTcpUdpPort() is invoked in three cases:
      
       * during InstanceRemove() through _RemoveDisks().
       * during InstanceSetParams() in case of disk removal.
       * during InstanceSetParams() through _ConvertDrbdToPlain().
      
      This commit fixes the problem by removing the _WriteConfig() call from
      AddTcpUdpPort(), delegate it to Update() via the
      TemporaryReservationManager and ensure AddTcpUdpPort() precedes
      Update().
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      [iustin@google.com: small comments adjustements]
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      (cherry picked from commit 3b3b1bca)
      2522b7c4
  7. 30 Mar, 2012 1 commit
  8. 29 Mar, 2012 1 commit
    • Dimitris Aragiorgis's avatar
      Fix a bug concerning TCP port release · 3b3b1bca
      Dimitris Aragiorgis authored
      Commit f396ad8c
      
       returns the TCP port used by DRBD disk back to the
      TCP/UDP port pool using AddTcpUdpPort().
      
      However, AddTcpUdpPort() writes the config on every invocation,
      using _WriteConfig(). This causes two problems:
      
       * it causes critical errors logged by VerifyConfig(), after the DRBD
         disk removal, and until the actual instance removal.
       * if the code following AddTcpUdpPort() fails, the port is already
         returned back the pool, which causes the port to have duplicates
         (inconsistent config).
      
      AddTcpUdpPort() is invoked in three cases:
      
       * during InstanceRemove() through _RemoveDisks().
       * during InstanceSetParams() in case of disk removal.
       * during InstanceSetParams() through _ConvertDrbdToPlain().
      
      This commit fixes the problem by removing the _WriteConfig() call from
      AddTcpUdpPort(), delegate it to Update() via the
      TemporaryReservationManager and ensure AddTcpUdpPort() precedes
      Update().
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      [iustin@google.com: small comments adjustements]
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      3b3b1bca
  9. 28 Mar, 2012 3 commits
  10. 23 Mar, 2012 3 commits
  11. 22 Mar, 2012 4 commits
  12. 20 Mar, 2012 1 commit
  13. 19 Mar, 2012 1 commit
  14. 15 Mar, 2012 4 commits
  15. 27 Feb, 2012 1 commit
    • Iustin Pop's avatar
      Remove a superfluous warning in LUNodeRemove · fe8d2553
      Iustin Pop authored
      
      
      Since we run the post-hooks explicitly in the Exec() function (via
      _RunPostHook) after we removed the target node from the config, we
      will get a:
      
        WARNING Node 'node2', which is about to be removed, was not found in
        the list of all nodes
      
      in the logs every time we remove a node. The patch just removes the
      warning, as actually invalid configurations (for the pre hook) will be
      checked correctly elsewhere.
      
      Additionally, the docstrings for BuildHooksEnv and BuildHooksNodes are
      corrected/switched.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      fe8d2553
  16. 21 Feb, 2012 2 commits
  17. 17 Feb, 2012 4 commits
  18. 15 Feb, 2012 2 commits
  19. 14 Feb, 2012 1 commit
  20. 13 Feb, 2012 2 commits
    • Michael Hanselmann's avatar
      ApplyContainerMods: Return changes from callbacks · efcfa99d
      Michael Hanselmann authored
      
      
      … instead of passing the list of changes as a parameter.
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      efcfa99d
    • Michael Hanselmann's avatar
      LUInstanceSetParams: Convert to generic algorithm for NIC/disk changes · c0f1033f
      Michael Hanselmann authored
      
      
      Unfortunately this got a bit messier than I intended, but then again it
      cleans up a lot of messy code with heaps of local variables
      (“this_nic_override”) and LU attributes (“nic_pnew”, “nic_pinst”). Most
      of these variables were index by a number, or one of the
      constants.DDM_* constants.
      
      This patch moves the code for adding/modifying/removing a NIC/disk to
      dedicated, small functions. The previously added generic algorithm for
      applying changes to containers is then used to actually change the
      instance's network interfaces or disks based on the requested
      modifications. The LU now supports adding/removing disks/NICs in
      arbitrary positions.
      
      The compuation of all network interface changes has been moved to
      CheckPrereq, so that its result can be used for hooks. For this to work
      without side-effects, the NIC objects need to be copied (only done if
      there are actual changes).
      
      The command line utility still needs to be updated.
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      c0f1033f