** Branch linked: lp:ubuntu/lucid-proposed/drbd8

-- 
You received this bug notification because you are a member of Ubuntu
High Availability Team, which is subscribed to drbd8 in Ubuntu.
https://bugs.launchpad.net/bugs/744293

Title:
  Infinite loop in helper LVM script for DRBD 8 in Lucid

Status in “drbd8” package in Ubuntu:
  Fix Released
Status in “drbd8” source package in Lucid:
  Fix Committed

Bug description:
  The script /usr/lib/drbd/snapshot-resync-target-lvm.sh shipped with
  drbd v8.3.7 in Lucid fails to read its command line options and falls
  into an infinite loop.

  This bug is not in present in natty, but I humbly request an SRU to
  Lucid.

  This script can be called by DRBD to create an LVM snapshot of a
  resource before it starts resyncing (thus becoming inconsistent). This
  script is present (though commented out) in the default drbd
  configuration file /etc/drbd.d/global_common.conf .

  This bug can result in drbd silently failing to resync an outdated
  resource. Thus, any newer data will be lost if the cluster fails over
  to the outdated node.

  This is a known problem upstream and it was fixed in later versions of
  DRBD. The following patch was committed upstream to address this bug :
  
http://git.drbd.org/?p=drbd-8.3.git;a=commitdiff;h=1fd3ad953663615e946167191e1d9885af81450a

  Steps to reproduce:
  On a cluster composed of node A and node B:
   - on both nodes, uncomment the line "before-resync-target 
"/usr/lib/drbd/snapshot-resync-target-lvm.sh -p 15 -- -c 16k";"
   - on both nodes, configure a drbd resource called "test"
   - make the initial synchronization
   - on B, do "drbdadm disconnect test"
   - nn A, make "test" primary and write to it
   - on B, do "drbdadm connect test"
   => the script will kick in and fall in an endless loop - top will show it 
using 100% CPU.

  lsb_release -rd
  Description:  Ubuntu 10.04.2 LTS
  Release:      10.04

  apt-cache policy drbd8-utils
  drbd8-utils:
    Installé : 2:8.3.7-1ubuntu2.1
    Candidat : 2:8.3.7-1ubuntu2.1
   Table de version :
   *** 2:8.3.7-1ubuntu2.1 0
          500 http://fr.archive.ubuntu.com/ubuntu/ lucid-updates/main Packages
          100 /var/lib/dpkg/status
       2:8.3.7-1ubuntu2 0
          500 http://fr.archive.ubuntu.com/ubuntu/ lucid/main Packages

  Lionel Sausin.

  =======
  SRU Justification

  IMPACT:

  Using the --percent option, the script entered in an endless loop.
  This can result on having DRBD failing to resync an outdated resource
  when using LVM.

  REPRODUCE (as specified above):

  On a cluster composed of node A and node B:
   - on both nodes, uncomment the line "before-resync-target 
"/usr/lib/drbd/snapshot-resync-target-lvm.sh -p 15 -- -c 16k";"
   - on both nodes, configure a drbd resource called "test"
   - make the initial synchronization
   - on B, do "drbdadm disconnect test"
   - nn A, make "test" primary and write to it
   - on B, do "drbdadm connect test"
   => the script will kick in and fall in an endless loop - top will show it 
using 100% CPU.

  HOW FIXED:

  The fix was taken from upstream. It basically consists on sourcing the
  default file first, then shifting correctly the option, and finally
  and use drbdadm sh-minor to obtain the minor version instead of
  guessing it, which all together can cause the script to enter in
  infinite loop and fail to resync as specified above.

  PATCH:

  Attached. Uploaded to lucid-proposed for review.

  REGRESSION POTENTIAL:

  Minimal. This has been tested thoroughly.

  =======

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/drbd8/+bug/744293/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~ubuntu-ha
Post to     : ubuntu-ha@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-ha
More help   : https://help.launchpad.net/ListHelp

Reply via email to