nvmeof: Call findmnt with -v
The -v arg suppresses printing of [/dir] with the
device for bind mounts and btrfs volumes, which is
what we want for this usage.
This fixes _get_host_uuid() failing when using
a btrfs rootfs.
Closes-Bug: #2026257
Change-Id: I2d8f24193ecf821843bf8f4ea14b445561d6225c
(cherry picked from commit edc1bc433b
)
This commit is contained in:
parent
ffb76e10bc
commit
9b23018e10
|
@ -783,7 +783,7 @@ class NVMeOFConnector(base.BaseLinuxConnector):
|
|||
|
||||
def _get_host_uuid(self) -> Optional[str]:
|
||||
"""Get the UUID of the first mounted filesystem."""
|
||||
cmd = ('findmnt', '/', '-n', '-o', 'SOURCE')
|
||||
cmd = ('findmnt', '-v', '/', '-n', '-o', 'SOURCE')
|
||||
try:
|
||||
lines, err = self._execute(
|
||||
*cmd, run_as_root=True, root_helper=self._root_helper)
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
NVMe-oF connector `bug #2026257
|
||||
<https://bugs.launchpad.net/os-brick/+bug/2026257>`_: Fixes _get_host_uuid for nvmeof failing when using a btrfs root fs.
|
Loading…
Reference in New Issue