Bug 2089803

Summary: Rename tool fails on missing key shortLife
Product: [oVirt] ovirt-engine Reporter: Ivana Saranova <isaranov>
Component: Tools.RenameAssignee: Milan Zamazal <mzamazal>
Status: CLOSED CURRENTRELEASE QA Contact: Barbora Dolezalova <bdolezal>
Severity: medium Docs Contact:
Priority: high    
Version: 4.5.0.8CC: bugs, dfodor, michal.skrivanek, mzamazal
Target Milestone: ovirt-4.5.1Keywords: Regression
Target Release: ---Flags: sbonazzo: ovirt-4.5+
pm-rhel: blocker?
sbonazzo: devel_ack+
gdeolive: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.5.1.1 Doc Type: Bug Fix
Doc Text:
‘shortLife’ entity key was introduced to distinguish between short-lived (e.g. web) and long-lived (e.g. CA, hosts) certificates. The key was also used in ovirt-engine-rename without adding it to the corresponding entities, resulting in KeyError on ovirt-engine-rename invocation.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-23 05:54:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ivana Saranova 2022-05-24 13:25:12 UTC
Description of problem:
Running ovirt-engine-rename ends in failure.

Version-Release number of selected component (if applicable):
ovirt-engine-4.5.0.8-1.el8.noarch

How reproducible:
Always

Steps to Reproduce:
1. Power off engine, remove network and create a new one
2. Run engine, (run engine-setup), engine has different IP but old FQDN
3. Run ovirt-engine-rename with new FQDN

Actual results:
Failed, z logu tento ERROR:2022-05-24 14:58:57,631+0200 DEBUG otopi.context context._executeMethod:145 method exception
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/otopi/context.py", line 132, in _executeMethod
    method['method']()
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-rename/ovirt-engine/pki.py", line 436, in _misc
    self._handle_rename(entity)
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-rename/ovirt-engine/pki.py", line 235, in _handle_rename
    + (('--days=398',) if entity['shortLife'] else ())
KeyError: 'shortLife'

Expected results:
Success, the engine has been renamed.

Additional info:

Comment 1 Michal Skrivanek 2022-05-24 13:52:49 UTC
broken by bug #2079835

Comment 2 RHEL Program Management 2022-06-08 07:29:45 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 3 Nikolai Sednev 2022-06-14 08:52:53 UTC
Please fill in the "Fixed In Version" field.

Comment 4 Barbora Dolezalova 2022-06-17 11:39:08 UTC
Verified in ovirt-engine-4.5.1.2-0.11.el8ev.noarch

Comment 5 Sandro Bonazzola 2022-06-23 05:54:58 UTC
This bugzilla is included in oVirt 4.5.1 release, published on June 22nd 2022.
Since the problem described in this bug report should be resolved in oVirt 4.5.1 release, it has been closed with a resolution of CURRENT RELEASE.
If the solution does not work for you, please open a new bug report.