Skip to content

Issue in storage/storagesuite.py on SUSE Linux Enterprise 15 SP7 #3770

Open
@volodymyrkatkalov

Description

@volodymyrkatkalov

We hit a bug where test suite storage/storagesuite.py fails for SUSE Linux Enterprise 15 SP7.

Relevant logs:

2025-04-16 10:22:38.029[128131574765248][DEBUG] lisa.env[generated_0].node[0].cmd[9099] cmd: ['sudo', 'sh', '-c', 'echo y | mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sdc1 /dev/sdd1'], cwd: None, shell: True, sudo: True, nohup: False, posix: True, remote: True, encoding: utf-8
2025-04-16 10:22:38.644[128131490903744][DEBUG] lisa.env[generated_0].node[0].cmd[9099].stdout To optimalize recovery speed, it is recommended to enable write-indent bitmap, do you want to enable it now? [y/N]? mdadm: Note: this array has metadata at the start and
2025-04-16 10:22:38.644[128131490903744][DEBUG] lisa.env[generated_0].node[0].cmd[9099].stdout     may not be suitable as a boot device.  If you plan to
2025-04-16 10:22:38.645[128131490903744][DEBUG] lisa.env[generated_0].node[0].cmd[9099].stdout     store '/boot' on this device please ensure that
2025-04-16 10:22:38.645[128131490903744][DEBUG] lisa.env[generated_0].node[0].cmd[9099].stdout     your boot-loader understands md/v1.x metadata, or use
2025-04-16 10:22:38.645[128131490903744][DEBUG] lisa.env[generated_0].node[0].cmd[9099].stdout     --metadata=0.90
2025-04-16 10:22:38.653[128131490903744][DEBUG] lisa.env[generated_0].node[0].cmd[9099].stdout Continue creating array [y/N]? mdadm: create aborted.
2025-04-16 10:22:38.664[128131574765248][DEBUG] lisa.env[generated_0].node[0].cmd[9099] execution time: 0.635 sec, exit code: 1

During the test execution the y/N prompt appears multiple times thus i suspect issue in this call:

cmd = f"echo y | {self.command} "
results in failure:

Continue creating array [y/N]? mdadm: create aborted.
2025-04-16 10:22:38.664[128131574765248][DEBUG] lisa.env[generated_0].node[0].cmd[9099] execution time: 0.635 sec, exit code: 1

I believe a better alternative to echo y | could be yes | (https://linux.die.net/man/1/yes) or expect (https://linux.die.net/man/1/expect) or pexpect

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions