1. 23 Nov, 2010 2 commits
    • Iustin Pop's avatar
      utils._RunCmdPipe: fix poller timeout usage · a298fd5a
      Iustin Pop authored
      
      
      This patch makes a simple timeout test (e.g. testTimeoutKill) go from
      13K poll syscalls to just 6. The code didn't take into account that
      RunningTimeout talks in seconds while the poller object expects
      milliseconds.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      a298fd5a
    • Iustin Pop's avatar
      Fix utils unittest TestRunCmd.testTimeoutKill · 815bf6d5
      Iustin Pop authored
      
      
      Currently the test executes "/bin/sh -c 'trap "" TERM …" via the shell,
      which means we have two shells involved (the parent one and the child
      one, which does the trap). For some weird reason, this works for older
      OSes: the first shell exec's the second one, whereas on squeeze it forks
      and only then exec. This might be due to changes in Python or bash or
      whatever.
      
      In any case, the point is that this is a hacky way to call a shell, so
      we change this to simply execute the desired shell directly, without any
      intermediate shells (I don't understand why it was written as such
      originally).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      815bf6d5
  2. 22 Nov, 2010 2 commits
  3. 19 Nov, 2010 8 commits
  4. 18 Nov, 2010 3 commits
    • Iustin Pop's avatar
      Reinstall instance: disallow offline secondaries · 9aacb199
      Iustin Pop authored
      
      
      Currently, reinstallation of a DRBD instance with the secondary node offline does:
      
      node1# gnt-instance reinstall -f instance1
      Waiting for job 139053 for instance1...
      Thu Nov 18 01:36:09 2010  - WARNING: Could not prepare block device disk/0 on node node3 (is_primary=False, pass=1): Node is marked offline
      Thu Nov 18 01:36:09 2010  - WARNING: Could not shutdown block device disk/0 on node node3: Node is marked offline
      Job 139053 for instance1 has failed: Failure: command execution error:
      Disk consistency error
      
      Since this fails anyway, let's check the secondary nodes, thus
      preventing any modifications to the instance (e.g. OS type change):
      
      node1# gnt-instance reinstall -f instance1
      Waiting for job 139058 for instance1...
      Job 139058 for instance1 has failed: Failure: prerequisites not met for this operation:
      error type: wrong_state, error details:
      Instance secondary node offline, cannot reinstall: node3
      
      The patch needs modifications to the _CheckNodeOnline function, in order
      to display meaningful messages ("Can't use offline node" would be very
      confusing for an instance reinstall, since we didn't select a node
      manually).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      9aacb199
    • Iustin Pop's avatar
      QA: check that doubly modifying an OS state is OK · 89e8af70
      Iustin Pop authored
      
      
      This would have prevented the bug fixed in the previous patch :(
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      89e8af70
    • Iustin Pop's avatar
      Fix breakage in OS state modify · e2334900
      Iustin Pop authored
      
      
      I was using the feedback_fn function incorrectly (it doesn't
      automatically expand the arguments).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      e2334900
  5. 17 Nov, 2010 3 commits
  6. 16 Nov, 2010 2 commits
  7. 15 Nov, 2010 20 commits