Skip to content

owsync: add file synchronization daemon - #29136

Open
pgaufillet wants to merge 1 commit into
openwrt:masterfrom
pgaufillet:add-owsync
Open

pgaufillet wants to merge 1 commit into
openwrt:masterfrom
pgaufillet:add-owsync

Conversation

@pgaufillet

@pgaufillet pgaufillet commented Apr 12, 2026

Copy link
Copy Markdown

📦 Package Details

Maintainer: @pgaufillet

Description:
Add owsync, a lightweight bidirectional file synchronization daemon designed for multi-router OpenWrt deployments.

Features:

  • Multi-master bidirectional sync over TCP
  • AES-256-GCM encryption (optional, menuconfig toggle)
  • SHA-256 content-based change detection
  • Tombstone-based deletion tracking across reboots
  • Atomic file operations (write-to-tmp + rename)
  • Clock skew protection (aborts if >60s drift)
  • Glob patterns for include/exclude filtering

Primary use case: synchronizing /etc/config between redundant routers. Also useful for multi-AP deployments, fleet management, or any scenario where config files must stay in sync.

No dependency on other HA packages — can be merged independently.

Part of the OpenWrt HA cluster proposal:

Source: https://github.com/pgaufillet/owsync (v1.3.0)


🧪 Run Testing Details

  • OpenWrt Version: 24.10 and 25.12
  • OpenWrt Target/Subtarget: x86/64, mediatek/filogic
  • OpenWrt Device: Generic x86_64 VM, ASUS TUF Gaming AX4200

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Commit checks

  • 69db67b "owsync: add file synchronization daemon" — body states Dependencies: libjson-c (required), libopenssl (optional), but DEPENDS also pulls in rpcd; list it there too.

Generated by Claude Code

Comment thread net/owsync/files/owsync.rpcd Outdated
Comment thread net/owsync/files/owsync.rpcd Outdated
Comment thread net/owsync/files/owsync.rpcd Outdated
Comment thread net/owsync/files/owsync.rpcd Outdated
Comment thread net/owsync/Makefile Outdated
Comment thread net/owsync/Makefile Outdated
pgaufillet added a commit to pgaufillet/openwrt-ha-feed that referenced this pull request Sep 20, 2026
The status handler read UCI from the wrong section/option
('config'/'sync_dir' instead of the shipped 'general'/'dir') and
defaulted the DB path to /var/lib/owsync, a tmpfs path never created by
the package. On ha-cluster nodes it also never found the runtime config,
so peer_count and encryption were always 0/false.

Resolve the config from the running daemon's -c/--config argument, read
the correct UCI section/option, and fix the peer_count fallback. Add
field-level assertions to the T01 status test.

Reported in the openwrt/packages#29136 review.
pgaufillet added a commit to pgaufillet/openwrt-ha-feed that referenced this pull request Sep 20, 2026
A conffiles directory entry needs a trailing slash, otherwise opkg
treats it as a plain file and does not preserve the directory contents.

Reported in the openwrt/packages#29136 review.
Comment thread net/owsync/files/owsync.rpcd
Add owsync, a lightweight bidirectional file synchronization
daemon designed for multi-router OpenWrt deployments.

Features:
- Multi-master bidirectional sync over TCP
- AES-256-GCM encryption (optional, menuconfig toggle)
- SHA-256 content-based change detection
- Tombstone-based deletion tracking across reboots
- Atomic file operations (write-to-tmp + rename)
- Clock skew protection (aborts if >60s drift)
- Glob patterns for include/exclude filtering

Primary use case: synchronizing /etc/config between redundant
routers. Also useful for multi-AP deployments, fleet management,
or any scenario where config files must stay in sync.

No dependency on other HA packages — can be merged independently.

Dependencies: rpcd (required), libjson-c (required), libopenssl (optional)
Binary size: ~150KB stripped, ~2MB RAM

Source: https://github.com/pgaufillet/owsync (v1.3.0)
Tested on: OpenWrt 24.10 and 25.12 (x86_64 + filogic), production.

Signed-off-by: Pierre Gaufillet <pierre.gaufillet@bergamote.eu>

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed 1 new commit; no new issues found.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants