[BlueOnyx:27291] Re: disk usage zero
Michael Stauber
mstauber at blueonyx.it
Thu Oct 17 16:03:04 -05 2024
Hi Meaulnes,
>> When you run /usr/sausalito/sbin/get_quotas.pl as "root" from the
>> shell: Does that report 0 for all accounts?
>
> Cannot open /etc/group: File exists at /usr/sausalito/sbin/get_quotas.pl
> line 35, <GEN0> line 149.
I believe the same issue has bit a few other users this week, too. So I
made some code revisions and published updates. You can fix this issue
by running ...
yum clean all
yum update
The cause of the problem?
==========================
We have some scripts like ...
/usr/sausalito/sbin/get_quotas.pl
... and ...
/usr/sausalito/swatch/bin/am_disk.pl
... which check the disk quota and which are run from within Swatch or
(in case of /usr/sausalito/sbin/get_quotas.pl) also from within the GUI.
Both use the Perl libraries Unix::PasswdFile and Unix::GroupFile to
fetch the User- and Group-information of existing users.
Unfortunately: Both Perl modules *lock* /etc/passwd and /etc/group -
even for the read-only transactions that we perform.
Means: Once locked, no other instance of that Perl module may access
those files. Sooner or later this will cause issues like in your case
and stale lockfiles remain behind. Which then interfere with future
transactions.
I just published YUM updates for BlueOnyx 5210R and 5211R which fix this:
https://devel.blueonyx.it/trac/changeset?reponame=&new=5425%40%2F&old=5421%40%2F
The fixed code replaces Unix::PasswdFile and Unix::GroupFile calls with
our own drop-in replacements Base::CustomPasswdFile and
Base::CustomGroupFile. Which provide the same read-only functions
without the need to lock any files.
The scripts in base-disk have been updated to use the new functions to
get the quota information and that should solve the issue.
Additionally "swatch" has been updated to remove the stale lockfiles
that Unix::PasswdFile or Unix::GroupFile might periodically leave behind.
There are still a few random scripts of minor importance that still use
the old methods and eventually I will modify them as well.
--
With best regards
Michael Stauber
More information about the Blueonyx
mailing list