Skip to content

Commit 1c825b8

Browse files
authored
Merge pull request #6787 from chu11/issue6589_flux_fsck_basic
Support new flux-fsck tool to check integrity of content store
2 parents 52d9d80 + c2206e8 commit 1c825b8

File tree

9 files changed

+497
-17
lines changed

9 files changed

+497
-17
lines changed

doc/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ MAN1_FILES_PRIMARY = \
2626
man1/flux-getattr.1 \
2727
man1/flux-dmesg.1 \
2828
man1/flux-dump.1 \
29+
man1/flux-fsck.1 \
2930
man1/flux-archive.1 \
3031
man1/flux-content.1 \
3132
man1/flux-config.1 \

doc/man1/flux-fsck.rst

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
============
2+
flux-fsck(1)
3+
============
4+
5+
6+
SYNOPSIS
7+
========
8+
9+
**flux** **fsck** [*OPTIONS*]
10+
11+
12+
DESCRIPTION
13+
===========
14+
15+
.. program flux fsck
16+
17+
The :program:`flux fsck` checks the integrity of the KVS backing
18+
store, starting with the most recent checkpoint (root version) written
19+
to the backing store.
20+
21+
22+
OPTIONS
23+
=======
24+
25+
.. option:: -h, --help
26+
27+
Summarize available options.
28+
29+
.. option:: -v, --verbose
30+
31+
List keys on stderr as they are validated.
32+
33+
.. option:: -q, --quiet
34+
35+
Don't output diagnostic messages and discovered errors.
36+
37+
38+
EXIT STATUS
39+
===========
40+
41+
0
42+
Content store valid
43+
44+
1
45+
One or more errors were discovered
46+
47+
48+
RESOURCES
49+
=========
50+
51+
.. include:: common/resources.rst
52+
53+
54+
FLUX RFC
55+
========
56+
57+
:doc:`rfc:spec_10`
58+
59+
:doc:`rfc:spec_11`
60+
61+
62+
SEE ALSO
63+
========
64+
65+
:man1:`flux-content`, :man1:`flux-kvs`

doc/manpages.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
('man1/flux-cron', 'flux-cron', 'Cron-like utility for Flux', [author], 1),
3131
('man1/flux-dmesg', 'flux-dmesg', 'access broker ring buffer', [author], 1),
3232
('man1/flux-dump', 'flux-dump', 'Write KVS snapshot to portable archive', [author], 1),
33+
('man1/flux-fsck', 'flux-fsck', 'Check integrity of KVS backing store', [author], 1),
3334
('man1/flux-env', 'flux-env', 'Print the flux environment or execute a command inside it', [author], 1),
3435
('man1/flux-event', 'flux-event', 'Send and receive Flux events', [author], 1),
3536
('man1/flux-exec', 'flux-exec', 'Execute processes across flux ranks', [author], 1),

doc/test/spell.en.pws

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -968,3 +968,4 @@ UWjZ
968968
YQ
969969
composable
970970
orchestrator
971+
fsck

src/cmd/Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ flux_SOURCES = \
7979
builtin/archive.c \
8080
builtin/pmi.c \
8181
builtin/shutdown.c \
82-
builtin/lptest.c
82+
builtin/lptest.c \
83+
builtin/fsck.c
8384
nodist_flux_SOURCES = \
8485
builtin-cmds.c
8586
dist_bin_SCRIPTS = flux-python

src/cmd/builtin/dump.c

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,20 @@ void read_error (const char *fmt, ...)
6464

6565
static void progress_notify (flux_t *h)
6666
{
67-
if (sd_notify_flag) {
68-
flux_future_t *f;
69-
char buf[64];
70-
71-
snprintf (buf,
72-
sizeof (buf),
73-
"flux-dump(1) has archived %d keys",
74-
keycount);
75-
f = flux_rpc_pack (h,
76-
"state-machine.sd-notify",
77-
FLUX_NODEID_ANY,
78-
FLUX_RPC_NORESPONSE,
79-
"{s:s}",
80-
"status", buf);
81-
flux_future_destroy (f);
82-
}
67+
flux_future_t *f;
68+
char buf[64];
69+
70+
snprintf (buf,
71+
sizeof (buf),
72+
"flux-dump(1) has archived %d keys",
73+
keycount);
74+
f = flux_rpc_pack (h,
75+
"state-machine.sd-notify",
76+
FLUX_NODEID_ANY,
77+
FLUX_RPC_NORESPONSE,
78+
"{s:s}",
79+
"status", buf);
80+
flux_future_destroy (f);
8381
}
8482

8583
static void progress (flux_t *h, int delta_keys)

0 commit comments

Comments
 (0)