[PR #609] [CLOSED] Ensure files are written to disk before symlink #869

Closed
opened 2025-12-29 01:29:44 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dehydrated-io/dehydrated/pull/609
Author: @frankvanbever
Created: 11/30/2018
Status: Closed

Base: masterHead: bug-sync-issue


📝 Commits (1)

  • 2675684 Add hook to allow sync before symlinking files

📊 Changes

2 files changed (+27 additions, -1 deletions)

View changed files

📝 dehydrated (+3 -0)
📝 docs/examples/hook.sh (+24 -1)

📄 Description

We encountered an issue on a device using UBIFS where if a power cycle
happens close enough after invoking dehydrated only the metadata would
have been written and the symlink points to an empty file e.g.

-rw------- 1 root root 0 Nov 30 13:20 chain-1543580304.pem
lrwxrwxrwx 1 root root 20 Nov 30 13:20 chain.pem -> chain-1543580304.pem
-rw------- 1 root root 0 Nov 30 13:20 fullchain-1543580304.pem
lrwxrwxrwx 1 root root 24 Nov 30 13:20 fullchain.pem -> fullchain-1543580304.pem

Forcing a sync of the symlinked files prevents this from occurring.

Signed-off-by: Frank Vanbever frank.vanbever@essensium.com


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dehydrated-io/dehydrated/pull/609 **Author:** [@frankvanbever](https://github.com/frankvanbever) **Created:** 11/30/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `bug-sync-issue` --- ### 📝 Commits (1) - [`2675684`](https://github.com/dehydrated-io/dehydrated/commit/267568467a74979886510f97265b4b28af4629dd) Add hook to allow sync before symlinking files ### 📊 Changes **2 files changed** (+27 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `dehydrated` (+3 -0) 📝 `docs/examples/hook.sh` (+24 -1) </details> ### 📄 Description We encountered an issue on a device using UBIFS where if a power cycle happens close enough after invoking dehydrated only the metadata would have been written and the symlink points to an empty file e.g. -rw------- 1 root root 0 Nov 30 13:20 chain-1543580304.pem lrwxrwxrwx 1 root root 20 Nov 30 13:20 chain.pem -> chain-1543580304.pem -rw------- 1 root root 0 Nov 30 13:20 fullchain-1543580304.pem lrwxrwxrwx 1 root root 24 Nov 30 13:20 fullchain.pem -> fullchain-1543580304.pem Forcing a sync of the symlinked files prevents this from occurring. Signed-off-by: Frank Vanbever <frank.vanbever@essensium.com> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 01:29:44 +01:00
adam closed this issue 2025-12-29 01:29:45 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dehydrated#869