Bug 1286440 - 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 DEFERRED
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 22
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: integration
Depends On:
Blocks: 1279051
TreeView+ depends on / blocked
 
Reported: 2015-11-29 14:06 UTC by Yaniv Lavi
Modified: 2015-12-01 12:57 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1279051
Environment:
Last Closed: 2015-12-01 12:57:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Yaniv Lavi 2015-11-29 14:06:31 UTC
+++ This bug was initially created as a clone of Bug #1279051 +++

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.

--- Additional comment from Alon Bar-Lev on 2015-11-07 21:29:05 IST ---

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.

--- Additional comment from Yaniv Kaul on 2015-11-29 15:25:19 IST ---

Ian - is there a bug on DNF to fix this?

--- Additional comment from Ian Morgan on 2015-11-29 15:29:27 IST ---

Yaniv, I have no idea about a bug filed against DNF. I just reported the original bug against otopi.

Comment 1 Alon Bar-Lev 2015-11-29 14:38:52 UTC
minidnf is not part of fedora nor dnf, why was this bug dup?
when opening a bug on dependency you should describe exactly what you expect the history is irrelevant, the terms should be within dependencies term.

it may not worth the effort to handle this anyway, as this is edge condition using non public api.


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