iscsitarget-dkms 1.4.20.3+svn499-0ubuntu2: iscsitarget kernel module failed to build

Bug #1447916 reported by Nitiz
64
This bug affects 11 people
Affects Status Importance Assigned to Milestone
iscsitarget (Ubuntu)
Incomplete
Undecided
zheng mei

Bug Description

i am not able to use iscsi drives since this iscsitarget-dkms package is not bug free

ProblemType: Package
DistroRelease: Ubuntu 14.04
Package: iscsitarget-dkms 1.4.20.3+svn499-0ubuntu2
ProcVersionSignature: Ubuntu 3.16.0-34.47~14.04.1-generic 3.16.7-ckt8
Uname: Linux 3.16.0-34-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.10
Architecture: amd64
DKMSKernelVersion: 3.16.0-30-generic
Date: Wed Apr 22 16:37:27 2015
DuplicateSignature: dkms:iscsitarget-dkms:1.4.20.3+svn499-0ubuntu2:/var/lib/dkms/iscsitarget/1.4.20.3+svn499/build/kernel/block-io.c:90:6: error: ‘struct bio’ has no member named ‘bi_sector’
InstallationDate: Installed on 2015-04-22 (2 days ago)
InstallationMedia: Ubuntu 14.04.2 LTS "Trusty Tahr" - Release amd64 (20150218.1)
PackageArchitecture: all
PackageVersion: 1.4.20.3+svn499-0ubuntu2
SourcePackage: iscsitarget
Title: iscsitarget-dkms 1.4.20.3+svn499-0ubuntu2: iscsitarget kernel module failed to build
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Nitiz (nitiz-verma) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in iscsitarget (Ubuntu):
status: New → Confirmed
Revision history for this message
unze (unze) wrote :

Same here.

Revision history for this message
Laz Peterson (laz-v) wrote :

This seems to affect 3.16 kernels as far as I can tell.

In the meantime, is there an option for installing and using iscsitarget? We have a new server going into the datacenter here in a week or two, and would love to have something in place.

Our current iSCSI targets are running Ubuntu 14.04.1 (3.13.0-44-generic) or Ubuntu 14.04.2 (3.13.0-49-generic) and there were no issues with this.

Or is there a way that we can install Ubuntu 14.04.2 with kernel 3.13.0 instead of 3.16.0?

Revision history for this message
Daniel Wolff (abajur) wrote :

The bug is relatively simple to be solved (at least, it worked for me).

1 - apt-get install iscsitarget iscsitarget-dkms
2 - You will get an error compiling the DKMS module. That's OK.
3 - go to the folder /usr/src/iscsitarget-1.4.20.3+svn499/kernel and edit the file block-io.c
4 - go to line #90, and change this:

bio->bi_sector = ppos >> 9;

to this:

bio->bi_iter.bi_sector = ppos >> 9;

5 - save and close the file.
6 - dpkg-reconfigure iscsitarget-dkms
7 - it should be working by now.

I've tested the module on 14.04.2 LTS, with somewhat big loads (~30Gb of transfer) and it worked pretty well.

Hope it helps somebody :)

Revision history for this message
Laz Peterson (laz-v) wrote :

Daniel, that's a very interesting fix. I'm not too familiar with any of the kernel headers (or really any of the source for that matter). Is the object you are referencing essentially the exact same thing, but from kernel 3.13 -> 3.16?

If this is so ... Regarding the block I/O function, this would (or SHOULD) have no impact whatsoever in normal functionality, would you agree?

I only ask because if this is a simple reference to an obsolete object, then I may consider sending this into production in a couple weeks. Or just hope that there is an official update released by then. :-)

Revision history for this message
Daniel Wolff (abajur) wrote :

Laz,

According to the upstream (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=748953), yeah, pretty much: it appears to be the exact same thing :)

The exact change in kernel was made by this patch: https://github.com/torvalds/linux/commit/4f024f3797c43cb4b73cd2c50cec728842d0e49e

I've made another tests, and it's working pretty darn well, as far as I can tell.

Att,
Wolff

Revision history for this message
Laz Peterson (laz-v) wrote :

Perfect! I love the references, thank you so much.

I'm going to call this "as good as it gets" and roll the dice for testing, and maybe even for production.

I will report if I come across any unexpected issues.

Thanks Wolff.

Revision history for this message
Daniel Wolff (abajur) wrote :

Just to be clear: the code is already fixed in the upstream, at http://sourceforge.net/p/iscsitarget/code/HEAD/tree/trunk/kernel/block-io.c#l90

I guess it's just a matter of using an updated version of it, maybe? (I don't really know exactly how the deb packages are created, so... just guessing).

Att,
Wolff

Revision history for this message
Laz Peterson (laz-v) wrote :

Can't argue with results, can you now? With my fingers crossed, that's good enough for me!

I like to stick with the Ubuntu LTS packages, instead of going upstream. But I think I can now confidently move this into production. :-)

zheng mei (meiyu-fei)
Changed in iscsitarget (Ubuntu):
assignee: nobody → zheng mei (meiyu-fei)
Revision history for this message
myname (jbot2a) wrote :

I am affect by this bug aswell, the mentioned fix still resulted in the same error , I will post details when I am back on the machine.

Revision history for this message
Nish Aravamudan (nacc) wrote :

14.04.1 and 14.04.5 are the only currently supported 14.04 kernels.

14.04.5 has a fix coming via LP: #1612627 and 14.04.1 should already work.

Changed in iscsitarget (Ubuntu):
status: Confirmed → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.