Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drbd 9.2.7 fails to build against Linux 6.6.13 without spatch #84

Closed
smira opened this issue Jan 25, 2024 · 5 comments
Closed

drbd 9.2.7 fails to build against Linux 6.6.13 without spatch #84

smira opened this issue Jan 25, 2024 · 5 comments

Comments

@smira
Copy link

smira commented Jan 25, 2024

Linux 6.6.x is the LTS kernel, but looks drbd release doesn't have proper cached patches:

#0 5.208   UPD     /tmp/build/0/drbd/compat.6.6.13.h
#0 5.212   UPD     /tmp/build/0/drbd/compat.h
#0 5.228 ./drbd-kernel-compat/gen_compat_patch.sh: line 12: spatch: command not found
#0 5.231 ./drbd-kernel-compat/gen_compat_patch.sh: line 45: hash: spatch: not found
#0 5.231   INFO: no suitable spatch found; trying spatch-as-a-service;
#0 5.231   be patient, may take up to 10 minutes
#0 5.231   if it is in the server side cache it might only take a second
#0 5.231   SPAAS    ba39203d986fdfae4d982fd596542009
#0 5.554 Successfully connected to SPAAS ('7bef2e7976a455550bce2533487c635f20390ccf')
#0 5.563   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#0 5.563                                  Dload  Upload   Total   Spent    Left  Speed
 98  8077    0     0    0  7958      0  10479 --:--:-- --:--:-- --:--:-- 10471
#0 6.322 curl: (22) The requested URL returned error: 400
#0 6.326 === pipestatus: 0 22
#0 6.327 HTTP/1.1 100 Continue
#0 6.327 
#0 6.327 HTTP/1.1 400 Bad Request
#0 6.327 Server: nginx/1.25.3
#0 6.327 Date: Thu, 25 Jan 2024 12:15:12 GMT
#0 6.327 Content-Type: application/text
#0 6.327 Content-Length: 119
#0 6.327 Connection: keep-alive
#0 6.327 
#0 6.327 cat: drbd-kernel-compat/cocci_cache/ba39203d986fdfae4d982fd596542009/compat.patch.tmp: No such file or directory

Unfortunately, we don't have an option to get spatch into our build environment, so it'd the best if the required patch is cached.

Is there any documented way to produce the patch and patch drbd source with it? Any other workarounds?

Also the patch-as-a-service seems to be down?

@WanzenBug
Copy link
Contributor

Sorry for the long response on this. spatch-as-a-service is running fine. It may be that some combination of detected compat features causes spatch itself to fail. This then will result in an error being returned by the call. This is likely what you see above.

compat-wise, we should be good for 6.7, but I will do some digging.

@smira
Copy link
Author

smira commented Mar 14, 2024

@WanzenBug thanks for looking into this, we're building with Linux 6.6.x, it works fine with Linux 6.1.x, but started failing with update to Linux 6.6.x. We went through DRBD 9.2.6, 9.2.7 and 9.2.8 with this problem.

Talos Linux follows Linux LTS releases, so we're on 6.6.x, not 6.7

@WanzenBug
Copy link
Contributor

Ok, I believe I have tracked down the issue:

  GENPATCHNAMES   6.6.21-talos
cat: drbd-kernel-compat/patches/tls_get_record_type__yes_present__no_present.patch: No such file or directory

So our patch system cannot the find the patch to apply when TLS is disabled on the kernel level, but it can find the tls_get_record_type function. Which is something we simply did not anticipate: we assumed that if TLS is disabled, that function would not be present.

A fix for that is already merged, but will have to wait for the next release.

I did add a workaround in the SPAAS service, so requesting patches for 9.2.7 or 9.2.8 return the correct patches. So I believe you can try adding DRBD 9.2.8 again.

On a related note: the only patches that need to be applied with the talos kernel are:

tls_tx_rx__no_present
tls_get_record_type__yes_present__no_present

So I wonder if it would be possible to enable kTLS?

@smira
Copy link
Author

smira commented Mar 14, 2024

Thanks for tracking this down!

So I wonder if it would be possible to enable kTLS?

We can look into that, my impression with kTLS was that it's more of a security issue itself as it's harder to patch in case of security problems.

smira added a commit to smira/pkgs that referenced this issue Mar 14, 2024
@smira
Copy link
Author

smira commented Mar 14, 2024

Thanks again, the build passed!

@smira smira closed this as completed Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants