You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The latest tor upgrade revealed a problem:
when upgrading, tor instances are properly stopped, but are not started again.
This is my current understanding of the root-cause:
Tor instances are stopped by prerm:
if [ -x "/etc/init.d/tor" ]; then
invoke-rc.d tor stop || tor_error_init
fi
and started by postinst:
if [ -x "/etc/init.d/tor" ]; then
update-rc.d tor defaults >/dev/null
invoke-rc.d tor start || tor_error_init
fi
Starting tor.service does not start multi-instance services due to the semantics of PartOf= (which is only relevant in the context of stop and restart actions, but not for start):
PartOf=
Configures dependencies similar to Requires=, but limited to stopping and restarting of units. When systemd stops or restarts the units listed here, the action is propagated to this unit. Note
that this is a one-way dependency changes to this unit do not affect the listed units.
Another relevant point here is that our instances are named after IP addresses and ORports:
IP_port
and therefore include non-alphanumeric characters (i.e. "_").
Adding "." and "_" to the allowed characters should be fine since tor-instance-create invokes adduser with "--force-badname" already.
I'll ask the maintainer whether this change is acceptable or has any other unwanted side effects, but we havn't had any problems with these service names in a long time.
The text was updated successfully, but these errors were encountered:
One can override the maintainers generator starting with systemd 219 - so the fix is trivial on Debian Testing and Ubuntu 16.04.
Systemd in Debian Jessie (215) is to old for that feature, so we use Martin Pitt's (Debian Developer) suggestion to solve it on Debian Jessie via dpkg-statoverride: https://lists.freedesktop.org/archives/systemd-devel/2016-August/037367.html
The latest tor upgrade revealed a problem:
when upgrading, tor instances are properly stopped, but are not started again.
This is my current understanding of the root-cause:
Tor instances are stopped by prerm:
and started by postinst:
Starting tor.service does not start multi-instance services due to the semantics of PartOf= (which is only relevant in the context of stop and restart actions, but not for start):
Another relevant point here is that our instances are named after IP addresses and ORports:
IP_port
and therefore include non-alphanumeric characters (i.e. "_").
This is relevant because the generator, that solves the "PartOf= does not cover the start case" problem, filters non-alphanumeric instance names.
https://gitweb.torproject.org/debian/tor.git/tree/debian/systemd/tor-generator
Adding "." and "_" to the allowed characters should be fine since tor-instance-create invokes adduser with "--force-badname" already.
I'll ask the maintainer whether this change is acceptable or has any other unwanted side effects, but we havn't had any problems with these service names in a long time.
The text was updated successfully, but these errors were encountered: