The build system in open-iscsi 2.0.871 was changed slightly, kernel & user were broken out, and the ebuild needs to be updated slightly to compile the new version. --- /usr/portage/sys-block/open-iscsi/open-iscsi-2.0.870.3.ebuild 2009-06-21 17:08:06.000000000 -0400 +++ open-iscsi-2.0.871.ebuild 2009-07-21 11:37:12.577917416 -0400 @@ -49,8 +49,8 @@ || die "emake failed" einfo "Building userspace" - cd "${S}"/usr && \ - CFLAGS="" emake OPTFLAGS="${CFLAGS}" \ + cd "${S}" && \ + CFLAGS="" emake OPTFLAGS="${CFLAGS}" user \ || die "emake failed" if use utils; then Reproducible: Always
Just installed sys-block/open-iscsi-2.0.871 here and noticed the initscript still needs some work: >>> ebegin "Loading iSCSI modules" do_modules 'Loading' 'libiscsi scsi_transport_iscsi iscsi_tcp' ret=$? if [ $ret -ne 0 ]; then eend 1 return 1 fi <<< This assumes the package was built with USE="modules", but if you have builtin iSCSI Kernel-Support, this won't work. Is there a better way to do module loading in an initscript? Something like "load modules if CONFIG_FOO is not in kernel config"? Just uncommented this for now to get it working here but a more elegant solution should be found.
Furthermore the file ${S}/etc/iface.example isn't installed. According to the official documentation (README) it should be put into /etc/iscsi/ifaces/iface.example.
There's a problem about the module thing: If open-iscsi is built with USE="-modules", it still needs some options in the kernel to be built as module [1], otherwise iscsid won't start due to missing version information in /sys/module/scsi_transport_iscsi/version So as long as the open-iscsi devs haven't fixed this, we should check for this options in the kernel to be set to =M when USE="-modules". CONFIG_SCSI_ISCSI_ATTRS=y CONFIG_ISCSI_TCP=y [1] http://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966?#fd6a4ba0c8e91966
Created attachment 199508 [details, diff] Patch open-iscsi-2.0.870.3 → open-iscsi-2.0.871 This patch: - adds a check to make sure, the needed iSCSI Kernel config options are built as module - adds the installation of /etc/iscsi/iface/iface.example - includes the changes to the 'emake' process from the 1st post
Running open-iscsi-2.0.871 now since more than 2 weeks on a production server and it worked great so far. Could anyone put this into the tree as ~amd64? Thanks a lot!
It did not warn me about missing modules: USE="modules" ebuild open-iscsi-2.0.871.ebuild merge [...] * Updating module dependencies for 2.6.30-gentoo-r6 ... WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_segment_done WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_segment_seek_sg WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_segment_unmap WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_hdr_recv_prep WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_cleanup_task WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_conn_setup WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_r2tpool_alloc WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_r2tpool_free WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_task_xmit WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_recv_skb WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_segment_init_linear WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_conn_get_stats WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_task_init WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_dgst_header WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_conn_teardown [ ok ] * Adding module to moduledb. >>> sys-block/open-iscsi-2.0.871 merged. # /etc/init.d/iscsid start * Caching service dependencies ... [ ok ] * Checking open-iSCSI configuration ... * /etc/iscsi/initiatorname.iscsi should contain a string with your initiatior name. * Creating InitiatorName iqn.2009-09.dd.flatline:openiscsi-851fc12840a957433447db41a3df1d42 in /etc/iscsi/initiatorname.iscsi ... [ ok ] * Loading iSCSI modules ... * Loading libiscsi ... [ ok ] * Loading scsi_transport_iscsi ... [ ok ] * Loading iscsi_tcp ... FATAL: Error inserting iscsi_tcp (/lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko): Unknown symbol in module, or unknown parameter (see dmesg) [ !! ]
Elias, your change: 'CONFIG_CHECK_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP"' prevent us from building modules from the open-iscsi package (and we still need to check for CRYPTO_CRC32C). IMHO building modules from open-iscsi is a really bad idea, every time you update your kernel, you will have to rebuild open-iscsi - which often fails as older versions usually do not build against newer kernels. The best way is to use modules from the kernel and only build userspace tools, as the interface won't change too often (if at all).
Sorry, I didn't see it yesterday: you're using CONFIG_CHECK_MODULES and CONFIG_CHECK correctly, of course (I accidentally read CONFIG_CHECK twice).
Created attachment 206196 [details, diff] open-iscsi-2.0.871.ebuild.patch - Included Elias patches - excluded some more compiler stuff which is unnecessary now - removing support for module building as IMHO keeping it would cause many headaches on our users and there - only compiling userspace/utils is possible now, this will allow painless updates of the kernel (that has the needed modules) without bumping the open-iscsi ebuild
Elias: we might want to look into the problem of comment #1 when 2.0.872 is out, I guess we will also have to look at http://git.kernel.org/?p=linux/kernel/git/mnc/open-iscsi.git;a=commit;h=dd61cb863559297b89b5b41f7320760372883b1c
Created attachment 208369 [details] open-iscsi-2.0.871.ebuild with CVE-2009-1297 patch
Created attachment 208370 [details] CVE-2009-1297.patch
(In reply to comment #11) > Created an attachment (id=208369) [details] > open-iscsi-2.0.871.ebuild with CVE-2009-1297 patch > In CVS.