Bug 1330631 - DNF produces different results in interactive versus non-interactive terminals.
Summary: DNF produces different results in interactive versus non-interactive terminals.
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 23
Hardware: i686
OS: Linux
low
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-26 15:37 UTC by Artur Szostak
Modified: 2016-12-08 13:24 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-06 14:56:22 UTC
Type: Bug


Attachments (Terms of Use)
Kickstarter file used to build initial instance (1.86 KB, text/plain)
2016-04-26 15:37 UTC, Artur Szostak
no flags Details
Logs of DNF non-interactive session (127.37 KB, application/x-gzip)
2016-05-02 14:00 UTC, Artur Szostak
no flags Details
Logs for a successful run through pty to simulate interactive mode. (145.51 KB, application/x-gzip)
2016-05-02 19:01 UTC, Artur Szostak
no flags Details

Description Artur Szostak 2016-04-26 15:37:51 UTC
Created attachment 1150998 [details]
Kickstarter file used to build initial instance

Description of problem:

When updating a fresh installation using "dnf -y update" in a session that is not attached to an interactive console or pseudo terminal the dnf command fails and returns exit code = 1. There are not obvious error messages produced. The behaviour is different if running the command in an interactive terminal or attached to a pseudo terminal (dnf succeeds in that case).


How reproducible:

Always


Steps to Reproduce:
1. Perform a clean install using the attached kickstarter file and the following ISO: http://download.fedoraproject.org/pub/fedora/linux/releases/23/Server/i386/iso/Fedora-Server-netinst-i386-23.iso
2. Run the following command inside the fresh installation:
   ssh -T root@localhost dnf -y update


Actual results:

"dnf -y update" returns with exit code = 1


Expected results:

"dnf -y update" should return with exit code = 0

i.e. the following two commands should produce the same results:
ssh -T root@localhost dnf -y update
ssh -t root@localhost dnf -y update

Comment 1 Igor Gnatenko 2016-05-02 11:30:29 UTC
Please attach logs after update from non-interactive session. Those are located in /var/log/dnf.*

Comment 2 Artur Szostak 2016-05-02 14:00:58 UTC
Created attachment 1152970 [details]
Logs of DNF non-interactive session

Comment 3 Igor Gnatenko 2016-05-02 17:26:38 UTC
(In reply to artur from comment #2)
> Created attachment 1152970 [details]
> Logs of DNF non-interactive session

hm, I don't see errors there... Can you point me where is a problem?

Comment 4 Artur Szostak 2016-05-02 19:01:06 UTC
Created attachment 1153026 [details]
Logs for a successful run through pty to simulate interactive mode.

logs_success.tar.gz contains logs where an update with DNF completed successfully when running through 'expect' to connect DNF to a pseudotty to simulate interactive mode. One can ignore the last DNF transaction which simply removes 'expect'.

Comment 5 Artur Szostak 2016-05-02 19:04:10 UTC
The problem is that DNF exists with code = 1. It seems like it dies just before verification without actually producing an error message. Compare the logs in attachment 1153026 [details], where DNF succeeded (returned error code = 0), to the logs in attachment 1152970 [details] where DNF failed.

Comment 6 Honza Silhan 2016-05-09 11:29:51 UTC
We'll take a look.

Comment 7 Fedora Admin XMLRPC Client 2016-07-08 09:40:03 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Fedora End Of Life 2016-11-25 07:28:29 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Jaroslav Mracek 2016-12-06 14:56:22 UTC
We made a lot of changes in dnf-2.0. It is now available in rawhide or from our testing repository for fc24+ ('dnf copr enable rpmsoftwaremanagement/dnf-nightly'). Please can you test it and if your problem still appears, reopen the bug report.

Comment 10 Artur Szostak 2016-12-08 13:24:36 UTC
I have checked this for Fedora 25 and this problem no longer occurs.


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