Bug 1781086 - dnf update print lot of errors and traceback when run under regular user
Summary: dnf update print lot of errors and traceback when run under regular user
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf
Version: 8.2
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: rc
: 8.0
Assignee: Marek Blaha
QA Contact: Eva Mrakova
URL:
Whiteboard:
Depends On: 1782910
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-09 10:16 UTC by Martin Krajnak
Modified: 2020-04-28 16:49 UTC (History)
2 users (show)

Fixed In Version: subscription-manager-1.26.11-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 16:49:06 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1823 None None None 2020-04-28 16:49:22 UTC

Description Martin Krajnak 2019-12-09 10:16:31 UTC
Description of problem:
I am not sure what is causing this but insted of showing a simple message:
Error: This command has to be run under the root user.

I am now getting lot of errors including tracebacks when both dnf update and yum update is run under regular user.

$ dnf -y update /  yum -y update 
ERROR:root:[Errno 17] File exists: '/var/log/rhsm/' - Further output will be written to stderr
Not root, Subscription Management repositories not updated
INFO:dnf.plugin:Not root, Subscription Management repositories not updated
DEBUG:dnf:DNF version: 4.2.17
DDEBUG:dnf:Command: dnf -y update 
DDEBUG:dnf:Installroot: /
DDEBUG:dnf:Releasever: 8
DEBUG:dnf:cachedir: /var/tmp/dnf-mkrajnak-8a7vsn9u
DDEBUG:dnf:Base command: update
DDEBUG:dnf:Extra commands: ['-y', 'update']
DDEBUG:dnf:Cleaning up.
SUBDEBUG:dnf:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 65, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 98, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 114, in cli_run
    cli.run()
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1145, in run
    self._process_demands()
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 814, in _process_demands
    raise dnf.exceptions.Error(_('This command has to be run under the root user.'))
dnf.exceptions.Error: This command has to be run under the root user.
Error: This command has to be run under the root user.
CRITICAL:dnf:Error: This command has to be run under the root user.


Version-Release number of selected component (if applicable):
dnf-4.2.17-1.el8.noarch
libdnf-0.39.1-1.el8.x86_64

How reproducible:
always, reproduced on 2 machines

Expected results:
I think output should be something like:
Error: This command has to be run under the root user.

Additional info:
I am not sure if I could cause this error by some missconfiguration on my system: 
ERROR:root:[Errno 17] File exists: '/var/log/rhsm/' - Further output will be written to stderr

Comment 11 errata-xmlrpc 2020-04-28 16:49:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1823


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