Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 06 Jun 2006 17:24:47 -0700
From:      Michael Collette <Michael.Collette@TestEquity.com>
To:        Sergey Matveychuk <sem@FreeBSD.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: portupgrade across NFS
Message-ID:  <44861CCF.5040902@TestEquity.com>
In-Reply-To: <4485D4F4.60609@FreeBSD.org>
References:  <4484C065.5000100@TestEquity.com> <44854681.2030902@FreeBSD.org> <4485CEE9.3070501@TestEquity.com> <4485D4F4.60609@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Sergey Matveychuk wrote:
> Michael Collette wrote:
>> No luck.  I was back on 2.0.1 which I upgraded with pkg_delete and
>> pkg_add.  Still the exact same error with deleting the /var/db/pkg
>> directory.
> 
> Let's make it clean. You have /var/db/pkg as nfs mounted? You can't
> remove /var/db/pkg/portname directory?

Got one bad bit of information from my previous post.  The problem DOES 
exist when just performing a pkg_deinstall.  Apparently the one test I 
based my earlier post on wasn't repeatable.  The problem is not with the 
portupgrade script itself.

Dug in quite a bit further with this today.  When pkg_deinstall calls to 
pkg_delete a .nfs file is created which is showing as being actively 
accessed by the ruby process.  This file vanishes once pkg_deinstall 
quits.  Due to that file, even attempting a "rm -rf" on that directory 
will fail within pkg_deinstall.

For testing this out, we added a cheap hack to the portupgrade script 
immediately after the call to pkg_deinstall that just removes the 
directory once pkg_deinstall has ended.  This works, but has no logic or 
error checking at this point.

The pkg_deinstall script does not report that it didn't complete, so the 
main portupgrade script just keeps on going as though there were no errors.

With that being said, what I believe needs to happen in the short term 
is to have a check within the portupgrade script where if the 
pkg_deinstall returns successful and the /var/db/pkg directory still 
exists, delete it.  This would be right around line 1721.

Obviously the more correct thing to do here would be to correct 
pkg_deinstall's behavior.  That looks like it may be quite a bit more 
clever to do, thus my recommendation for fixing portupgrade now, and 
revisit pkg_deinstall later.  I'm just concerned that the real problem 
may have more to do with the ruby engine and NFS than this script, which 
may take many months to correct.

Later on,
-- 
Michael Collette
IT Manager
TestEquity LLC




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44861CCF.5040902>