[Debian-ha-maintainers] Bug#807428: Bug#807428: csync2: socket activation and running as system user

Dhionel Díaz ddiaz at cenditel.gob.ve
Tue Jul 26 20:15:21 UTC 2016


El 22/06/16 a las 09:00, Dhionel Díaz escribió:
> El 21/06/16 a las 16:36, Ferenc Wágner escribió:
>> Christoph Berg <myon at debian.org> writes:
>>
>>> Re: Dhionel Díaz 2016-06-21 <0c44f8f5-4d46-60e7-2bc3-d1695686953a at cenditel.gob.ve>
>>>
>>>>> What about depending on inetd | systemd-sysv and invoking update-inetd
>>>>> only if systemd is not running?
>>>
>>> Doesn't that fail if the system is switched to/from systemd after the
>>> package was already installed?
>>
>> Sure it does.  But if you do both, one (probably inetd, coming later)
>> will fail to bind if systemd manages the socket and also starts inetd.
>> Hmm, maybe you could have the csync2.socket conflict with inet.service
>> to avoid this failure mode...  That would serve csync2 via inetd instead
>> of systemd, which is inefficient, but maybe acceptable.
>>
>>>>> Don't forget to depend on update-inetd as well.
>>>>
>>>> Looks reasonable, in the following days I'll be sending a patch along
>>>> those lines. In a brief exploration I haven't found if there is a
>>>> recommended approach to detect systemd, do you think a test on the exit
>>>> status of 'stat -c %N /proc/1/exe | grep systemd' would be appropriate?
>>>
>>> The canonical test is "test -d /run/systemd/system".
>>
>> Which is also more portable than using /proc.  Not that you could find
>> systemd where procsfs isn't supported...
>>
> What about enabling only one of the options at install time? In that
> way, the conflicts can be avoided.
> 
> In case of a switch to systemd the daemon could still be handled by
> inetd with the same configuration placed at install time, because the
> socket unit would remain disabled. I don't know the details of a switch
> to systemd, but I think that it would also be feasible to switch the
> daemon to systemd socket activation as part of that process, if that is
> considered appropriate. I'm not sure about the case of a switch to
> sysv-init, though. Would systemd remain as a sysv service in that case?
> 

Attached you will find a patch that implements the approach described
above; the socket unit is not enabled at install time, in order to avoid
conflicts. I hope the patch can be useful.

Regards,

-- 
Dhionel Díaz
Centro Nacional de Desarrollo e Investigación en Tecnologías Libres
Ministerio del Poder Popular para
Educación Universitaria, Ciencia y Tecnología
-------------- next part --------------
A non-text attachment was scrubbed...
Name: csync2_systemd_01.patch
Type: text/x-patch
Size: 5134 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-ha-maintainers/attachments/20160726/a15c6a77/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/debian-ha-maintainers/attachments/20160726/a15c6a77/attachment.sig>


More information about the Debian-ha-maintainers mailing list