]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
qa/nvme_loop: fix an issue on ubuntu 18.04
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 13 Jan 2022 21:46:03 +0000 (22:46 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 19 Jan 2022 07:35:37 +0000 (08:35 +0100)
commit0cbc1e217646d25c1d218b1efda5a398ced1bbc0
treedf871dccf0a538242f67faf513068b8f84024fb7
parent939d55ffe9ef6019062434b42b80929dc3bf336c
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>
(cherry picked from commit f8e22fb3da9bfbdc75d88beb66543716afb19511)
qa/tasks/nvme_loop.py