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

cockpit-certificate-ensure: soften the certificate generation #21069

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jmlemetayer
Copy link

I use cockpit in an embedded device, and it can happen that the power is suddenly cut off. So the file system is not synchronized and the last file system actions are lost.

If generating the self-signed certificate was one of them, you end up with empty files. And the next time you reboot, cockpit won't be able to start because cockpit-certificate-ensure will fail.

These commits prevent failure on empty files and force a new generation. In addition, we explicitly request file system synchronization after generation.

@jmlemetayer jmlemetayer marked this pull request as draft October 3, 2024 07:07
Certificate generation now works in the following cases
 - Certificate and key files do not exist.
 - Only the certificate file does not exist.
 - Only the key file does not exist.
 - The certificate file is empty.
 - The key file is empty.
@jmlemetayer jmlemetayer force-pushed the fix-cockpit-certificate-ensure branch from 4a8a6cc to e44a7b3 Compare October 3, 2024 14:39
@jmlemetayer jmlemetayer marked this pull request as ready for review October 3, 2024 14:46
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.

1 participant