[freeside] Freeside 1.4.1 Canceling Accounts

Stephen Bechard steve at destek.net
Thu Feb 5 18:03:29 PST 2004


Ivan,

I actually found and applied the patch related to the
FreeBSD Bug and the issues have been resolved.

I asked if was ever applied to the cvs updates and they 
said no, here it the latest status of the FreeBSD Bug
for any one else interested in just applying the patch:

http://www.freebsd.org/cgi/query-pr.cgi?pr=23501 

Enjoy,
Steve

----- Original Message ----- 
From: "ivan" <ivan at 420.am>
To: <ivan-freeside at sisd.com>
Sent: Thursday, February 05, 2004 7:52 PM
Subject: Re: [freeside] Freeside 1.4.1 Canceling Accounts


> I added a "lockf /etc/passwd.lock" to all the default FreeBSD shell 
> commands.
> 
> -- 
> _ivan
> 
> 
> On Sat, Nov 15, 2003 at 05:08:33AM -0800, ivan at 420.am wrote:
> > On Thu, Nov 13, 2003 at 10:33:42AM -0500, Stephen D. Bechard wrote:
> > > I am currently running Freeside 1.4.1 on FreeBSD 4.8 with 
> > > perl 5.6.1 and postgresql 7.3.4. 
> > > 
> > > I am having some issues dealing with Canceling or Expiring
> > > Accounts and ending up with a corrupt master.passwd.
> > > 
> > > Here is the current issues that I am finding...
> > > 
> > > I have a Package Configured that has the following:
> > >     1 - Dialup PPP/POP3 Account
> > >     4 - POP3 Account
> > > 
> > > The primary Dialup PPP/POP3 Account has exports configured 
> > > to the same server for textradius and shellcommands, and the
> > > four POP3 Accounts has exports configured to the same server
> > > for shellcommands only.
> > > 
> > > It appears that if I have a customer that has more than
> > > two of these svc_acct's configured and I click on the
> > > Cancel Package option, I end up with a corrupt master.passwd 
> > > file that is missing several hundred or more accounts.
> > > 
> > > It only seems to be a problem if there are two svc_acct's
> > > that are configured that end up in the master.passwd file
> > > on the remote system. If I just suspend the package then
> > > everything is okay, or at least doesn't corrupt the file.
> > > The same outcome is arrived if you set the Expire on the Package.
> > > 
> > > I think it might be something related to the queue not waiting
> > > for one deletion to finish before it try's the second,
> > 
> > The job queue doesn't attempt to serialize jobs like this.
> > 
> > I searched around a bit; the problem appears to be this or something
> > similar: "pw(8) can sometimes corrupt the passwd file".  See
> > http://www.atm.tut.fi/list-archive/freebsd-stable/msg01194.html
> > 
> > I'm curious what happened here; 4.8 was released some time after this
> > thread.  :/
> > 
> > To work around the problem, probably need to run a wrapper around the
> > "pw" command which blocks and serializes "pw" runs.
> > 
> > -- 
> > _ivan
> > 
> > 
> > > but I
> > > am not really sure how the queue dependencies work....
> > > 
> > > The only work around that I have found so far is that I must
> > > unprovision each account individually first, then cancel the
> > > package. However, this is risky as some of the other techs that
> > > deal with the customers forget to look before clicking Cancel.
> > > I have been lucky so far, as I have always had a root account
> > > opened on the box and just copied the backup master.passwd
> > > back, but one of these days my luck will run out.
> > > 
> > > Has anyone else seen this behavior running Freeside on FreeBSD?
> > > Any advice on this matter would be greatly appreciated.
> > > 
> > > Thanks in Advance,
> > > Steve
> 
> -- 
> _ivan
> 
> 



More information about the freeside-users mailing list