Config file updates are not recognized by rsync deployment

Continuing the discussion from Config file updates aren't recognized by gitlab/rsync deployment:

I just ran into that problem mentioned in the previous post with rsync. I think the way openhab4 recognizes config changes has been modified in a way that my previous ansible setup with “ansible.posix.synchronize” (which uses rsync) did not work anymore. I assume it has something to do with how rsync uses temporary files to transfer data to the remote host. I could reproduce the it with rync alone. When I rsynced a single file the changes where not recognized and I con an error in openhab.log:

2023-07-27 20:25:43.314 [WARN ] [re.internal.service.WatchServiceImpl] - Detected invalid event (hash must not be null for CREATE/MODIFY): DirectoryChangeEvent{eventType=CREATE, isDirectory=false, path=/etc/openhab/items/.pv.items.LjJwr3, count=1, rootPath=/etc/openhab, hash=(null)}

.pv.items.LjJwr3 in this case is the temporary file created by rsync to initially transfer the file to the host before moving it into place - here pv.items.

The “fix” to make it work again was to call rsync with the option “–inplace” which changes how files are transferred (see rsync manpage).

Hope the helps anyone having the same issue with their setup.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.