ostree/apidoc
Jason Wessel b709c3c67b fsck: Implement a partial commit reason bitmask
After the corruption has been fixed with "ostree fsck -a --delete", a
second run of the "ostree fsck" command will print X partial commits
not verified and exit with a zero.

The zero exit code makes it hard to detect if a repair operation needs
to be run.  When ever fsck creates a partial commit it should add a
reason for the partial commit to the state file found in
state/<hash>.commitpartial.  This will allow a future execution of the
fsck to still return an error indicating that the repository is still
in the damaged state, awaiting repair.

Additional reason codes could be added in the future for why a partial
commit exists.

Text from: https://github.com/ostreedev/ostree/pull/1880
====
cgwalters commented:

To restate, the core issue is that it's valid to have partial commits
for reasons other than fsck pruned bad objects, and libostree doesn't
have a way to distinguish.

Another option perhaps is to write e.g. fsck-partial into the
statefile state/<hash>.commitpartial which would mean "partial, and
expected to exist but was pruned by fsck" and fsck would continue to
error out until the commit was re-pulled. Right now the partial stamp
file is empty, so it'd be fully compatible to write a rationale into
it.
====

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>

Closes: #1910
Approved by: cgwalters
2019-09-09 13:40:36 +00:00
..
.gitignore docs: Get API docs working again 2016-06-09 18:15:49 +00:00
Makefile.am lib/kargs: Make API public and upstream new rpm-ostree APIs 2019-06-18 14:29:14 +00:00
ostree-docs.xml docs: Get API docs working again 2016-06-09 18:15:49 +00:00
ostree-experimental-sections.txt Make P2P API public (no longer experimental) 2018-06-04 19:20:10 +00:00
ostree-sections.txt fsck: Implement a partial commit reason bitmask 2019-09-09 13:40:36 +00:00