Bug 1473791

Summary: dnf system-upgrade log fails to list boots when upgrade was attempted
Product: [Fedora] Fedora Reporter: Roy A. Gilmore <rag>
Component: dnf-plugins-extrasAssignee: rpm-software-management
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 26CC: dmach, ignatenko, jkadlcik, jmracek, mblaha, redhat-bugzilla, rpm-software-management, vmukhame, wwoods, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-29 15:42:58 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:

Description Roy A. Gilmore 2017-07-21 16:41:30 UTC
Description of problem:
dnf system-upgrade log fails to list boots when upgrade was attempted, instead


Version-Release number of selected component (if applicable):
2.0.1-1.fc26.noarch

How reproducible:
Every time

Steps to Reproduce:
1. dnf system-upgrade log

Actual results:
Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 179, in user_main
    errcode = main(args)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 99, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 115, in cli_run
    cli.run()
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 962, in run
    return self.command.run()
  File "/usr/lib/python3.6/site-packages/dnf-plugins/system_upgrade.py", line 335, in run
    self._call_sub("run", self.opts)
  File "/usr/lib/python3.6/site-packages/dnf-plugins/system_upgrade.py", line 343, in _call_sub
    subfunc(*args)
  File "/usr/lib/python3.6/site-packages/dnf-plugins/system_upgrade.py", line 503, in run_log
    assert extcmds[0] == 'log'
TypeError: 'Namespace' object does not support indexing

Expected results:
list of boots when upgrade was attempted

Additional info:
dnf system-upgrade log -1

produces this:
usage: dnf system-upgrade [-c [config file]] [-q] [-v] [--version]
                          [--installroot [path]] [--nodocs] [--noplugins]
                          [--enableplugin [plugin]] [--disableplugin [plugin]]
                          [--releasever RELEASEVER] [--setopt SETOPTS]
                          [--skip-broken] [-h] [--allowerasing] [-b] [-C]
                          [-R [minutes]] [-d [debug level]] [--debugsolver]
                          [--showduplicates] [-e ERRORLEVEL] [--obsoletes]
                          [--rpmverbosity [debug level name]] [-y]
                          [--assumeno] [--enablerepo [repo]]
                          [--disablerepo [repo] | --repo [repo]]
                          [-x [package]] [--disableexcludes [repo]]
                          [--repofrompath [repo,path]] [--nogpgcheck]
                          [--color COLOR] [--refresh] [-4] [-6]
                          [--downloadonly] [--bugfix] [--enhancement]
                          [--newpackage] [--security] [--advisory ADVISORY]
                          [--bzs BUGZILLA] [--cves CVES]
                          [--sec-severity {Critical,Important,Moderate,Low}]
                          [--datadir DATADIR] [--no-downgrade]
                          [download|clean|reboot|upgrade|log]
dnf system-upgrade: error: unrecognized arguments: 1

Comment 1 Marek Blaha 2017-11-29 15:42:58 UTC
Hi, please upgrade to latest dnf-plugins-extras, which (from Fedora 26 onwards) provides system-upgrade plugin. This issue should be already fixed. In case of any problems, don't hesitate to reopen the bug.
Concerning -1 argument: dnf log is now not able to filter list of boots.