Skip to content

test(test): simplify lsblk size lookup#2405

Merged
danilrwx merged 1 commit into
mainfrom
fix/test/disk-resizing
May 27, 2026
Merged

test(test): simplify lsblk size lookup#2405
danilrwx merged 1 commit into
mainfrom
fix/test/disk-resizing

Conversation

@danilrwx
Copy link
Copy Markdown
Contributor

@danilrwx danilrwx commented May 26, 2026

Description

Simplify disk size lookup in the VirtualDiskResizing e2e test.

The test now uses a single lsblk --nodeps --json -o SERIAL,SIZE call and selects the required block device by serial from JSON output, instead of first resolving the device path and then running a second lsblk command for size.

Why do we need it, and what problem does it solve?

VirtualDiskResizing could fail while probing disk sizes because the previous implementation executed multiple SSH commands with lsblk/grep/awk. Under hotplug/resize activity this made the check more fragile and increased the chance of timeout-related signal: killed errors.

Using one simple JSON-based lsblk call reduces the amount of SSH work and avoids shell parsing for device path lookup.

What is the expected result?

  1. Run VirtualDiskResizing e2e test.
  2. Verify disk size checks find the expected devices by serial.
  3. Verify test/e2e lint reports no issues.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: test
type: fix
summary: Simplify VirtualDiskResizing disk size checks to reduce SSH command flakiness.
impact_level: low

@danilrwx danilrwx force-pushed the fix/test/disk-resizing branch from 6be7cbc to 4e245d5 Compare May 27, 2026 18:43
@danilrwx danilrwx changed the title test(test): avoid lsblk for disk size checks test(test): simplify lsblk size lookup May 27, 2026
@danilrwx danilrwx force-pushed the fix/test/disk-resizing branch from 4e245d5 to 9adfa6b Compare May 27, 2026 18:44
@danilrwx danilrwx marked this pull request as ready for review May 27, 2026 18:44
@danilrwx danilrwx requested a review from Isteb4k as a code owner May 27, 2026 18:44
@danilrwx danilrwx added this to the v1.9.0 milestone May 27, 2026
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
@hardcoretime hardcoretime force-pushed the fix/test/disk-resizing branch from 9adfa6b to 8508a40 Compare May 27, 2026 18:53
@danilrwx danilrwx merged commit 3da69ec into main May 27, 2026
29 of 30 checks passed
@danilrwx danilrwx deleted the fix/test/disk-resizing branch May 27, 2026 19:08
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

Successfully merging this pull request may close these issues.

2 participants