Bug 1286440 - minidnf cannot cope with dnf empty history as dnf does not provide root history transaction
minidnf cannot cope with dnf empty history as dnf does not provide root histo...
Status: CLOSED DEFERRED
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
22
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
integration
:
Depends On:
Blocks: 1279051
  Show dependency treegraph
 
Reported: 2015-11-29 09:06 EST by Yaniv Lavi
Modified: 2015-12-01 07:57 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1279051
Environment:
Last Closed: 2015-12-01 07:57:11 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Yaniv Lavi 2015-11-29 09:06:31 EST
+++ 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 09:38:52 EST
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.