Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1279051

Summary: minidnf cannot cope with dnf empty history as dnf does not provide root history transaction
Product: [oVirt] otopi Reporter: Jillian Morgan <penguin.wrangler>
Component: Plugins.packagersAssignee: Alon Bar-Lev <alonbl>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.4.0CC: amureini, bugs, iheim, penguin.wrangler, ylavi
Target Milestone: ovirt-3.6.2Flags: ylavi: ovirt-3.6.z?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: integration
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1286440 (view as bug list) Environment:
Last Closed: 2015-12-03 13:22:30 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:
Bug Depends On: 1286440    
Bug Blocks:    

Description Jillian Morgan 2015-11-07 13:45:53 UTC
Description of problem:

Reinstall host (in maintenence mode) does not work after the host was freshly upgraded to Fedora 22.

Failed to install host <hostname>. Failed to execute stage 'Environment setup': 'NoneType' object has no attribute 'tid'.


in minidnf.py, beginTransaction():
>>  self._baseTransaction = self._base.history.last().tid

# dnf history
Last metadata expiration check performed 0:22:33 ago on Sat Nov  7 08:06:56 2015.
No transactions
Error: Failed history list

Version-Release number of selected component (if applicable):
ovirt-host-deploy-1.4.0-1.el7.centos.noarch

How reproducible:

Fails continuously until workaround applied. See below.

Steps to Reproduce:
1. yum upgrade from earlier Fedora to Fedora 22
2. from ovirt Manager, reinstall host
3.

Actual results:

As indicated above, host install failed "Environment Setup" stage.

Expected results:

Reinstall should complete successfully.

Additional info:

I traced through to find that otopi minidnf module was unable to deal gracefully without any DNF history. I installed any package to cause some DNF history to exist, after which the host re-install completed successfully.

Comment 1 Alon Bar-Lev 2015-11-07 19:29:05 UTC
As you can see, this is dnf issue.
---
# dnf history
Last metadata expiration check performed 0:22:33 ago on Sat Nov  7 08:06:56 2015.
No transactions
Error: Failed history list
---

If empty history is a valid state it should not be an error, and it should return valid base.history.last().tid

We cannot workaround this, I hope they will fix it.

Workaround is to install/remove something to have anything in history to enable rollback.

Comment 2 Yaniv Kaul 2015-11-29 13:25:19 UTC
Ian - is there a bug on DNF to fix this?

Comment 3 Jillian Morgan 2015-11-29 13:29:27 UTC
Yaniv, I have no idea about a bug filed against DNF. I just reported the original bug against otopi.

Comment 4 Yaniv Kaul 2015-12-03 13:22:30 UTC
Ian - I'd be happy if you could report it against DNF (on Fedora 23?). Regretfully, I cannot move it to Fedora as it is a different classification in Bugzilla.

I'd quote https://bugzilla.redhat.com/show_bug.cgi?id=1279051#c1 when reporting the issue.

Comment 5 Jillian Morgan 2015-12-15 20:13:16 UTC
Entered a bug against DNF:

https://bugzilla.redhat.com/show_bug.cgi?id=1291895