Bug 1436060
| Summary: | Detailed error messages are not given when the log file set by daemon-log-outputs via virt-admin is under a non-existing directory | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Lili Zhu <lizhu> |
| Component: | libvirt | Assignee: | Erik Skultety <eskultet> |
| Status: | CLOSED ERRATA | QA Contact: | Yanqiu Zhang <yanqzhan> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.4 | CC: | dyuan, eskultet, fjin, jdenemar, lizhu, rbalakri, xuzhang |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-3.2.0-1.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-08-01 17:24:15 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
Lili Zhu
2017-03-27 04:27:15 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
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. 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 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 |