mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
qa/nvme_loop: fix an issue on ubuntu 18.04
The following command: ``` echo /dev/sda | tee /sys/kernel/config/nvmet/subsystems/sda/namespaces/1/device_path ``` makes nvme_loop fail because fascinatingly, it adds an unexpected newline. See: ``` /dev/sda /dev/sda 1 tee: /sys/kernel/config/nvmet/subsystems/sda/namespaces/1/enable: No such file or directory /dev/sda 1 ``` Other distros don't have the same behavior: ``` CentOS 8 /dev/sda /dev/sda 1 Ubuntu 20.04 /dev/sda /dev/sda 1 ``` Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
This commit is contained in:
parent
3c93ffdc92
commit
f8e22fb3da
@ -45,7 +45,7 @@ def task(ctx, config):
|
||||
run.Raw('&&'),
|
||||
'sudo', 'mkdir', '-p', f'{base}/subsystems/{short}/namespaces/1',
|
||||
run.Raw('&&'),
|
||||
'echo', dev, run.Raw('|'),
|
||||
'echo', '-n', dev, run.Raw('|'),
|
||||
'sudo', 'tee', f'{base}/subsystems/{short}/namespaces/1/device_path',
|
||||
run.Raw('&&'),
|
||||
'echo', '1', run.Raw('|'),
|
||||
|
Loading…
Reference in New Issue
Block a user