Bug 2014630 - Image provisioning fails with file name too long
Summary: Image provisioning fails with file name too long
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Bare Metal Hardware Provisioning
Version: 4.8
Hardware: x86_64
OS: Mac OS
Target Milestone: ---
: 4.10.0
Assignee: Dmitry Tantsur
QA Contact: Lubov
Depends On:
Blocks: 2017412 2018490
TreeView+ depends on / blocked
Reported: 2021-10-15 16:33 UTC by Crystal Chun
Modified: 2022-02-15 09:28 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2017412 2018490 (view as bug list)
Last Closed: 2021-11-01 19:59:16 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github open-cluster-management backlog issues 17240 0 None None None 2021-10-15 16:33:19 UTC
Github openshift ironic-image pull 226 0 None open Bug 2014630: Update ironic to fix image provisioning fails with file name too long 2021-10-21 07:33:48 UTC
OpenStack gerrit 814201 0 None NEW Do not use any parts of image URL in temporary file names 2021-10-18 09:32:42 UTC

Description Crystal Chun 2021-10-15 16:33:19 UTC
Description of problem:

Version-Release number of selected component (if applicable): OCP 4.8.10
ACM 2.4.0-DOWNSTREAM-2021-10-12-16-02-23

How reproducible:

Steps to Reproduce:
1. Create infra env using static IP
2. Add host manually from UI
3. See bare metal host created in backend has provisioning error status due to image provisioning failed

Actual results: 

Received the following provisioning error
  Error Count:    1
  Error Message:  Image provisioning failed: Failed to deploy: Deploy step {'step': 'deploy', 'priority': 100, 'argsinfo': None, 'interface': 'deploy'}, error: Could not link image https://assisted-image-service-ocm.apps.slot-00.dev09.red-chesterfield.com/images/215d3efd-7c28-4829-970e-ca79da5327b5?api_key=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbmZyYV9lbnZfaWQiOiIyMTVkM2VmZC03YzI4LTQ4MjktOTcwZS1jYTc5ZGE1MzI3YjUifQ.VwMVGY04wD8xM53nsOUy5q_JDUdjSoXR1i7dqnvUOqpRBu5ddSxPepTUfnAxTr9JqEqT9wKnnm9k35vvHdCgyg&arch=x86_64&type=minimal-iso&version=4.9 from /shared/tftpboot/abfb2300-4813-521b-a92c-0df277a74bd0.converted to /shared/html/c4d43edf-712d-4cca-adeb-709d41f559b3/boot_iso, error: [Errno 36] File name too long: '/shared/tftpboot/tmpyzuebwhe/215d3efd-7c28-4829-970e-ca79da5327b5?api_key=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbmZyYV9lbnZfaWQiOiIyMTVkM2VmZC03YzI4LTQ4MjktOTcwZS1jYTc5ZGE1MzI3YjUifQ.VwMVGY04wD8xM53nsOUy5q_JDUdjSoXR1i7dqnvUOqpRBu5ddSxPepTUfnAxTr9JqEqT9wKnnm9k35vvHdCgyg&arch=x86_64&type=minimal-iso&version=4.9.part'.
  Error Type:     provisioning error

Expected results:
There's no error deploying

Additional info:

Comment 1 Dmitry Tantsur 2021-10-15 16:36:52 UTC
The issue is in this line: https://opendev.org/openstack/ironic/src/commit/34bd42676889a549fccec6645025b63c2016f740/ironic/drivers/modules/image_cache.py#L164. For reasons that nobody remembers any more, we're using a part of the URL to generate a temporary file name.

Comment 4 Lubov 2021-10-29 13:47:27 UTC
since the AI 4.10 is not ready yet, it's impossible to verify the fix yet. Closing as OtherQA to let the fix to enter 4.8 and 4.9

Note You need to log in before you can comment on or make changes to this bug.