Skip to content

[fix][ci] Ensure discard_max_bytes is set to 0 only for existing block devices - #25510

Merged
merlimat merged 1 commit into
apache:masterfrom
nodece:fix-discard_max_bytes
Apr 13, 2026
Merged

[fix][ci] Ensure discard_max_bytes is set to 0 only for existing block devices#25510
merlimat merged 1 commit into
apache:masterfrom
nodece:fix-discard_max_bytes

Conversation

@nodece

@nodece nodece commented Apr 13, 2026

Copy link
Copy Markdown
Member

Motivation

In CI environments, the following error was observed when attempting to disable discard:

tee: '/sys/block/sd*/queue/discard_max_bytes': No such file or directory
Error: Process completed with exit code 1.

This happens because the script assumes block devices follow the sd* naming convention, which is not always true (e.g., NVMe or virtual disks). As a result, the glob does not match any files and causes the step to fail.

Modifications

  • Replace /sys/block/sd*/queue/discard_max_bytes with /sys/block/*/queue/discard_max_bytes to support all block device types
  • Add a file existence check (-f) before applying tee to avoid errors when the file is not present

@nodece
nodece force-pushed the fix-discard_max_bytes branch from 7654fc9 to 4ad074f Compare April 13, 2026 02:16
@nodece nodece changed the title [fix][ci] Ensure discard_max_bytes is only modified if the file exists [fix][ci] Ensure discard_max_bytes is set to 0 only for existing block devices Apr 13, 2026
@merlimat
merlimat merged commit 089f87f into apache:master Apr 13, 2026
43 checks passed
@lhotari lhotari added this to the 4.3.0 milestone Apr 15, 2026
lhotari pushed a commit that referenced this pull request Apr 15, 2026
lhotari pushed a commit that referenced this pull request Apr 15, 2026
lhotari pushed a commit that referenced this pull request Apr 15, 2026
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 23, 2026
…k devices (apache#25510)

(cherry picked from commit 089f87f)
(cherry picked from commit 4934337)
nodece added a commit to ascentstream/pulsar that referenced this pull request May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants