Bug 985150 - Use consistent location for the accounting file /var/account vs /var/log/account
Summary: Use consistent location for the accounting file /var/account vs /var/log/account
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: psacct
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaromír Cápík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 980193 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-16 23:24 UTC by Valdis Kletnieks
Modified: 2016-02-01 01:58 UTC (History)
4 users (show)

Fixed In Version: psacct-6.6.1-6.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-05 01:41:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Valdis Kletnieks 2013-07-16 23:24:06 UTC
Description of problem:
We're not at all consistent about where to find the account file. systemd is told that it's in /var/account:

% grep ExecStart /usr/lib/systemd/system/psacct.service
ExecStartPre=/usr/libexec/psacct/accton-create
ExecStart=/usr/sbin/accton /var/account/pacct

But the 'lastcomm' command is built pointing at /var/log/account instead:

% strings /usr/bin/lastcomm | grep pacct
/var/log/account/pacct

End result is that after the system starts up, you can't use 'lastcomm' to actually see anything unless you use 'lastcomm -f /var/account/pacct'.

Meanwhile, the logrotate.d/psacct rotates /var/log/account/pacct - which means that after logrotate runs, lastcomm and friends will start working again - but only until the next reboot when systemd runs accton back to /var/account/pacct.

(Also, accton-create references /var/account as well).

Use one directory, or the other - I really don't care which. But using both is just totally broken.



Version-Release number of selected component (if applicable):
psacct-6.6.1-3.fc20.x86_64

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Jaromír Cápík 2013-08-14 19:05:21 UTC
Hello Valdis.

The logrotate config for psacct points to the /var/account directory in my case.
Please, check if you have a correct file installed.
The lastcomm tool hardcoded paths need to be fixed. Unfortunately the autotools stuff is totally broken and the shell variables for configuring the paths are ignored. I'm testing a workaround with a couple of sed calls right now.

Please, let me know.

Thanks.

Regards,
Jaromir.

Comment 2 Fedora Update System 2013-08-21 17:13:51 UTC
psacct-6.6.1-6.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/psacct-6.6.1-6.fc19

Comment 3 Jaromír Cápík 2013-08-21 17:16:23 UTC
Hello Valdis.

Please, check whether the latest build resolves the issue for you. I tried to unify the default file locations to /var/account/*acct across the psacct tools.

Thanks in advance.

Regards,
Jaromir.

Comment 4 Fedora Update System 2013-08-23 00:35:46 UTC
Package psacct-6.6.1-6.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing psacct-6.6.1-6.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-15165/psacct-6.6.1-6.fc19
then log in and leave karma (feedback).

Comment 5 Jaromír Cápík 2013-08-27 18:48:28 UTC
*** Bug 980193 has been marked as a duplicate of this bug. ***

Comment 6 Fedora Update System 2013-09-05 01:41:40 UTC
psacct-6.6.1-6.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


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