coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `du` check for directory loop avoidance


From: Jeff Kirkpatrick
Subject: Re: `du` check for directory loop avoidance
Date: Wed, 18 Dec 2013 13:29:20 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120601 Thunderbird/10.0.5

Our customer has responded to this note with:

I still disagree with that decision.

In the second link cited by Fotios (Red Hat Support) 
http://lists.gnu.org/archive/html/bug-coreutils/2010-01/msg00011.html, the last 
message
in the thread says: "Eventually we'll probably merely warn (or maybe suppress or 
water-down the diagnostic), rather than failing." but what
happened is they watered-down the diagnostic but still fail.

I would argue the message is only informational, or at most a warning, not an 
error, so the non-zero rule should not apply.

My main concern is with scripts. This case is 100% normal and expected on every 
system that runs named chrooted, and potentially any other
process that is run chrooted as well. Thus any script that calls du and wants 
to be robust will not be able to easily distinguish this
completely normal and expected case from a true error case. For example, 
running as a user without read permissions to something will
yield the identical exit code. So a script would have to capture the stderr 
output of du, and then if the exit code is non-zero, parse
that stderr output to try to deduce if the only "errors" reported were actually 
this completely normal case.
Not only is such code more complicated,  it is also fragile, since it will 
potentially break if the text of that message is ever
altered in any way. At the very least it should give a documented unique exit 
code to distinguish this case from true errors.



We will likely be opening another RFE within Red Hat Bugzilla on this.

Best Regards,

--
Jeff Kirkpatrick, Support Relationship Manager
Strategic Customer Engagement
Red Hat Global Support Services

For Immediate Technical Support - 1.888.GO.REDHAT (888.467.3342)



On 12/18/2013 12:41 PM, Pádraig Brady wrote:
On 12/18/2013 04:46 PM, Jeff Kirkpatrick wrote:
A Red Hat customer has registered a concern over the non-zero exit code that 
results when du traverses a directory loop, i.e. a chrooted environment.

The recent Red Hat Enterprise Linux 6.5 errata 
http://rhn.redhat.com/errata/RHSA-2013-1652.htmlincludes a change to the warning message received 
(FROM "WARNING: Circular directory structure. This almost certainly means that you have a 
corrupted file system." TO " du: mount point `/var/named/chroot/var/named' already 
traversed") however there is still a non-zero exit code.
I need to look into this some more,
but we should at least reword the warning to something more generic

thanks,
Pádraig.


--
Jeff Kirkpatrick, Support Relationship Manager
Strategic Customer Engagement
Red Hat Global Support Services

For Immediate Technical Support - 1.888.GO.REDHAT (888.467.3342)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]