Disable svn service temporarily

168 views
Skip to first unread message

Felix Natter

unread,
Mar 14, 2023, 8:59:43 AM3/14/23
to us...@subversion.apache.org

Dear subversion community,

I have setup an ALMA Linux 8 (~RH8) Server, to which I will migrate some
repositories from a Ubuntu 20.04 system. During the migration phase I would
like to disable the svn (svn+ssh://) service temporarily on the Ubuntu 20.04
system.

Is there any easy way to do it? I would like to avoid modifying conf/* for
all of the ~100 repositories, making deep changes to the system and
shutting down the ssh service (because I need to pull the dumps to the new
system).

Later, I would also like to have this "maintenance mode" on the target ALMA8
system.

Do you have an idea?

Many Thanks and Best Regards,

Felix

--

SIDACT GmbH
Simulation Data Analysis and
Compression Technologies

Felix Natter
Software Developer

Auguststraße 29
53229 Bonn
Germany

Phone  :   +49 228 5348 0430
Direct  :   +49 228 4097 7118
Email  :   felix....@sidact.com
Web  :   http://www.sidact.com/
OpenPGP_signature

Juan Gabriel Covas

unread,
Mar 14, 2023, 10:49:08 AM3/14/23
to us...@subversion.apache.org

If you're positive the only way to access the repositories is through svn+ssh, so you have N users that can access, you can group them under a new group ie. "svnusers" and then use the directive "DenyGroups svnusers" under the file /etc/ssh/sshd_config (remember to restart sshd). That would effectively put a "maintenance mode" (disabled ssh for that group) that you can revert and restart sshd again.

Juanga Covas

Trent Fisher

unread,
Mar 17, 2023, 2:44:07 PM3/17/23
to us...@subversion.apache.org
On 3/14/2023 8:52 AM, Felix Natter wrote:
>
> Dear subversion community,
>
> I have setup an ALMA Linux 8 (~RH8) Server, to which I will migrate some
> repositories from a Ubuntu 20.04 system. During the migration phase I
> would
> like to disable the svn (svn+ssh://) service temporarily on the Ubuntu
> 20.04
> system.
>
> Is there any easy way to do it? I would like to avoid modifying conf/* for
> all of the ~100 repositories, making deep changes to the system and
> shutting down the ssh service (because I need to pull the dumps to the new
> system).
>
> Later, I would also like to have this "maintenance mode" on the target
> ALMA8
> system.
>
> Do you have an idea?
>

You could move the "svnserve" command aside, that would block all
svn+ssh access, but that could break a lot of other things, depending on
your setup.

You could replace it with a shell wrapper which blocks access in certain
situations, something like this:

if [ "$SSH_CONNECTION" -a -f /etc/BLACKOUT ]; then cat /etc/BLACKOUT;
exit 1; fi

exec svnserve.real "$@"

So if they are coming in from SSH and you have a file called
/etc/BLACKOUT that file would be sent to users (downtime notice). You
might want to exempt the repository owner, so that any replication or
migration efforts still work.

note: that script is off the top of my head, poorly written and
untested; but it should give you the idea.

trent...


Reply all
Reply to author
Forward
0 new messages