Fix for iscsitarget session expiration bug blocking OpenStack volume deletion

When iscsitarget is used for nova-volume, there is a volume deletion problem because the iscsi session does not expire properly. A NMU fixing the problem was uploaded to the delayed queue for Debian GNU/Linux wheezy. An unblock request has been issued because it fixes a critical bug and was accepted a few days later. The package will enter wheezy around November 3rd, 2012.

diagnostic and patch

The problem appeared after running the Debian GNU/Linux HOWTO to install OpenStack on wheezy. Volumes were created but could not be removed. It seemed related to iSCSI target administration utility (ietadm) not detecting inactive sessions Edit ubuntu bug. The upstream patch was backported locally on the OpenStack bare metal machine supporting volumes and the package rebuilt and installed:

# apt-get source iscsitarget
# dpkg-source -x iscsitarget_1.4.20.2-10.dsc
# ... add patch in debian/patches/session.patch + in debian/patches/series
# apt-get build-dep iscsitarget
# dpkg -i iscsitarget-dkms_1.4.20.2-10_all.deb
# reboot so that the kernel module is reloaded

It was used during a few weeks without noticing any problems.

reporting the bug and fixing it

The bug was first reported as critical because it makes an unrelated package ( nova-volume ) unusable.

The patch was then cleaned to match the Patch Tagging Guidelines and attached to the bug report for the package maintainer to review.

To facilitate the work of the iscsitarget package maintainer a NMU was prepared and checked to be lintian clean:

#  sudo pbuilder --update --basetgz /var/cache/pbuilder/sid.tgz
# sudo pbuilder build --buildresult /var/www/sid --basetgz /var/cache/pbuilder/sid.tgz iscsitarget_1.4.20.2-10.1.dsc
# lintian  /var/www/sid/iscsitarget_1.4.20.2-10.1.changes
W: iscsitarget source: out-of-date-standards-version 3.9.2 (current is 3.9.3)
N: 1 tag overridden (1 warning)

It was then signed

# debsign -k${GPGKEY} /var/www/sid/iscsitarget_1.4.20.2-10.1.changes
signfile iscsitarget_1.4.20.2-10.1.dsc 497A176D
You need a passphrase to unlock the secret key for
user: "Loic Dachary (OuoU) "
1024-bit DSA key, ID 497A176D, created 2001-02-03
signfile iscsitarget_1.4.20.2-10.1_amd64.changes 497A176D
You need a passphrase to unlock the secret key for
user: "Loic Dachary (OuoU) "
1024-bit DSA key, ID 497A176D, created 2001-02-03
Successfully signed dsc and changes files

and uploaded to the delayed queue.

# dput --delayed 3 /var/www/sid/iscsitarget_1.4.20.2-10.1.changes

The time to expiration can be checked on the Deferred Uploads page.

Discussion with the maintainer

The debian developper in charge of the package asked that the proposed patch is rebased against the -11 experimental version instead of being submitted on its own. An advocacy for separate patches was written and the required rebase was sent at the same time.

Asking for unblock

Debian GNU/Linux wheezy is frozen and each package update needs to be manually approved. While the more complex unblock request from the maintainer of the package was being processed, mail asking for a unblock of the package containing just the release critical patch was sent. It was accepted a few days later. The package will enter wheezy around November 3rd, 2012.

This entry was posted in Essex, openstack. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>