View Issue Details

IDProjectCategoryView StatusLast Update
0001224channel: elrepo/el8kmod-drbd90public2022-11-23 13:49
Reporteripaq Assigned Totoracat  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Summary0001224: Upgrade kmod-drbd to 9.1.7
DescriptionThe el8 repo for kmod-drbd90 is still at version 9.1.5. Can elrepo upgrade it to the latest 9.1.7?

If possible, please also upgrade drbd90-util to version 9.21.0.

Thanks.
TagsNo tags attached.

Activities

toracat

2022-05-22 04:14

administrator   ~0008357

Acknowledged.

toracat

2022-05-22 04:47

administrator   ~0008358

The following packages have been built and will be syncing to our mirrors shortly:

kmod-drbd90-9.1.7-1.el8_6.elrepo.x86_64.rpm
drbd90-utils-9.21.1-1.el8.elrepo.x86_64.rpm
drbd90-utils-sysvinit-9.21.1-1.el8.elrepo.x86_64

Please note that the kmod package is built for EL 8.6 and is not backward compatible.

ipaq

2022-05-24 01:27

reporter   ~0008362

Thanks toracat. Can you also upload drbd90-utils-9.21.1-1.el8 SRPM?

toracat

2022-05-24 05:51

administrator   ~0008363

I have no idea why that srpm was missed. It will show up on our mirrors soon.

ipaq

2022-05-24 23:41

reporter   ~0008368

Many thanks again for your speedy action.
The build requires spatch from the package coccinelle.
May I suggest to add the following to the SPEC file to satisfy the build dependency?

BuildRequires: coccinelle >= 1.0.7

pperry

2022-05-25 06:47

administrator   ~0008369

I note the following taken from https://github.com/LINBIT/drbd

**From a release tarball**

For use cases where it is appropriate to just build DRBD from a release tarball, here are some options:

1. Use a distribution kernel and rely on the shipped "compat patch cache". We pre-generate compatibility patches for a list of commonly used distribution kernels and ship them with every release tarball. If your kernel matches one of those in the cache, you won't need spatch because the cached patch will be applied directly.
2. For all other kernels, you can use LINBIT's "spatch as a service" online service, which transparently and automatically generates compatibility patches based on your kernels feature set.
3. If you are using an exotic kernel and you do not have internet access or otherwise can't or don't want to use "spatch as a service", you will have to install a recent version of coccinelle (see above).

For a release tarball, these options should be handled transparently for the user. In other words, if you download a tarball and type "make", it should work in next to all cases.


When building on rhel9, I noticed early in the build process, it was looking for spatch. Although spatch was not present, the build proceeded fine, so it's not strictly a build requirement (seems optional rather than required)

Further, the README notes version 1.0.8 is required. Version 1.0.7 of coccinelle, which provides spatch, is available in EPEL for rhel7 and rhel8, but there are no packages available for rhel9.

As such, I don't consider coccinelle as a BR when building from release tarballs for RHEL kernels as we are doing. If you are rebuilding our SRPMs against non-RHEL kernels, then I can see that you may need to add coccinelle as a BR.

pperry

2022-05-25 08:59

administrator   ~0008370

We could make a BR for coccinelle conditional if that would help, which you could define on the command line when building (--with coccinelle), but it would be helpful to understand the requirement here?

%if %{?_with_coccinelle:1}%{!?_with_coccinelle:0}
    BuildRequires: coccinelle >= 1.0.7
%endif

ipaq

2022-05-25 23:33

reporter   ~0008372

We have a strict policy to rebuild from source at an automated build server which has no Internet connection. The no Internet requirement during the build process is to ensure a 100% reproducible build, and to prevent any malicious code to slip in from the outside. Think of it like koji / obs.

And thanks for your offer to make the BuildRequires conditional, but It's not an option for us to change any build parameters either. The server apparently just did a rpmbuild kmod-drbd90-9.1.7-1.el8.src.rpm without letting us to set any environment variables or command line options, and failed with the following error on the RHEL8.6 distribution target:

./drbd-kernel-compat/gen_compat_patch.sh: line 12: spatch: command not found
./drbd-kernel-compat/gen_compat_patch.sh: line 45: hash: spatch: not found
  INFO: no suitable spatch found; trying spatch-as-a-service;
  be patient, may take up to 10 minutes
  if it is in the server side cache it might only take a second
  SPAAS 16bc5867edc5cdc855d9eb29b0d26214
curl: (6) Could not resolve host: drbd.io
  ERROR: SPAAS is not reachable! Please check if your network
  configuration or some firewall prohibits access to
  https://drbd.io:2020.
make[4]: *** [Makefile:178: drbd-kernel-compat/cocci_cache/16bc5867edc5cdc855d9eb29b0d26214/compat.patch] Error 1

I took a deeper look and found that the source tar ball does not contain the mentioned "compat patch cache" for 4.18.0-372 kernel used by the 8.6 release.

$ cat ./drbd-9.1.7/drbd/drbd-kernel-compat/cocci_cache/*/kernelrelease.txt | grep 4.18.0 | sort
4.18.0-147.el8
4.18.0-193.el8
4.18.0-240.1.1.el8_3
4.18.0-305.el8
4.18.0-348.el8
4.18.0-80.1.2.el8_0

I believe that's why the build process is trying to look for spatch but couldn't - so instead it's trying to use the spatch-as-a-service which obviously would fail in our environment without Internet access. You can argue that it's an upstream problem, but I figure they offered us an option 3 in your quoted LINBIT notes to install coccinelle.

In fact, the same package from SuSE has BuildRequires: coccinelle [1]. I understand that it's problematic if EPEL9 won't supply coccinelle. They actually tried but some dependency issues prevented them from building it correctly at least for not a short while [2]. Beside the obvious security considerations, the goal here, I believe, is to make sure the build process is self-sufficient that it don't have any external dependencies, and that the SRPM would contain all the necessary source code it needs to build.

I know it's kind of ugly, but can we have a stopgap measures like this?

%if 0%{?rhel} < 9
BuildRequires: coccinelle
%endif

References:
[1] https://build.opensuse.org/package/view_file/network:ha-clustering:Stable/drbd/drbd.spec
[2] https://bugzilla.redhat.com/show_bug.cgi?id=2030779

ipaq

2022-05-26 03:57

reporter   ~0008373

I missed the point that spatch 1.0.8 is required. In this case, it seems pointless to BuildRequires an old version of coccinelle.
I contemplated building a newer Coccinelle but it seems to be a pain to build.
Anyway, let's wait until Linbit releases a new version that has an updated patch cache. Thanks.

pperry

2022-05-26 06:19

administrator   ~0008375

Last edited: 2022-05-26 06:21

Acknowledged, and thank you for explaining your rationale.

Yes, our build(s), at least on rhel9, appear to be using spatch-as-a-service, provided at build time over the internet, something that is not an option for you.

The other option would be for us to offer the conditional BR as I described, but enabled by default and can then be disabled from the rpmbuild command line for those that prefer using spatch-as-a-service - but I guess this is also a non-starter until EPEL are able to update coccinelle to v1.0.8

toracat

2022-06-19 18:08

administrator   ~0008432

RHBZ created: https://bugzilla.redhat.com/show_bug.cgi?id=2098482
"Please branch and build coccinelle in epel9"

toracat

2022-11-23 11:31

administrator   ~0008775

We currently have:

kmod-drbd90-9.1.12-1.el8_7.elrepo.x86_64.rpm
kmod-drbd90-9.2.1-1.el8_7.elrepo.x86_64.rpm (elrepo-testing)

drbd90-utils-9.21.1-1.el8.elrepo.x86_64.rpm

This bug entry turns out to be useful and informative. I'm going to close this. Feel free to open a new report if necessary.

Issue History

Date Modified Username Field Change
2022-05-22 00:48 ipaq New Issue
2022-05-22 00:48 ipaq Status new => assigned
2022-05-22 00:48 ipaq Assigned To => toracat
2022-05-22 04:14 toracat Note Added: 0008357
2022-05-22 04:47 toracat Note Added: 0008358
2022-05-22 13:53 toracat Status assigned => feedback
2022-05-24 01:27 ipaq Note Added: 0008362
2022-05-24 01:28 ipaq Status feedback => assigned
2022-05-24 05:51 toracat Note Added: 0008363
2022-05-24 23:41 ipaq Note Added: 0008368
2022-05-25 06:47 pperry Note Added: 0008369
2022-05-25 08:59 pperry Note Added: 0008370
2022-05-25 23:33 ipaq Note Added: 0008372
2022-05-26 03:57 ipaq Note Added: 0008373
2022-05-26 06:19 pperry Note Added: 0008375
2022-05-26 06:21 pperry Note Edited: 0008375
2022-06-19 18:08 toracat Note Added: 0008432
2022-11-23 11:31 toracat Note Added: 0008775
2022-11-23 13:49 toracat Status assigned => resolved
2022-11-23 13:49 toracat Resolution open => fixed