Bug 2274174

Summary: os_brick.initiator.connectors.nvmeof raises warning log messages when running inside container like glance
Product: Red Hat OpenStack Reporter: Alex Stupnikov <astupnik>
Component: python-os-brickAssignee: Brian Rosmaita <brian.rosmaita>
Status: CLOSED MIGRATED QA Contact: Yosi Ben Shimon <ybenshim>
Severity: medium Docs Contact:
Priority: medium    
Version: 17.1 (Wallaby)CC: apevec, brian.rosmaita, eharney, jschluet, lhh, parthee
Target Milestone: ---Keywords: Reopened, TestOnly, Triaged
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: python-os-brick-4.3.4-17.1.20240607160815.cf69f92.el9ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-01-17 16:09:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alex Stupnikov 2024-04-09 14:51:54 UTC
Description of problem:

Warnings are logged when os_brick is initialized inside some RHOSP container. For example, the following warning message was logged when copying image from volume
:
2024-04-08 18:06:25.177 20 WARNING os_brick.initiator.connectors.nvmeof [req-UUID ID1 ID2 - default default] Process execution error in _get_host_uuid: Unexpected error while running command.
Command: blkid overlay -s UUID -o value
Exit code: 2
Stdout: ''
Stderr: '': oslo_concurrency.processutils.ProcessExecutionError: Unexpected error while running command.


It is possible to reproduce https://github.com/openstack/os-brick/blob/unmaintained/wallaby/os_brick/initiator/connectors/nvmeof.py#L98-L111 manually:

[root@overcloud-controller0 ~]# podman exec -it glance_api_internal bash
bash-5.1$ findmnt / -n -o SOURCE
overlay
bash-5.1$ blkid overlay -s UUID -o value
bash-5.1$ echo $?
2


There is an upstream bug https://bugs.launchpad.net/os-brick/+bug/2045557


Version-Release number of selected component (if applicable):
RHOSP 17.1


How reproducible:
Please see description


Actual results:
Warning is logged because _get_host_uuid() logic is not ready to process overlayfs

Expected results:
_get_host_uuid() is able to process overlayfs and proceed

Comment 1 Brian Rosmaita 2024-05-09 14:17:07 UTC
Being tracked upstream, but fix is unlikely to be merged as far back as 17.

Comment 2 Brian Rosmaita 2024-05-09 19:29:05 UTC
Reopening ... got some feedback from dhill that this is a real annoyance for anyone reading the logs, so might as well backport it to 17.1.

Comment 3 Brian Rosmaita 2024-06-07 16:21:26 UTC
python-os-brick-4.3.4-17.1.20240607160815.cf69f92.el9osttrunk is tagged 'rhos-17.1-rhel-9-trunk-candidate':
https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=3103980