Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't Panic in getComposeStatus and skip invalid jobs in fsjobqueue New #3785

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

bcl
Copy link
Contributor

@bcl bcl commented Nov 7, 2023

This handles corrupt job json files by skipping them. They still exist, and errors are logged, but the system keeps working.

If one or more of the json files in /var/lib/osbuild-composer/jobs/ becomes corrupt they can stop the osbuild-composer service from starting, or stop commands like 'composer-cli compose status' from working because they quit on the first error and miss any job that aren't broken.

This pull request includes:

  • adequate testing for the new functionality or fixed issue
  • adequate documentation informing people about the change such as

@bcl
Copy link
Contributor Author

bcl commented Nov 7, 2023

This 'fixes' #3779 by ignoring broken job json files. The big question is what to do with them. Should they be removed? Moved to the side for later examination (and somehow expired before the filesystem fills up)? Or leave them in place (and fill up the filesystem eventually).

Copy link
Collaborator

@schutzbot schutzbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ This PR introduces changes in at least one manifest (when comparing PR HEAD 4aa137d with the main merge-base d68abf3). Please review the changes. The changes can be found in the artifacts of the Manifest-diff job [0] as manifests.diff.

[0] https://gitlab.com/redhat/services/products/image-builder/ci/osbuild-composer/-/jobs/5473168835/artifacts/browse

@croissanne
Copy link
Member

Rebased to prevent OCI private key leaking. Apologies :(

@bcl bcl force-pushed the main-dont-panic branch from bc93135 to cdcfaa5 Compare November 7, 2023 22:51
@bcl bcl marked this pull request as ready for review November 8, 2023 18:59
@bcl bcl force-pushed the main-dont-panic branch 4 times, most recently from 6bdfce7 to 5ed1bc2 Compare November 15, 2023 16:17
@bcl bcl requested a review from ondrejbudai November 17, 2023 23:10
This handles corrupt job json files by skipping them. They still exist,
and errors are logged, but the system keeps working.

If one or more of the json files in /var/lib/osbuild-composer/jobs/
becomes corrupt they can stop the osbuild-composer service from
starting, or stop commands like 'composer-cli compose status' from
working because they quit on the first error and miss any job that
aren't broken.
Copy link
Member

@ondrejbudai ondrejbudai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely, thanks! I took the liberty of removing the merge commit from the branch, so we can merge this asap.

@ondrejbudai ondrejbudai enabled auto-merge (rebase) November 20, 2023 09:35
@ondrejbudai ondrejbudai merged commit aca748b into osbuild:main Nov 20, 2023
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants