Re: [lustre-discuss] dkms-2.8.6 breaks installation of lustre-zfs-dkms-2.12.7-1.el7.noarch

2021-10-21 Thread Riccardo Veraldi

thanks a lot, and thanks for the corrections.

Anyway I never use more than one dkms module built for different kernel 
versions and usually I build the lustre dkms module always on the 
current version of the running kernel, but yes your fixes will address 
correctly the issues you mentioned and it is a more general approach.



On 10/21/21 11:38 AM, Franke, Knut wrote:

Hi,

Am Mittwoch, dem 13.10.2021 um 16:06 -0700 schrieb Riccardo Veraldi:

This is my patch to make things works and build the lustre-dkms rpm

Thank you! I just ran into the exact same problem. Two comments on the
patch:


-   ZFS_VERSION=$(dkms status -m zfs -k $3 -a $5 | awk -F', ' '{print $2; 
exit 0}' | grep -v ': added$')
+   ZFS_VERSION=$(dkms status -m zfs | awk ' { print $1 } ' | sed -e 
's/zfs\///' -e 's/,//')

This produces an incorrect result if the dkms module is already built
for multiple kernel versions. I would suggest picking the largest zfs
version for simplicity's sake:

+   ZFS_VERSION=$(dkms status -m zfs | awk ' { print $1 } ' | sed
-e 's/zfs\///' -e 's/,//' | sort -V | tail -n1)

Secondly,


+   SERVER="--enable-server $LDISKFS \
+-  --with-linux=$4 --with-linux-obj=$4 \
+-  --with-spl=$6/spl-${ZFS_VERSION} \
+-  --with-spl-obj=$7/spl/${ZFS_VERSION}/$3/$5 \
+-  --with-zfs=$6/zfs-${ZFS_VERSION} \
+-  --with-zfs-obj=$7/zfs/${ZFS_VERSION}/$3/$5"
++  --with-zfs=/usr/src/zfs-${ZFS_VERSION} \
++  --with-zfs-obj=/var/lib/dkms/zfs/${ZFS_VERSION}/$3/$5"

This fails if we're building for a newly installed kernel we haven't
rebooted to yet (or rather, any kernel version other than the one
that's currently booted). Also, we might want to keep open the
possibility of building for non-x86 that was present in the original
(though I don't now whether Luster even supports non-x86). So:

+   --with-zfs-obj=/var/lib/dkms/zfs/${ZFS_VERSION}/$3/$5"

To be honest, I don't understand why this second block of changes is
necessary at all; but I currently don't have the time to do any more
experiments..

Cheers,
Knut


___
lustre-discuss mailing list
lustre-discuss@lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org


Re: [lustre-discuss] dkms-2.8.6 breaks installation of lustre-zfs-dkms-2.12.7-1.el7.noarch

2021-10-21 Thread Franke, Knut via lustre-discuss
Hi,

Am Mittwoch, dem 13.10.2021 um 16:06 -0700 schrieb Riccardo Veraldi:
> 
> This is my patch to make things works and build the lustre-dkms rpm

Thank you! I just ran into the exact same problem. Two comments on the
patch:

> - ZFS_VERSION=$(dkms status -m zfs -k $3 -a $5 | awk -F', ' '{print $2; 
> exit 0}' | grep -v ': added$')
> + ZFS_VERSION=$(dkms status -m zfs | awk ' { print $1 } ' | sed -e 
> 's/zfs\///' -e 's/,//')

This produces an incorrect result if the dkms module is already built
for multiple kernel versions. I would suggest picking the largest zfs
version for simplicity's sake:

+   ZFS_VERSION=$(dkms status -m zfs | awk ' { print $1 } ' | sed
-e 's/zfs\///' -e 's/,//' | sort -V | tail -n1)

Secondly,

> + SERVER="--enable-server $LDISKFS \
> +---with-linux=$4 --with-linux-obj=$4 \
> +---with-spl=$6/spl-${ZFS_VERSION} \
> +---with-spl-obj=$7/spl/${ZFS_VERSION}/$3/$5 \
> +---with-zfs=$6/zfs-${ZFS_VERSION} \
> +---with-zfs-obj=$7/zfs/${ZFS_VERSION}/$3/$5"
> ++--with-zfs=/usr/src/zfs-${ZFS_VERSION} \
> ++--with-zfs-obj=/var/lib/dkms/zfs/${ZFS_VERSION}/$3/$5"

This fails if we're building for a newly installed kernel we haven't
rebooted to yet (or rather, any kernel version other than the one
that's currently booted). Also, we might want to keep open the
possibility of building for non-x86 that was present in the original
(though I don't now whether Luster even supports non-x86). So:

+   --with-zfs-obj=/var/lib/dkms/zfs/${ZFS_VERSION}/$3/$5"

To be honest, I don't understand why this second block of changes is
necessary at all; but I currently don't have the time to do any more
experiments..

Cheers,
Knut

___
lustre-discuss mailing list
lustre-discuss@lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org


Re: [lustre-discuss] dkms-2.8.6 breaks installation of lustre-zfs-dkms-2.12.7-1.el7.noarch

2021-10-16 Thread Andreas Dilger via lustre-discuss
Riccardo,
It would be great if you could submit your patch to Gerrit. 

Cheers, Andreas

> On Oct 13, 2021, at 17:06, Riccardo Veraldi  
> wrote:
> 
> yes, same problem for me, I Addressed this a few weeks go and I think I 
> Reported to the mailing list.
> 
> This is my patch to make things works and build the lustre-dkms rpm
> 
> 
> diff -ru lustre-2.12.7/lustre-dkms_pre-build.sh 
> lustre-2.12.7-dkms-pcds/lustre-dkms_pre-build.sh
> --- lustre-2.12.7/lustre-dkms_pre-build.sh2021-07-14 22:06:05.0 
> -0700
> +++ lustre-2.12.7-dkms-pcds/lustre-dkms_pre-build.sh2021-09-26 
> 08:30:54.09600 -0700
> @@ -20,18 +20,16 @@
>  fi
> 
>  # ZFS and SPL are version locked
> -ZFS_VERSION=$(dkms status -m zfs -k $3 -a $5 | awk -F', ' '{print $2; 
> exit 0}' | grep -v ': added$')
> +ZFS_VERSION=$(dkms status -m zfs | awk ' { print $1 } ' | sed -e 
> 's/zfs\///' -e 's/,//')
> +
>  if [ -z $ZFS_VERSION ] ; then
>  echo "zfs-dkms package must already be installed and built under 
> DKMS control"
>  exit 1
>  fi
> 
>  SERVER="--enable-server $LDISKFS \
> ---with-linux=$4 --with-linux-obj=$4 \
> ---with-spl=$6/spl-${ZFS_VERSION} \
> ---with-spl-obj=$7/spl/${ZFS_VERSION}/$3/$5 \
> ---with-zfs=$6/zfs-${ZFS_VERSION} \
> ---with-zfs-obj=$7/zfs/${ZFS_VERSION}/$3/$5"
> +--with-zfs=/usr/src/zfs-${ZFS_VERSION} \
> +--with-zfs-obj=/var/lib/dkms/zfs/${ZFS_VERSION}/$(uname -r)/x86_64"
> 
>  KERNEL_STUFF="--with-linux=$4 --with-linux-obj=$4"
>  ;;
> 
> 
> 
> 
>> On 10/13/21 2:30 PM, Fredrik Nyström via lustre-discuss wrote:
>> dkms was recently updated to version 2.8.6 in epel/7.
>> 
>> After this update installation of lustre-zfs-dkms-2.12.7-1.el7.noarch
>> fails with following error:
>> 
>> ./configure: line 33341: test: zfs: integer expression expected
>> configure: error:
>> 
>> 
>> Breakage seems to be caused by following dkms commit:
>> https://github.com/dell/dkms/commit/f83b758b6fb8ca67b1ab65df9e3d2a1e994eb483
>> 
>> 
>> configure line 33341:
>> if test x$enable_modules = xyes && test $ZFS_MAJOR -eq 0 && test $ZFS_MINOR 
>> -lt 8; then :
>> 
>> Not sure exactly how but it ends up with ZFS_MAJOR=zfs, ZFS_MINOR=zfs
>> instead of: ZFS_MAJOR=0, ZFS_MINOR=7
>> 
>> 
>> Downgrading to older dkms or manually reverting the commit mentioned
>> above solved this problem for me.
>> 
>> 
>> Regards / Fredrik N.
>> ___
>> lustre-discuss mailing list
>> lustre-discuss@lists.lustre.org
>> http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org
>> 
> ___
> lustre-discuss mailing list
> lustre-discuss@lists.lustre.org
> http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org
___
lustre-discuss mailing list
lustre-discuss@lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org


Re: [lustre-discuss] dkms-2.8.6 breaks installation of lustre-zfs-dkms-2.12.7-1.el7.noarch

2021-10-13 Thread Riccardo Veraldi
yes, same problem for me, I Addressed this a few weeks go and I think I 
Reported to the mailing list.


This is my patch to make things works and build the lustre-dkms rpm


diff -ru lustre-2.12.7/lustre-dkms_pre-build.sh 
lustre-2.12.7-dkms-pcds/lustre-dkms_pre-build.sh
--- lustre-2.12.7/lustre-dkms_pre-build.sh    2021-07-14 
22:06:05.0 -0700
+++ lustre-2.12.7-dkms-pcds/lustre-dkms_pre-build.sh    2021-09-26 
08:30:54.09600 -0700

@@ -20,18 +20,16 @@
 fi

 # ZFS and SPL are version locked
-    ZFS_VERSION=$(dkms status -m zfs -k $3 -a $5 | awk -F', ' '{print 
$2; exit 0}' | grep -v ': added$')
+    ZFS_VERSION=$(dkms status -m zfs | awk ' { print $1 } ' | sed -e 
's/zfs\///' -e 's/,//')

+
 if [ -z $ZFS_VERSION ] ; then
     echo "zfs-dkms package must already be installed and built 
under DKMS control"

     exit 1
 fi

 SERVER="--enable-server $LDISKFS \
-        --with-linux=$4 --with-linux-obj=$4 \
-        --with-spl=$6/spl-${ZFS_VERSION} \
-        --with-spl-obj=$7/spl/${ZFS_VERSION}/$3/$5 \
-        --with-zfs=$6/zfs-${ZFS_VERSION} \
-        --with-zfs-obj=$7/zfs/${ZFS_VERSION}/$3/$5"
+        --with-zfs=/usr/src/zfs-${ZFS_VERSION} \
+        --with-zfs-obj=/var/lib/dkms/zfs/${ZFS_VERSION}/$(uname -r)/x86_64"

 KERNEL_STUFF="--with-linux=$4 --with-linux-obj=$4"
 ;;




On 10/13/21 2:30 PM, Fredrik Nyström via lustre-discuss wrote:

dkms was recently updated to version 2.8.6 in epel/7.

After this update installation of lustre-zfs-dkms-2.12.7-1.el7.noarch
fails with following error:

./configure: line 33341: test: zfs: integer expression expected
configure: error:


Breakage seems to be caused by following dkms commit:
https://github.com/dell/dkms/commit/f83b758b6fb8ca67b1ab65df9e3d2a1e994eb483


configure line 33341:
if test x$enable_modules = xyes && test $ZFS_MAJOR -eq 0 && test $ZFS_MINOR -lt 
8; then :

Not sure exactly how but it ends up with ZFS_MAJOR=zfs, ZFS_MINOR=zfs
instead of: ZFS_MAJOR=0, ZFS_MINOR=7


Downgrading to older dkms or manually reverting the commit mentioned
above solved this problem for me.


Regards / Fredrik N.
___
lustre-discuss mailing list
lustre-discuss@lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org


___
lustre-discuss mailing list
lustre-discuss@lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org


[lustre-discuss] dkms-2.8.6 breaks installation of lustre-zfs-dkms-2.12.7-1.el7.noarch

2021-10-13 Thread Fredrik Nyström via lustre-discuss
dkms was recently updated to version 2.8.6 in epel/7.

After this update installation of lustre-zfs-dkms-2.12.7-1.el7.noarch 
fails with following error:

./configure: line 33341: test: zfs: integer expression expected
configure: error: 


Breakage seems to be caused by following dkms commit:
https://github.com/dell/dkms/commit/f83b758b6fb8ca67b1ab65df9e3d2a1e994eb483


configure line 33341:
if test x$enable_modules = xyes && test $ZFS_MAJOR -eq 0 && test $ZFS_MINOR -lt 
8; then :

Not sure exactly how but it ends up with ZFS_MAJOR=zfs, ZFS_MINOR=zfs 
instead of: ZFS_MAJOR=0, ZFS_MINOR=7


Downgrading to older dkms or manually reverting the commit mentioned 
above solved this problem for me.


Regards / Fredrik N.
___
lustre-discuss mailing list
lustre-discuss@lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org