🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
9 messages
9 total messages Started by David Spigelman Tue, 20 Apr 1999 00:00
INN 2.2 - Making large changes to active file
#36825
Author: David Spigelman
Date: Tue, 20 Apr 1999 00:00
11 lines
1192 bytes
I want to make some big changes to my active file, removing several
hundred groups. How do I do this? I tried just editing the file and
removing those entries I don't want, but that just caused my server to
die. The only way I know to remove groups at this point is to use
ctlinnd rmgroup <groupname>. But I'd rather not have to do that for all
those groups. So how do I do it?

DS


Re: INN 2.2 - Making large changes to active file
#36924
Author: Russ Allbery
Date: Thu, 22 Apr 1999 00:00
30 lines
1880 bytes
Brad Knowles <brad@shub-internet.org> writes:
> David Spigelman <dspigelm@acp.org> wrote:

>> I want to make some big changes to my active file, removing several
>> hundred groups. How do I do this?

> You can do this two ways:

> 1.  Stop the news server, edit the file, restart the news server.

> 2.  Feed the newsgroups to ctlinnd, but make sure that you sleep
> something like four seconds between calls to this program, to give INN a
> chance to keep up.

I highly, *highly* recommend #1, particularly when removing groups since
you're then just deleting lines.  You *shouldn't* have to stop the server
completely; throttling it is sufficient (I've heard of bugs in old INNs
that can cause corruption this way, but I think they were stamped out long
ago).  Just make sure to do a ctlinnd reload active after you're done.

Even with the sleep in #2, each time you do a ctlinnd rmgroup, the server
flushes and closes all of its batches, stops all feed programs, reloads
the active and newsgroups files, and then reopens all of its batches and
reforks all feed programs.  For every newsgroup.  This is a lot of
needless work compared to just editing the active file directly.

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

Re: INN 2.2 - Making large changes to active file
#36927
Author: David Spigelman
Date: Thu, 22 Apr 1999 00:00
40 lines
2386 bytes
Russ Allbery wrote:

> Brad Knowles <brad@shub-internet.org> writes:
> > David Spigelman <dspigelm@acp.org> wrote:
>
> >> I want to make some big changes to my active file, removing several
> >> hundred groups. How do I do this?
>
> > You can do this two ways:
>
> > 1.  Stop the news server, edit the file, restart the news server.
>

Actually, I tried this method first. It didn't seem to work. Every time I
replaced the active file with the newly edited file, I couldn't get INN to
work right. I would throttle INN, put in the new active file, and then reload
active. After a minute or so, ctlinnd would respond that it couldn't send the
command to a dead server.

That's why I was looking for alternate methods. I found one too. I used the
file that I had tried to edit, and a copy of the original active file. Then I
did this:

actsync -o x -p 1 ./active ./active1

(where both files are in another directory - not db - and active1 is the
subset file.)

This is doing it. It's slow as anything, but it's working. It's removing all
those groups from the real active file (-o x passes commands to ctlinnd) based
on those two other files. Now I have my upstream provider not passing me
control messages, so I don't have to worry about control.ctl - yes, I know it
means I also don't automagically get new groups in my hierarchies, and I am
removing the unwanted groups from what I've got. So far, so good!


-- DS


Re: INN 2.2 - Making large changes to active file
#36937
Author: Russ Allbery
Date: Thu, 22 Apr 1999 00:00
15 lines
1248 bytes
David Spigelman <dspigelm@acp.org> writes:

> Actually, I tried this method first. It didn't seem to work. Every time
> I replaced the active file with the newly edited file, I couldn't get
> INN to work right. I would throttle INN, put in the new active file, and
> then reload active. After a minute or so, ctlinnd would respond that it
> couldn't send the command to a dead server.

The server died when you throttled it?  That's not good.  I wonder if
pausing it instead would be better....

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

Re: INN 2.2 - Making large changes to active file
#36953
Author: Brad Knowles
Date: Thu, 22 Apr 1999 00:00
63 lines
2749 bytes
In article <371CB0A4.2B8ADA99@acp.org>, David Spigelman <dspigelm@acp.org>
wrote:

> I want to make some big changes to my active file, removing several
> hundred groups. How do I do this?

    You can do this two ways:

        1.  Stop the news server, edit the file, restart the news server.

        2.  Feed the newsgroups to ctlinnd, but make sure that you sleep
something like four seconds between calls to this program, to give INN a
chance to keep up.


    I've got a little script (which I call "rmgroups) that I threw
together to help me do #2 (see below).  You use it like so:

        # cd /usr/local/tmp
        # cat newsgroups.to.be.removed | /usr/local/news/bin/rmgroups


    Of course, I always make sure that my input to this program has been
sorted and uniq'ed, so that I don't try to remove the same newsgroup more
than once (and so I've got some sort of idea how far it's gotten along in
the process).

    Finally, note that this program doesn't do any sanity checking on it's
input, so you can seriously screw yourself up if you aren't careful.



#!/bin/sh
#
# rmgroups -- read from stdin a list of newsgroups to be
#           handed to ctlinnd to be removed
#
# Author: Brad Knowles <brad@shub-internet.org>
#   Date: Thu Apr 15 10:33:06 MET DST 1999
#
# This program is provided without any warranty whatsoever.
# USE AT YOUR OWN RISK!!!
 
read INPUT
if [ $? -eq 0 ] ; then
        while [ $? -eq 0 ]
        do
                echo -n "Removing $INPUT...  "
                /usr/local/news/bin/ctlinnd rmgroup $INPUT
                sleep 4
                read INPUT
        done
fi
echo "All rmgroups done.  Exiting...."

-- 
Brad Knowles <brad@shub-internet.org> <http://www.shub-internet.org/brad/>
    <http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0xE38CCEF1>

Are you looking for a news feed from a site in the Freenix Top 130?
If so, contact me via private e-mail for details.

Re: INN 2.2 - Making large changes to active file
#36965
Author: David Spigelman
Date: Fri, 23 Apr 1999 00:00
26 lines
1999 bytes
Russ Allbery wrote:

> David Spigelman <dspigelm@acp.org> writes:
>
> > Actually, I tried this method first. It didn't seem to work. Every time
> > I replaced the active file with the newly edited file, I couldn't get
> > INN to work right. I would throttle INN, put in the new active file, and
> > then reload active. After a minute or so, ctlinnd would respond that it
> > couldn't send the command to a dead server.
>
> The server died when you throttled it?  That's not good.  I wonder if
> pausing it instead would be better....

I don't believe you can change the active file directly like then when it's
paused. At least, everything I've read about it indicates that correct
procedure is to throttle or shut down INN.

In any case, the problem seems to have been caused by the removal of some
apparently key groups from my active file (control.*, junk and to). As soon as
I added those back in and re-ran inndstart, everything came up fine. Thanks
for the help.

-- DS


Re: INN 2.2 - Making large changes to active file
#36988
Author: Russ Allbery
Date: Fri, 23 Apr 1999 00:00
25 lines
1663 bytes
David Spigelman <dspigelm@acp.org> writes:
> Russ Allbery wrote:

>> The server died when you throttled it?  That's not good.  I wonder if
>> pausing it instead would be better....

> I don't believe you can change the active file directly like then when
> it's paused. At least, everything I've read about it indicates that
> correct procedure is to throttle or shut down INN.

The pre-2.x INN FAQ specifically recommends it.  It says to pause the
server, change the active file, reload it, and then restart it.

> In any case, the problem seems to have been caused by the removal of
> some apparently key groups from my active file (control.*, junk and
> to).

Ah, yeah, that'll kill the server every time.  (Hm.  Another thing to put
on the to-do list.  INN really should just add those groups back in itself
if they're deleted.)

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

Re: INN 2.2 - Making large changes to active file
#36995
Author: Kjetil Torgrim Homme
Date: Sat, 24 Apr 1999 00:00
16 lines
1323 bytes
[David Spigelman]

>   In any case, the problem seems to have been caused by the removal
>   of some apparently key groups from my active file (control.*, junk
>   and to).

[Russ Allbery]

>   Ah, yeah, that'll kill the server every time.

What's "to"?  I don't have that group, but INN has never complained.


Kjetil T.

Re: INN 2.2 - Making large changes to active file
#36999
Author: Andrew Gierth
Date: Sat, 24 Apr 1999 00:00
21 lines
1867 bytes
>>>>> "Kjetil" == Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> writes:

 >> Ah, yeah, that'll kill the server every time.

 Kjetil> What's "to"?  I don't have that group, but INN has never
 Kjetil> complained.

"to" is only mandatory if you have MERGE_TO_GROUPS defined (or
whatever the corresponding option in 2.x is).

Articles posted to to.SITENAME are propagated to SITENAME by magic,
so there is no actual need to keep all the to.* groups separate; if
MERGE_TO_GROUPS is set then everything in to.* is filed in "to".
This is only actually needed if you use ihave/sendme for UUCP feeding;
this seems to be popular in Japan for some reason, where there are a
bunch of sites leaking their to.* groups out to the world at large.

-- 
Andrew.

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads