Bug 2143442
| Summary: | Unable to monitor USB UPS - probably wrong hardcoded path to socket | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Marek Greško <marek.gresko> |
| Component: | nut | Assignee: | Charles R. Anderson <cra> |
| Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 37 | CC: | cra, crow, dominique, dwhile, james, mhlavink, orion, pizza, scott, stuart |
| 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: | 2022-12-03 17:37:18 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
Marek Greško
2022-11-16 23:33:05 UTC
Maybe the option --with-altpidpath=/var/run/nut should be added to the configure when compiling. And also --with-statepath=/var/run/nut. I tried to rebuild the rpms with these configure parameters:
--with-statepath=/run/nut \
--with-pidpath=/run \
--with-altpidpath=/run/nut \
Current state is:
systemctl status nut-monitor displays fopen /run/upsmon.pid: No such file or directory
and /usr/lib/tmpfiles.d/nut-common.conf contains
d /run/nut/nut 0770 nut dialout - -
X /run/nut/nut
d /run/nut 0770 nut dialout - -
X /run/nut
So I am not sure what are the correct parameters. Probably
--with-statepath=/run/nut \
--with-pidpath=/run/nut \
The Error: Driver not connected was related to not running nut-driver service. In the 2.8.0 version you should enable nut-driver. But I did not test with original packages. Maybe it would not work since it creates socket in /run/nut. It would not create it in /run because of permissions.
I tested with
--with-statepath=/run/nut \
--with-pidpath=/run/nut \
The results were quite interesting. nut-monitor tried to search for pid file in the correct directory /run/nut instead of /run, but /usr/lib/tmpfiles.d/nut-common.conf contained only
d /run/nut/nut 0770 nut dialout - -
X /run/nut/nut
instead of
d /run/nut 0770 nut dialout - -
X /run/nut
So this is probably also not the exact combination required. Or some patch is required.
Moreover I found out the file name is /usr/lib/tmpfiles.d/nut-common.conf but the service units look for /usr/lib/tmpfiles.d/nut-client.conf
*** Bug 2148706 has been marked as a duplicate of this bug. *** *** Bug 2143833 has been marked as a duplicate of this bug. *** *** Bug 2127269 has been marked as a duplicate of this bug. *** *** Bug 2150486 has been marked as a duplicate of this bug. *** *** This bug has been marked as a duplicate of bug 2127269 *** |