Bug 2088561

Summary: BMH unable to start inspection: File name too long
Product: OpenShift Container Platform Reporter: Eran Cohen <ercohen>
Component: Bare Metal Hardware ProvisioningAssignee: Dmitry Tantsur <dtantsur>
Bare Metal Hardware Provisioning sub component: baremetal-operator QA Contact: Lubov <lshilin>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: augol, lshilin
Version: 4.11Keywords: Triaged
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 11:13:14 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:
Attachments:
Description Flags
metal3-ironic.log none

Description Eran Cohen 2022-05-19 16:55:44 UTC
Created attachment 1881417 [details]
metal3-ironic.log

Description of problem:
BMH error status when PreprovisioningImage format is: initrd

Version-Release number of selected component (if applicable):
Cluster version is 4.11.0-0.nightly-2022-05-18-053037



How reproducible:

100%

Steps to Reproduce:
I came across this issue while working on the metal3 & ZTP integration so it's not easy to reproduce the exact steps.
1. This is what I had in the PreprovisioningImage status:
format: initrd
imageUrl: https://assisted-image-service-assisted-installer.apps.ostest.test.metalkube.org/images/aabd0372-7789-43e9-8f0f-c2833885b250?api_key=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbmZyYV9lbnZfaWQiOiJhYWJkMDM3Mi03Nzg5LTQzZTktOGYwZi1jMjgzMzg4NWIyNTAifQ._ScQssZhDNgndY0-j0hApE4LOpR9qSTRdXUrlMeEtOF2lrWYWxgZphB0XHeQ5og8NF_nefzRbKwnn8qm1QDpUw&arch=x86_64&type=minimal-iso&version=4.10



Actual results:
BMH:
│   Error Message:  Failed to inspect hardware. Reason: unable to start inspection: [Errno 36] File name too long: '/tmp/tmpw97w7jpu/aabd0372-7789-43e9-8f0f-c2833885b2 │
│ 50?api_key=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbmZyYV9lbnZfaWQiOiJhYWJkMDM3Mi03Nzg5LTQzZTktOGYwZi1jMjgzMzg4NWIyNTAifQ._ScQssZhDNgndY0-j0hApE4LOpR9qSTRdXUrlMeEtO │
│ F2lrWYWxgZphB0XHeQ5og8NF_nefzRbKwnn8qm1QDpUw&arch=x86_64&type=minimal-iso&version=4.10'  


Expected results:


Additional info:
Found this in the emetal3-ironic log (attached the full log)
2022-05-19 11:11:14.202 1 ERROR root [req-6a4042a8-52c5-4211-9e41-ca0b91346efe - - - - -] Original exception being dropped: ['Traceback (most recent call last):\n', '  File "/usr/lib/python3.6/site-packages/oslo_utils/fileutils.py", line 77, in remove_pa
th_on_error\n    yield\n', '  File "/usr/lib/python3.6/site-packages/ironic/common/images.py", line 374, in fetch\n    fetch_into(context, image_href, path)\n', '  File "/usr/lib/python3.6/site-packages/ironic/common/images.py", line 363, in fetch_into\n
    with open(image_file, "wb") as image_file_obj:\n', "OSError: [Errno 36] File name too long: '/tmp/tmp0z6l4kfb/aabd0372-7789-43e9-8f0f-c2833885b250?api_key=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbmZyYV9lbnZfaWQiOiJhYWJkMDM3Mi03Nzg5LTQzZTktOGYwZi1jMj
gzMzg4NWIyNTAifQ._ScQssZhDNgndY0-j0hApE4LOpR9qSTRdXUrlMeEtOF2lrWYWxgZphB0XHeQ5og8NF_nefzRbKwnn8qm1QDpUw&arch=x86_64&type=minimal-iso&version=4.10'\n"]: OSError: [Errno 36] File name too long: '/tmp/tmp0z6l4kfb/aabd0372-7789-43e9-8f0f-c2833885b250?api_key
=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbmZyYV9lbnZfaWQiOiJhYWJkMDM3Mi03Nzg5LTQzZTktOGYwZi1jMjgzMzg4NWIyNTAifQ._ScQssZhDNgndY0-j0hApE4LOpR9qSTRdXUrlMeEtOF2lrWYWxgZphB0XHeQ5og8NF_nefzRbKwnn8qm1QDpUw&arch=x86_64&type=minimal-iso&version=4.10'ESC[00m
2022-05-19 11:11:14.204 1 ERROR ironic.drivers.modules.inspector [req-6a4042a8-52c5-4211-9e41-ca0b91346efe - - - - -] Unable to start managed inspection for node 4dfce883-1a8f-4c83-a661-ddbb01a34f6d: [Errno 36] File name too long: '/tmp/tmp0z6l4kfb/aabd0372-7789-43e9-8f0f-c2833885b250?api_key=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbmZyYV9lbnZfaWQiOiJhYWJkMDM3Mi03Nzg5LTQzZTktOGYwZi1jMjgzMzg4NWIyNTAifQ._ScQssZhDNgndY0-j0hApE4LOpR9qSTRdXUrlMeEtOF2lrWYWxgZphB0XHeQ5og8NF_nefzRbKwnn8qm1QDpUw&arch=x86_64&type=minimal-iso&version=4.10': OSError: [Errno 36] File name too long: '/tmp/tmp0z6l4kfb/aabd0372-7789-43e9-8f0f-c2833885b250?api_key=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbmZyYV9lbnZfaWQiOiJhYWJkMDM3Mi03Nzg5LTQzZTktOGYwZi1jMjgzMzg4NWIyNTAifQ._ScQssZhDNgndY0-j0hApE4LOpR9qSTRdXUrlMeEtOF2lrWYWxgZphB0XHeQ5og8NF_nefzRbKwnn8qm1QDpUw&arch=x86_64&type=minimal-iso&version=4.10'
2022-05-19 11:11:14.204 1 ERROR ironic.drivers.modules.inspector Traceback (most recent call last):
2022-05-19 11:11:14.204 1 ERROR ironic.drivers.modules.inspector   File "/usr/lib/python3.6/site-packages/oslo_utils/fileutils.py", line 77, in remove_path_on_error
2022-05-19 11:11:14.204 1 ERROR ironic.drivers.modules.inspector     yield
2022-05-19 11:11:14.204 1 ERROR ironic.drivers.modules.inspector   File "/usr/lib/python3.6/site-packages/ironic/common/images.py", line 374, in fetch
2022-05-19 11:11:14.204 1 ERROR ironic.drivers.modules.inspector     fetch_into(context, image_href, path)
2022-05-19 11:11:14.204 1 ERROR ironic.drivers.modules.inspector   File "/usr/lib/python3.6/site-packages/ironic/common/images.py", line 363, in fetch_into
2022-05-19 11:11:14.204 1 ERROR ironic.drivers.modules.inspector     with open(image_file, "wb") as image_file_obj:
2022-05-19 11:11:14.204 1 ERROR ironic.drivers.modules.inspector OSError: [Errno 36] File name too long: '/tmp/tmp0z6l4kfb/aabd0372-7789-43e

Comment 1 Dmitry Tantsur 2022-06-01 08:42:32 UTC
Wrong PR (but the upstream change is on the way).

Comment 5 errata-xmlrpc 2022-08-10 11:13:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5069