Bug 1672251

Summary: rename fails on KeyError 'changed'
Product: [oVirt] ovirt-engine Reporter: Lucie Leistnerova <lleistne>
Component: Tools.RenameAssignee: Yedidyah Bar David <didi>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Kubica <pkubica>
Severity: medium Docs Contact:
Priority: high    
Version: 4.3.0CC: bugs, pkubica
Target Milestone: ovirt-4.3.1Flags: rule-engine: ovirt-4.3+
lleistne: testing_ack+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.3.1.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-13 16:39:32 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:
Bug Depends On:    
Bug Blocks: 1660378    
Attachments:
Description Flags
rename log none

Description Lucie Leistnerova 2019-02-04 11:22:06 UTC
Created attachment 1526736 [details]
rename log

Description of problem:
Running ovirt-engine-rename fails with
[ ERROR ] Failed to execute stage 'Setup validation': 'changed'


Version-Release number of selected component (if applicable):
ovirt-engine-4.3.0.4-0.1.el7.noarch

How reproducible: always on my d/s 4.3 engines


Steps to Reproduce:
1. run /usr/share/ovirt-engine/setup/bin/ovirt-engine-rename
2. enter new hostname and yes to all
3.

Actual results: rename failed, see attached log


Expected results: rename is successful


Additional info:

postgresql.conf doesn't have 'changed' key:
ENV OVESETUP_CORE/uninstallFilesInfo=dict:'{'/etc/pki/ovirt-engine/keys/reports.key.nopass': {'changed': False, 'groups': ['ca_pki'], 'md5': 'f6f3714166918f150d2528a9bb10d901'}, '/var/opt/rh/rh-postgresql95/lib/pgsql/data/postgresql.conf': {'groups': ['core', 'unremovable'], 'md5': '415d91ef1aa820745278fc82866fe229'}, '/etc/httpd/conf.d/ovirt-engine-root-redirect.conf': {'changed': False, 'groups': ['core'], 'md5': '161fc2c071d4bd8973796008e5fea7b8'}, '/etc/pki/ovirt-engine/cacert.conf': {'changed': False, 'groups': ['ca_pki'], 'md5': 'db0967328f0c2c544fbfc7f93f4dfa1e'}
...

There is maybe somehow mixed PG95, that was upgraded to PG10 
/var/opt/rh/rh-postgresql95/lib/pgsql/data/postgresql.conf no such file

Comment 1 Yedidyah Bar David 2019-02-04 11:25:19 UTC
I think it should already work for you, not sure. Moving to MODIFIED for now. Or, you can test with current upstream master snapshot.

Comment 2 Yedidyah Bar David 2019-02-04 11:26:27 UTC
No, sorry, I think it's a real bug.

Comment 3 Yedidyah Bar David 2019-02-05 08:07:57 UTC
QE: Reproduction/Verification steps:

1. Setup engine
2. Remove or rename some file that was written by engine-setup.
Removal can be done manually, or by a previous run of engine-setup itself over versions - does not matter for current bug.
3. Run ovirt-engine-rename

With a broken version, it will fail as described.

With the fixed version, it will continue.

Comment 4 Yedidyah Bar David 2019-02-05 11:25:40 UTC
Now pushed a similar patch for engine-cleanup, which is also affected the same way. Above steps apply similarly.

Comment 5 Petr Kubica 2019-03-06 15:27:33 UTC
Verified in ovirt-engine-4.3.2-0.1.el7.noarch

Comment 6 Sandro Bonazzola 2019-03-13 16:39:32 UTC
This bugzilla is included in oVirt 4.3.1 release, published on February 28th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.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.