RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1436060 - Detailed error messages are not given when the log file set by daemon-log-outputs via virt-admin is under a non-existing directory
Summary: Detailed error messages are not given when the log file set by daemon-log-out...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Erik Skultety
QA Contact: Yanqiu Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-27 04:27 UTC by Lili Zhu
Modified: 2017-08-02 00:03 UTC (History)
7 users (show)

Fixed In Version: libvirt-3.2.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 17:24:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1846 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2017-08-01 18:02:50 UTC

Description Lili Zhu 2017-03-27 04:27:15 UTC
Description of problem:
when the log file set by daemon-log-outputs via virt-admin is under a non-existing directory, the detailed error message is not given.

Version-Release number of selected component (if applicable):
libvirt-3.1.0-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.# systemctl restart libvirtd
2.# virt-admin daemon-log-outputs 1:file:/tmp/abc/123.log


Actual results:
error: Unable to change daemon logging settings
error: Library function returned error but did not set virError

Expected results:
The detailed error messages should be given

Additional info:
If the outputs was setting as a directory, error messages is also not given.
# virt-admin daemon-log-outputs 1:file:/tmp/
error: Unable to change daemon logging settings
error: Library function returned error but did not set virError

Comment 2 Erik Skultety 2017-04-03 11:05:29 UTC
Fixed upstream by:

commit 6461510386294c9f0b567671176309cf3ca009a4
Author:     Erik Skultety <eskultet>
AuthorDate: Fri Mar 31 10:05:08 2017 +0200
Commit:     Erik Skultety <eskultet>
CommitDate: Fri Mar 31 12:07:07 2017 +0200

    admin: Throw a system error when 'open' fails on user-provided output
    
    There was an unhandled 'open' call which resulted in:
    
    "error: Library function returned error but did not set virError"
    
    Even if this happens during the daemon's start when we still don't have
    any set of outputs defined yet, we can safely report an error, since we
    automatically fallback to stderr which is fine even for both
    running as a daemonized process, since this happens before the daemon
    forks into the background, and running as a systemd service, since
    systemd re-directs std outputs to journald by default.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1436060

Comment 4 Yanqiu Zhang 2017-05-10 03:27:41 UTC
Can reproduce with libvirt-3.1.0-2.el7.x86_64.

Verify with libvirt-3.2.0-4.el7.x86_64
Steps:
1.under a non-existing directory
# ls /tmp/abc
ls: cannot access /tmp/abc: No such file or directory

# virt-admin daemon-log-outputs 1:file:/tmp/abc/123.log
error: Unable to change daemon logging settings
error: failed to open /tmp/abc/123.log: No such file or directory

2.setting as a directory
# virt-admin daemon-log-outputs 1:file:/tmp/
error: Unable to change daemon logging settings
error: failed to open /tmp/: Is a directory

The error messages are detailed. 

Since the results are as expected, mark this bug as verified.

Comment 5 errata-xmlrpc 2017-08-01 17:24:15 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/RHEA-2017:1846

Comment 6 errata-xmlrpc 2017-08-02 00:03:43 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/RHEA-2017:1846


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