Yannik/ansible-role-rsnapshot-backup-host

Patch rsnapshot to report rsync errors fails

Closed this issue · 6 comments

The patch rsnapshot task fails with:

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: 2 out of 2 hunks ignored
fatal: [192.168.2.174]: FAILED! => {"changed": false, "msg": "Reversed (or previously applied) patch detected!  Skipping patch.\n2 out of 2 hunks ignored\n"}
  • If the patch is already applied, I would have expected the task to skip.
  • I can't see a way of manually skipping the task
Yannik commented

I cannot reproduce this issue. What is your os and rsnapshot version?

Please provide exact steps to reproduce this.

The ansible control node is my desktop PC, running Debian testing. The host where rsnapshot runs is my NAS, running Raspbian OS (bullseye). rsnapshot 1.4.5-1~bpo11+1. The rsnapshot remote is the desktop again.

When I run the play, ansible tries to patch rsnapshot on the NAS, and fails with the above error.

Yannik commented

Does this error occur on the first run (after a fresh OS install)? Or only on subsequent runs?

Please attach your rsnapshot binary both after a fresh OS install and after the ansible run.

I just took a copy of /usr/bin/rsnapshot, then sudo apt install --reinstall rsnapshot. The two were identical. I've attached it for reference (added .txt so that Github would upload it).
rsnapshot.txt

I don't want to do a completely fresh OS install, as it would take too long to set things up again. Does ansible store state anywhere so that it can tell whether a play has run before?

I did run the play with --check a couple of times before the first proper run, when it then failed. Since then, I have commented out the task.

After the above reinstall, uncommented the task and ran the play, and got the error again.

Yannik commented

@carygravel Please try the latest commit, it should fix this issue. (Caused by a upstream change to the rsnapshot binary in bullseye-backports)

Confirmed. Thanks for the fix.