[BlueOnyx:27292] Re: disk usage zero

Meaulnes Legler bluelist at waveweb.ch
Fri Oct 18 13:40:16 -05 2024


thank you Michael, it works now!

.. Meaulnes Legler
⌣ Zurich, Switzerland
+41¦0 44 260-1660


On 17.10.24 23:03, Michael Stauber via Blueonyx wrote:
> 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.
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20241018/89f85ad6/attachment.html>


More information about the Blueonyx mailing list