diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2019-02-14 11:55:30 -0500 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2019-02-14 11:55:30 -0500 |
commit | 2fe4b674768be7e6f0dee7a1a6d8a11d02b2f62f (patch) | |
tree | 0995cfbb1c009e7983885e780cf2c999be64637c | |
parent | 22c6888a39d77742c8c9dcd9da3aab9002b3c6a0 (diff) | |
download | grokmirror-2fe4b674768be7e6f0dee7a1a6d8a11d02b2f62f.tar.gz |
Call this 1.2.0 for consistency and update manv1.2.0
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r-- | CHANGELOG.rst | 4 | ||||
-rw-r--r-- | README.rst | 16 | ||||
-rw-r--r-- | grokmirror/__init__.py | 2 | ||||
-rw-r--r-- | man/grok-dumb-pull.1 | 2 | ||||
-rw-r--r-- | man/grok-dumb-pull.1.rst | 4 | ||||
-rw-r--r-- | man/grok-fsck.1 | 20 | ||||
-rw-r--r-- | man/grok-fsck.1.rst | 20 | ||||
-rw-r--r-- | man/grok-manifest.1 | 2 | ||||
-rw-r--r-- | man/grok-manifest.1.rst | 4 | ||||
-rw-r--r-- | man/grok-pull.1 | 2 | ||||
-rw-r--r-- | man/grok-pull.1.rst | 4 | ||||
-rw-r--r-- | setup.py | 2 |
12 files changed, 45 insertions, 37 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d64f269..460b805 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,5 +1,5 @@ -v1.2 (2019-02-14) ------------------ +v1.2.0 (2019-02-14) +------------------- - Make sure to set gc.auto=0 on repositories to avoid pruning repos that are acting as alternates to others. We run our own prune during fsck, so there is no need to auto-gc, ever (unless you @@ -8,7 +8,7 @@ Framework to smartly mirror git repositories :Date: 2019-02-14 :Copyright: The Linux Foundation and contributors :License: GPLv3+ -:Version: 1.2 +:Version: 1.2.0 DESCRIPTION ----------- @@ -166,23 +166,21 @@ manifest. Then, add the following to ``/etc/cron.d/grok-fsck.cron``:: # Make sure MAILTO is set, for error reports MAILTO=root - # Run nightly, at 2AM - 00 02 * * * mirror /usr/bin/grok-fsck -c /etc/grokmirror/fsck.conf + # Run nightly repacks to optimize the repos + 0 2 1-6 * * mirror /usr/bin/grok-fsck -c /etc/grokmirror/fsck.conf --repack-only + # Run weekly fsck checks on Sunday + 0 2 0 * * mirror /usr/bin/grok-fsck -c /etc/grokmirror/fsck.conf You can force a full run using the ``-f`` flag, but unless you only have a few smallish git repositories, it's not recommended, as it may take -several hours to complete. +several hours to complete. See the man page for other flags grok-fsck +supports. Before it runs, grok-fsck will put an advisory lock for the git-directory being checked (.repository.git.lock). Grok-pull will recognize the lock and will postpone any incoming updates to that repository until the lock is freed. -You can also tell grok-fsck to repack repository after checking it for -errors. To do this, set "repack" value in fsck.conf to "yes". If you -have repositories using alternates, the safer value for repack flags is -"-Adlq". - FAQ --- Why is it called "grok mirror"? diff --git a/grokmirror/__init__.py b/grokmirror/__init__.py index 9bfca8d..4279a41 100644 --- a/grokmirror/__init__.py +++ b/grokmirror/__init__.py @@ -29,7 +29,7 @@ from fcntl import lockf, LOCK_EX, LOCK_UN, LOCK_NB from git import Repo -VERSION = '1.2' +VERSION = '1.2.0' MANIFEST_LOCKH = None REPO_LOCKH = {} GITBIN = '/usr/bin/git' diff --git a/man/grok-dumb-pull.1 b/man/grok-dumb-pull.1 index 749d83c..f7f0b9f 100644 --- a/man/grok-dumb-pull.1 +++ b/man/grok-dumb-pull.1 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH GROK-DUMB-PULL 1 "2018-04-18" "1.1.0" "" +.TH GROK-DUMB-PULL 1 "2019-02-14" "1.2.0" "" .SH NAME GROK-DUMB-PULL \- Update git repositories not managed by grokmirror . diff --git a/man/grok-dumb-pull.1.rst b/man/grok-dumb-pull.1.rst index fcfe063..17f4afc 100644 --- a/man/grok-dumb-pull.1.rst +++ b/man/grok-dumb-pull.1.rst @@ -5,10 +5,10 @@ Update git repositories not managed by grokmirror ------------------------------------------------- :Author: mricon@kernel.org -:Date: 2018-04-18 +:Date: 2019-02-14 :Copyright: The Linux Foundation and contributors :License: GPLv3+ -:Version: 1.1.0 +:Version: 1.2.0 :Manual section: 1 SYNOPSIS diff --git a/man/grok-fsck.1 b/man/grok-fsck.1 index 66f4417..6ce167e 100644 --- a/man/grok-fsck.1 +++ b/man/grok-fsck.1 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH GROK-FSCK 1 "2018-04-18" "1.1.0" "" +.TH GROK-FSCK 1 "2019-02-14" "1.2.0" "" .SH NAME GROK-FSCK \- Check mirrored repositories for corruption . @@ -65,6 +65,10 @@ Force immediate run on all repositories. .BI \-c \ CONFIG\fP,\fB \ \-\-config\fB= CONFIG Location of fsck.conf .TP +.B \-\-repack\-only +Only find and repack repositories that need +optimizing (nightly run mode) +.TP .B \-\-connectivity (Assumes \-\-force): Run git fsck on all repos, but only check connectivity @@ -82,8 +86,8 @@ but only check connectivity Locate fsck.conf and modify it to reflect your needs. The default configuration file is heavily commented. .sp -Set up a cron job to run nightly and to email any discovered errors to -root: +Set up a cron job to run nightly for quick repacks, and weekly for fsck +checks: .INDENT 0.0 .INDENT 3.5 .sp @@ -91,8 +95,10 @@ root: .ft C # Make sure MAILTO is set, for error reports MAILTO=root -# Run nightly, at 2AM -00 02 * * * mirror /usr/bin/grok\-fsck \-c /etc/grokmirror/fsck.conf +# Run nightly repacks to optimize the repos +0 2 1\-6 * * mirror /usr/bin/grok\-fsck \-c /etc/grokmirror/fsck.conf \-\-repack\-only +# Run weekly fsck checks on Sunday +0 2 0 * * mirror /usr/bin/grok\-fsck \-c /etc/grokmirror/fsck.conf .ft P .fi .UNINDENT @@ -108,8 +114,8 @@ of all repositories. To make this process faster, you can use: .IP \(bu 2 \fB\-\-repack\-all\-quick\fP: do a quick repack of all repositories .IP \(bu 2 -\fB\-\-repack\-all\-full\fP: if you have \fBfull_repack_flags\fP defined in -the configuration file, trigger a full repack of every repository. +\fB\-\-repack\-all\-full\fP: if you have \fBextra_repack_flags_full\fP defined +in the configuration file, trigger a full repack of every repository. This can be handy if you need to bring up a newly cloned mirror and want to make sure it\(aqs repacked and all bitmaps are built before serving content. diff --git a/man/grok-fsck.1.rst b/man/grok-fsck.1.rst index e15734e..548a0a0 100644 --- a/man/grok-fsck.1.rst +++ b/man/grok-fsck.1.rst @@ -5,10 +5,10 @@ Check mirrored repositories for corruption ------------------------------------------ :Author: mricon@kernel.org -:Date: 2018-04-18 +:Date: 2019-02-14 :Copyright: The Linux Foundation and contributors :License: GPLv3+ -:Version: 1.1.0 +:Version: 1.2.0 :Manual section: 1 SYNOPSIS @@ -33,6 +33,8 @@ OPTIONS -f, --force Force immediate run on all repositories. -c CONFIG, --config=CONFIG Location of fsck.conf + --repack-only Only find and repack repositories that need + optimizing (nightly run mode) --connectivity (Assumes --force): Run git fsck on all repos, but only check connectivity --repack-all-quick (Assumes --force): Do a quick repack of all repos @@ -43,13 +45,15 @@ EXAMPLES Locate fsck.conf and modify it to reflect your needs. The default configuration file is heavily commented. -Set up a cron job to run nightly and to email any discovered errors to -root:: +Set up a cron job to run nightly for quick repacks, and weekly for fsck +checks:: # Make sure MAILTO is set, for error reports MAILTO=root - # Run nightly, at 2AM - 00 02 * * * mirror /usr/bin/grok-fsck -c /etc/grokmirror/fsck.conf + # Run nightly repacks to optimize the repos + 0 2 1-6 * * mirror /usr/bin/grok-fsck -c /etc/grokmirror/fsck.conf --repack-only + # Run weekly fsck checks on Sunday + 0 2 0 * * mirror /usr/bin/grok-fsck -c /etc/grokmirror/fsck.conf You can force a full run using the ``-f`` flag, but unless you only have a few smallish git repositories, it's not recommended, as it may take @@ -58,8 +62,8 @@ of all repositories. To make this process faster, you can use: * ``--connectivity``: when doing fsck, only check object connectivity * ``--repack-all-quick``: do a quick repack of all repositories -* ``--repack-all-full``: if you have ``full_repack_flags`` defined in - the configuration file, trigger a full repack of every repository. +* ``--repack-all-full``: if you have ``extra_repack_flags_full`` defined + in the configuration file, trigger a full repack of every repository. This can be handy if you need to bring up a newly cloned mirror and want to make sure it's repacked and all bitmaps are built before serving content. diff --git a/man/grok-manifest.1 b/man/grok-manifest.1 index 20bdef8..b811b0f 100644 --- a/man/grok-manifest.1 +++ b/man/grok-manifest.1 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH GROK-MANIFEST 1 "2018-04-18" "1.1.0" "" +.TH GROK-MANIFEST 1 "2019-02-14" "1.2.0" "" .SH NAME GROK-MANIFEST \- Create manifest for use with grokmirror . diff --git a/man/grok-manifest.1.rst b/man/grok-manifest.1.rst index e3b548b..d6c0cdc 100644 --- a/man/grok-manifest.1.rst +++ b/man/grok-manifest.1.rst @@ -5,10 +5,10 @@ Create manifest for use with grokmirror --------------------------------------- :Author: mricon@kernel.org -:Date: 2018-04-18 +:Date: 2019-02-14 :Copyright: The Linux Foundation and contributors :License: GPLv3+ -:Version: 1.1.0 +:Version: 1.2.0 :Manual section: 1 SYNOPSIS diff --git a/man/grok-pull.1 b/man/grok-pull.1 index 79f5b35..812b6ee 100644 --- a/man/grok-pull.1 +++ b/man/grok-pull.1 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH GROK-PULL 1 "2018-04-18" "1.1.0" "" +.TH GROK-PULL 1 "2019-02-14" "1.2.0" "" .SH NAME GROK-PULL \- Clone or update local git repositories . diff --git a/man/grok-pull.1.rst b/man/grok-pull.1.rst index cb031a4..2bd48e9 100644 --- a/man/grok-pull.1.rst +++ b/man/grok-pull.1.rst @@ -5,10 +5,10 @@ Clone or update local git repositories -------------------------------------- :Author: mricon@kernel.org -:Date: 2018-04-18 +:Date: 2019-02-14 :Copyright: The Linux Foundation and contributors :License: GPLv3+ -:Version: 1.1.0 +:Version: 1.2.0 :Manual section: 1 SYNOPSIS @@ -19,7 +19,7 @@ import os from setuptools import setup NAME = 'grokmirror' -VERSION = '1.2' +VERSION = '1.2.0' # Utility function to read the README file. |