FS#40598 - [rsync] Chain after network.target

Attached to Project: Arch Linux
Opened by Davy Kager (dkager) - Thursday, 29 May 2014, 17:19 GMT
Last edited by Pierre Schmitz (Pierre) - Thursday, 03 July 2014, 18:35 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Pierre Schmitz (Pierre)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
The systemd service for rsync (rsyncd.service) doesn't explicitly chain itself. This wasn't a problem for me when using netctl, but after switching to systemd-networkd rsync fails to bind when enabled on boot:
May 29 16:46:22 sharna rsyncd[223]: unable to bind any inbound sockets on port 873
May 29 16:46:22 sharna rsyncd[223]: rsync error: error in socket IO (code 10) at socket.c(555) [Receiver=3.1.0]

This is fixed by:
After=network.target
in the [Unit] section of the service file.


Additional info:
* package version: rsync-3.1.0-2


Steps to reproduce:
* Add "address = 1.2.3.4" to /etc/rsyncd.conf.
* Enable rsyncd.service in systemd.
* Reboot.
This task depends upon

Closed by  Pierre Schmitz (Pierre)
Thursday, 03 July 2014, 18:35 GMT
Reason for closing:  Fixed
Comment by Johannes Löthberg (demize) - Monday, 02 June 2014, 20:48 GMT
Might want to consider using network-online.target instead of network.target.
Comment by Davy Kager (dkager) - Tuesday, 03 June 2014, 06:54 GMT
Good point, but then this would also have to be applied to the myriad other packages that are currently using network.target (if only to maintain consistency).
Also network-online.target doesn't seem to do much out-of-the-box for me:
[root@sharna~]# systemctl status network-online.target
? network-online.target - Network is Online
Loaded: loaded (/usr/lib/systemd/system/network-online.target; static)
Active: inactive (dead)
Comment by Johannes Löthberg (demize) - Tuesday, 03 June 2014, 07:02 GMT
http://www.freedesktop.org/software/systemd/man/systemd.special.html#network-online.target will likely explain it better than I could.

For networkd you'd use systemd-networkd-wait-online to provide network-online, networkmanager has it's own service for the same thing and I think there's a netctl one too.
Comment by Davy Kager (dkager) - Tuesday, 03 June 2014, 18:08 GMT
Oh hey, I was aware of the one for NetworkManager, not the one for networkd. Still, the point about consistency with other packages remains. I'd say network.target is a good (temporary) fix until/unless people decide to migrate as much as possible to network-online.target. This might also prevents some confusion caused by rsync starting later (at network-online) than the rest (at network).
Comment by Davy Kager (dkager) - Thursday, 26 June 2014, 10:40 GMT
Saw that rsync-3.1.1-1 just landed in [extra]. This chaining problem still exists for rsyncd.service, but not for rsyncd@.service.

Loading...