[Xenial] iscsitarget-dkms 1.4.20.3+svn502-2ubuntu4: iscsitarget kernel module failed to build [error: field ‘rx_hash’ has incomplete type]

Bug #1668808 reported by Shawn Morford
34
This bug affects 5 people
Affects Status Importance Assigned to Milestone
iscsitarget (Ubuntu)
Invalid
Undecided
Unassigned
Xenial
Fix Released
Undecided
Nish Aravamudan
Yakkety
Invalid
Undecided
Unassigned

Bug Description

[Impact]

 * The src:iscsitarget package was removed from 16.10 (LP: #1613758).

 * Therefore, the iscsitarget-dkms package is no longer tested with 16.10+ kernels to ensure it still compiles.

 * The HWE stacks for 16.04 backport the 16.10+ kernels to 16.04.x.

 * End users who successfully built the iscistarget driver on 16.04.0/1 kernels (4.4.0-*) will see failures with the HWE kernels.

 * iscsitarget and iscsitarget-dkms packages are not technically needed on 16.04 at all. There is an iSCSI target driver (iscsi_target_mod) in the Ubuntu kernel and the iscistarget tooling can be replaced with tgt.

[Test Case]

 * Install iscsitarget-dkms while having the 16.04.2 headers installed. The module build will fail (and apport if on a desktop will attempt to submit a bug report).

 * In the fixed case, iscsitarget-dkms will see the specified kernel is not supported by the regex and will skip attempting to build.

[Regression Potential]

 * Currently, the iscsitarget-dkms throws an error. The error is actually in the use of iscsitarget-dkms at all with newer kernels, and hopefully if end-users depend on it and see the 'skipped' message, they will come to this bug via the changelog. I do not believe there is any regression potential, as I have tested that 4.4.0-* kernels still build the dkms module fine and that all other 16.04 kernel families skip it.

---

I am unable to build the iscsitarget DKMS module on a fresh install of Ubuntu 16.04.2 LTS. Console output is replicated here; the associated make.log file is attached.

Setting up iscsitarget-dkms (1.4.20.3+svn502-2ubuntu4) ...

Creating symlink /var/lib/dkms/iscsitarget/1.4.20.3+svn502/source ->
                 /usr/src/iscsitarget-1.4.20.3+svn502

DKMS: add completed.

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=4.8.0-39-generic -C /lib/modules/4.8.0-39-generic/build M=/var/lib/dkms/iscsitarget/1.4.20.3+svn502/build....(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.8.0-39-generic (i686)
Consult /var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/make.log for more information.
Removing old iscsitarget-1.4.20.3+svn502 DKMS files...

------------------------------
Deleting module version: 1.4.20.3+svn502
completely from the DKMS tree.
------------------------------
Done.
Loading new iscsitarget-1.4.20.3+svn502 DKMS files...
First Installation: checking all kernels...
Building only for 4.8.0-39-generic
Building initial module for 4.8.0-39-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/iscsitarget-dkms.0.crash'
Error! Bad return status for module build on kernel: 4.8.0-39-generic (i686)
Consult /var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/make.log for more information.

Revision history for this message
Shawn Morford (darkmorford) wrote :
summary: iscsitarget-dkms 1.4.20.3+svn502-2ubuntu4: iscsitarget kernel module
- failed to build
+ failed to build [error: field ‘rx_hash’ has incomplete type]
Revision history for this message
Nish Aravamudan (nacc) wrote : Re: iscsitarget-dkms 1.4.20.3+svn502-2ubuntu4: iscsitarget kernel module failed to build [error: field ‘rx_hash’ has incomplete type]

Note you don't need iscsitarget-dkms with the 4.8 kernel, it's been merged upstream.

The right fix here is for the dkms hook to not run on 4.8 or later kernels (the package has been removed altogether from yakkety).

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
Nish Aravamudan (nacc)
Changed in iscsitarget (Ubuntu):
assignee: nobody → Nish Aravamudan (nacc)
Nish Aravamudan (nacc)
Changed in iscsitarget (Ubuntu):
status: Confirmed → Invalid
Changed in iscsitarget (Ubuntu Yakkety):
status: New → Invalid
Changed in iscsitarget (Ubuntu Xenial):
status: New → In Progress
assignee: nobody → Nish Aravamudan (nacc)
Changed in iscsitarget (Ubuntu):
assignee: Nish Aravamudan (nacc) → nobody
Revision history for this message
Nish Aravamudan (nacc) wrote :

Quoting smb in LP: #1613758:

"iscsitarget was the userspace part to manager iscsi targets which used the iscsitarget-dkms kernel module. But it looks to be no longer actively maintained which caused more and more problems with recent kernels.

As Nish pointed out, there is now an implementation of the kernel side driver that comes with the kernel package (so no longer needing any DKMS package) and "tgt" is the package that contains the administrative tools to manage those. This would already work with the 16.04 kernel and installation. Unfortunately the config differs and probably needs to be manually migrated."

So in the short term, Shawn, you can just remove iscsitarget-dkms (and iscsitarget, tbh) and use the in-kernel driver and the tgt daemon to host iSCSI disks.

In the long term (next few days ideally), I'll submit a change (presuming smb is able to review/ack it) that will simply disable the DKMS build on non-4.4.0 kernels (where it doesn't make sense to use it anymore since the HWE stack from later kernels (e.g., 16.10's 4.8) no longer tests that the same package works, since it has been removed. Honestly, it doesn't really make sense on 16.04 either and I would suggest migrating off the package sooner rather than later.

Nish Aravamudan (nacc)
description: updated
Nish Aravamudan (nacc)
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Shawn, or anyone else affected,

Accepted iscsitarget into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/iscsitarget/1.4.20.3+svn502-2ubuntu4.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in iscsitarget (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Nish Aravamudan (nacc) wrote : Re: iscsitarget-dkms 1.4.20.3+svn502-2ubuntu4: iscsitarget kernel module failed to build [error: field ‘rx_hash’ has incomplete type]

Currently, the Server Guide only documents how to setup iSCSI initiators. I have added an item to the Server Team blueprint to fully document setting iSCSI targets using tgt for the 17.10 cycle. https://help.ubuntu.com/lts/serverguide/iscsi-initiator.html

Meanwhile, there are a few resources that I have used online (not endorsing them officially), while any user who is affected by this waits for official documentation:

http://www.thegeekstuff.com/2016/03/iscsi-target-setup/comment-page-1/

https://www.cyberciti.biz/tips/howto-setup-linux-iscsi-target-sanwith-tgt.html

http://stgt.sourceforge.net/ (official upstream)

The tgtadm and tgt-admin commands (the latter is far friendlier) have manpages as well, which can be useful.

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

Verified that with -proposed enabled, dkms building for the 4.8 kernel results in:

Error! The dkms.conf for this module includes a BUILD_EXCLUSIVE directive which
does not match this kernel/arch. This indicates it should not be built.

And if invoked via a dpkg hook (e.g., new kernel headers, I think), 'Skipped' is printed and success is still indicated.

Building the dkms module for the 4.4 kernel still succeeds (tested manually with `dkms build iscsitarget/1.4.20.3+svn502 -k 4.4.0-66-generic` which was the kernel installed in my test VM).

tags: added: verification-done
removed: verification-needed
Robie Basak (racb)
summary: - iscsitarget-dkms 1.4.20.3+svn502-2ubuntu4: iscsitarget kernel module
- failed to build [error: field ‘rx_hash’ has incomplete type]
+ [Xenial] iscsitarget-dkms 1.4.20.3+svn502-2ubuntu4: iscsitarget kernel
+ module failed to build [error: field ‘rx_hash’ has incomplete type]
tags: added: triage
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package iscsitarget - 1.4.20.3+svn502-2ubuntu4.1

---------------
iscsitarget (1.4.20.3+svn502-2ubuntu4.1) xenial; urgency=medium

  * d/dkms.conf.in: iscsitarget has been removed from 16.10 and does not
    build against kernels from that release and on. Users are
    recommended to use the in-kernel iscsi_target_mod driver and tgt.
    Disable the dkms build on HWE kernels for 16.04 (LP: #1668808).

 -- Nishanth Aravamudan <email address hidden> Mon, 20 Mar 2017 17:22:23 -0700

Changed in iscsitarget (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote : Update Released

The verification of the Stable Release Update for iscsitarget has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

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