Bug 1947650

Summary: No ironic rescue capability with OSP16.1 provided deploy-kernel and deploy-ramdisk images
Product: Red Hat OpenStack Reporter: Chris Janiszewski <cjanisze>
Component: openstack-ironic-python-agent-builderAssignee: Steve Baker <sbaker>
Status: CLOSED ERRATA QA Contact: nlevinki <nlevinki>
Severity: medium Docs Contact:
Priority: medium    
Version: 16.1 (Train)CC: jkreger, jparoly, mburns, sbaker, slinaber
Target Milestone: betaKeywords: Triaged
Target Release: 17.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-ironic-python-agent-builder-2.7.1-0.20211023041917.4b511e7.el8ost openstack-tripleo-common-15.3.1-0.20211020075703.c5d4284.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-21 12:14:56 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
ironic-conductor.log none

Description Chris Janiszewski 2021-04-08 19:31:01 UTC
Description of problem:
Images provided by OSP16.1 do not support ironic rescue capabilities

Rescue operation fails with following error:

(chrisj-bmaas) [stack@chrisj-bmaas-undercloud ~]$ openstack baremetal node rescue overcloud_bm2_leaf0  --rescue-password Passw0rd --wait           
Waiting for provision state rescue on node overcloud_bm2_leaf0
Node overcloud_bm2_leaf0 failed to reach state rescue. It's in state rescue failed, and has error: Asynchronous exception: Node failed to perform rescue operation. Exception: Failed to rescue instance 2a6f67bd-0198-4836-aafe-beb490b8f8d9 for node d3fbc4f2-5c3e-426b-8b73-69b45b2dafa3: Agent returned bad result for command finalize_rescue: {'type': 'OSError', 'code': 500, 'message': "Rescue Operation failed when writing the hashed rescue password to the password file. Error [Errno 2] No such file or directory: '/etc/ipa-rescue-config/ipa-rescue-password'", 'details': ''} for node    


Version-Release number of selected component (if applicable):
OSP16.1.4


How reproducible:
Everytime


Steps to Reproduce:
1. tar -xvf /usr/share/rhosp-director-images/ironic-python-agent-latest.tar -C images/

cd images

openstack image create \

  --container-format aki \

  --disk-format aki \

  --public \

  --file ./ironic-python-agent.kernel bm-deploy-kernel

openstack image create \

  --container-format ari \

  --disk-format ari \

  --public \

  --file ./ironic-python-agent.initramfs bm-deploy-ramdisk


2. 
KERNEL_UUID=$(openstack image show bm-deploy-kernel -f value -c id)

INITRAMFS_UUID=$( openstack image show bm-deploy-ramdisk -f value -c id)

3.
openstack baremetal node set overcloud_bm2_leaf0 --driver-info rescue_ramdisk=$INITRAMFS_UUID --driver-info rescue_kernel=$KERNEL_UUID 

4.
openstack baremetal node rescue overcloud_bm2_leaf0  --rescue-password Passw0rd --wait

Actual results:
error


Expected results:
success

Additional info:

Comment 3 Chris Janiszewski 2021-04-09 16:31:34 UTC
Created attachment 1770699 [details]
ironic-conductor.log

This is the only log file that has anything for the event logged, not very helpful if you ask me

Comment 9 Steve Baker 2021-04-27 19:46:25 UTC
I need to confirm what elements the image build yaml specifies.

Comment 12 Paras Babbar 2021-04-27 19:47:31 UTC
Adding this in our automation backlog as critical for next release

Comment 13 Steve Baker 2021-04-27 20:54:47 UTC
This is fixed upstream and in 16.2, but needs a backport for 16.1

Comment 14 Julia Kreger 2022-02-01 21:44:19 UTC
So, just a thought, we have an upstream tempest test for this. We may just be ignoring it if we're running the full ironic suite. This might be super easy for us to make sure we're runnign there moving forward. Instead of building a new jenkins job and all.

Comment 15 Steve Baker 2022-02-08 21:01:59 UTC
This should be in compose RHOS-17.0-RHEL-9-20220119.n.1

Comment 21 Jason Paroly 2022-07-27 20:19:22 UTC
Verified working properly on OSP17 via the rescue tempest test

(py39) [stack@undercloud-0 tempest]$ python3 -m testtools.run ironic_tempest_plugin.tests.scenario.test_baremetal_basic_ops.BaremetalBasicOpsAndRescue.test_baremetal_server_ops_wholedisk_image
/usr/lib64/python3.9/runpy.py:127: RuntimeWarning: 'testtools.run' found in sys.modules after import of package 'testtools', but prior to execution of 'testtools.run'; this
may result in unpredictable behaviour
  warn(RuntimeWarning(msg))
Tests running...

Ran 1 test in 502.775s
OK

Comment 26 errata-xmlrpc 2022-09-21 12:14:56 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 (Release of components for Red Hat OpenStack Platform 17.0 (Wallaby)), 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/RHEA-2022:6543