Bug 1279051 - minidnf cannot cope with dnf empty history as dnf does not provide root history transaction
Summary: minidnf cannot cope with dnf empty history as dnf does not provide root histo...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: otopi
Classification: oVirt
Component: Plugins.packagers
Version: 1.4.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ovirt-3.6.2
: ---
Assignee: Alon Bar-Lev
QA Contact:
URL:
Whiteboard: integration
Depends On: 1286440
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-07 13:45 UTC by Jillian Morgan
Modified: 2016-01-04 05:41 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1286440 (view as bug list)
Environment:
Last Closed: 2015-12-03 13:22:30 UTC
oVirt Team: ---
Embargoed:
ylavi: ovirt-3.6.z?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1291895 0 unspecified CLOSED DNF history failure if no history 2021-02-22 00:41:40 UTC

Internal Links: 1291895

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


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