[Bug 656259] New: systemd does not provide headers / lib usable in daemons
https://bugzilla.novell.com/show_bug.cgi?id=656259 https://bugzilla.novell.com/show_bug.cgi?id=656259#c0 Summary: systemd does not provide headers / lib usable in daemons Classification: openSUSE Product: openSUSE 11.4 Version: Factory Platform: All OS/Version: Other Status: NEW Severity: Critical Priority: P5 - None Component: Basesystem AssignedTo: kasievers@novell.com ReportedBy: mt@novell.com QAContact: qa@suse.de CC: radmanic@novell.com, coolo@novell.com, ro@novell.com, werner@novell.com, pczanik@genesi-usa.com, kasievers@novell.com Blocks: 656104 Found By: --- Blocker: --- +++ This bug was initially created as a clone of Bug #656104 +++ (In reply to bug #656104 comment #3)
I'm missing /usr/include/sd-daemon.h and also /lib/libsd-daemon.so.0.13 toghether with /usr/lib{64}/libsd-daemon.so ... otherwise the stuff will not build nor link:
syslogd/sysklogd-1.4.1> wdiff syslogd.c | grep sd_ + r = sd_listen_fds(0); + r = sd_is_socket_unix(fd, SOCK_DGRAM, -1, _PATH_LOG, 0);
... please provide an appropiate systemd-devel as well as a libsd-daemon0.rpm ;)
(In reply to bug #656104 comment #4)
Na, there is no lib, and none planned to have so far. That's why it's not installed. It's just 2 files to copy into the project. They contain very basic logic. The logic can be open-coded too, if necessary.
We will get into dependency problems if we make all services link directly against systemd at that point.
That can be reconsidered later, when there might be more interesting things than gentenv() and stat() to do. :)
(In reply to bug #656104 comment #5)
IMHO this is will cause trouble ... beside policy and license ... the interface may change. And it makes no sence to include the same stuff several times into the source tree. Only one error and you have to change any occurrence of sd-daemon.c. This is the job for a shared library and nothing else.
(In reply to bug #656104 comment #6)
It's included in a ton of projects already, also in rsyslog. And it's BSD licensed.
Anyway not my call, I can just provide what I have, and I don't have a shared lib, and upstream did not want one as of now. That might all be reconsidered later.
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c1
Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c2
Kay Sievers
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c3
--- Comment #3 from Kay Sievers
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c4
--- Comment #4 from Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c5
--- Comment #5 from Marius Tomaschewski
Note: In case you don't like to include the current convenience files, just use getenv("LISTEN_FDS") -- the needed functionality is not really much more than this.
What you propose is to _reimplement_ all what the library in question is doing: The lib _is_ using getenv("LISTEN_FDS") + tons of checks, that I've to implement then. No, thanks! You just need to extract the recent Makefile.am changes from git master that build the library already and change from "noinst_" to "lib_" to install the library -- everything needed there. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c6
--- Comment #6 from Kay Sievers
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c7
Stephan Kulow
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c
Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c8
--- Comment #8 from Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c9
--- Comment #9 from Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c10
--- Comment #10 from Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c11
--- Comment #11 from Kay Sievers
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c12
--- Comment #12 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c13
--- Comment #13 from Kay Sievers
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c14
--- Comment #14 from Kay Sievers
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c15
--- Comment #15 from Kay Sievers
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c16
--- Comment #16 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c17
--- Comment #17 from Marius Tomaschewski
Third-party scripts run in compat mode and can not make use of socket-activation.
They can, they do already, and it works well. (In reply to comment #14)
One of the main goals of systemd is to get rind of the piles of crap accumulated in sysv scripts and /etc/sysconfig/. The SUSE syslog script is a fine example of what we really don't want to see anymore.
But you'll see it on 11.4 :-) We may either write a /sbin/syslog-daemon wrapper in C allowing to switch between the daemons or adopt all syslog daemon packages to conflict with each other so every one can install a syslog.service file. But all this will definitively not happen for 11.4. Except you do it yourself, became bugowner of all syslog daemons and it will be accepted for 11.4... (In reply to comment #15)
Fedora even disallows packaging sysv scripts in RPMs now. So we can not expect any upstream support for hacks like faking the systemd provided socket passing properties across forking processes. That's really not how things are meant to be done in systemd land.
These 2 functions are *required* to implement this functionality in Type=forking service. When you don't like it, we can also revert all the changes in all the syslog-daemons and wait until there is a lib providing this functionality. See also comment 7.
Please use the old sysv scripts and leave the limited functionality as it is,
There is _no_ limited functionality. The socket activation works out-of-the box with the init script -- you'd see it, when you'd read the lsof output in bug 656104 comment 21 I mentioned above.
or use native service files if systemd features are wanted.
Definitively not for 11.4, see above. All this systemd stuff were requested far too late to make such intrusive changes. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c18
--- Comment #18 from Kay Sievers
Third-party scripts run in compat mode and can not make use of socket-activation.
They can, they do already, and it works well.
That's really not the point. The goal is to clean up the mess here, not to add more hacks.
(In reply to comment #14)
One of the main goals of systemd is to get rind of the piles of crap accumulated in sysv scripts and /etc/sysconfig/. The SUSE syslog script is a fine example of what we really don't want to see anymore.
But you'll see it on 11.4 :-)
Sure, no problem. We don't have to touch it, it should work. rsyslog has all merged upstream, can disable the sysv script, and is expected to work properly with the provided native systemd service files. The other syslogs probably work fine in compat mode. We might just don't get early boot messages and have no race-free syslog restart.
We may either write a /sbin/syslog-daemon wrapper in C allowing to switch between the daemons or adopt all syslog daemon packages to conflict with each other so every one can install a syslog.service file.
We really don't want legacy scripts wrapping services along with socket-activation. It's a complete backwards idea.
These 2 functions are *required* to implement this functionality in Type=forking service.
Systemd-patched/aware services should never fork. That's only there to support legacy services, which don't use socket-activation.
When you don't like it, we can also revert all the changes in all the syslog-daemons and wait until there is a lib providing this functionality.
See also comment 7.
There is no lib so far. We might get there, but not now. Most stuff is already merged upstream. When the time comes we can update the stuff, for now there is no library, and SUSE will not create one on their own.
Please use the old sysv scripts and leave the limited functionality as it is,
There is _no_ limited functionality. The socket activation works out-of-the box with the init script -- you'd see it, when you'd read the lsof output in bug 656104 comment 21 I mentioned above.
Sure, but it's not the way we like it to have. We really don't run sysv scripts combined with socket activation.
or use native service files if systemd features are wanted.
Definitively not for 11.4, see above.
Sure, no problem.
All this systemd stuff were requested far too late to make such intrusive changes.
Maybe. I didn't "request" anything. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c19
--- Comment #19 from Kay Sievers
... and this is the reason why /etc/rc.d/init.d/functions on a fedora host includes systemd support?
Sure they support legacy and third-party services. They are in the transition phase currently. sysv will go away for them, and all new stuff is expected to put sysv init scripts in sub rpms, that don't get installed by default, if really needed. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c20
--- Comment #20 from Kay Sievers
... and this is the reason why /etc/rc.d/init.d/functions on a feadora host includes systemd support? AFAIK if the `functions' file is sourced the sourcing script is redirected through systemctl
Here is the current Fedora guideline: "Packages may also provide a SysV initscript file, but are not required to do so. This format is considered legacy, but Fedora still contains init mechanisms such as upstart which do not support the systemd unit file format. If present, the SysV initscript(s) must go into an optional subpackage, so as not to confuse sysadmins." https://fedoraproject.org/wiki/TomCallaway/Systemd_Revised_Draft -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c21
--- Comment #21 from Marius Tomaschewski
(In reply to comment #17)
Third-party scripts run in compat mode and can not make use of socket-activation.
They can, they do already, and it works well.
That's really not the point. The goal is to clean up the mess here, not to add more hacks.
No, the point is that you don't read what people are writting to you. As I wrote, we'll not change the the syslog-daemon switch for 11.4. It was simply far too late to make all these update-intrusive changes as required, because systemd didn't worked reliably until end of 2010. And also, because you still didn't fixed this bug (even the library exists, but is simply not installed).
(In reply to comment #14)
One of the main goals of systemd is to get rind of the piles of crap accumulated in sysv scripts and /etc/sysconfig/. The SUSE syslog script is a fine example of what we really don't want to see anymore.
But you'll see it on 11.4 :-)
Sure, no problem. We don't have to touch it, it should work. rsyslog has all merged upstream, can disable the sysv script, and is expected to work properly with the provided native systemd service files.
The other syslogs probably work fine in compat mode. We might just don't get early boot messages and have no race-free syslog restart.
Nonsense. You still didn't read the comments in the bug reports, but just blame all people they're doing "crap" and "mess". So read this here please: All 3 syslog daemons (syslogd,syslog-ng and rsyslog) natively support systemd socket activation: - in "Type=simple" as well as in "Type=forking" systemd.service(5) mode and - for all unix dgram sockets systemd provides to them (that is also for the $chroot/dev/log sockets). We've added the required functionality to all of them upstream. The code required to implement the "Type=forking" is attached in comment #9. _Please_ forward it upstream and ship install the lib providing it. All patches are upstream - usually in git master, but our packages include these patches.
We may either write a /sbin/syslog-daemon wrapper in C allowing to switch between the daemons or adopt all syslog daemon packages to conflict with each other so every one can install a syslog.service file.
We really don't want legacy scripts wrapping services along with socket-activation. It's a complete backwards idea.
And I'll really not change the syslog-daemon switch for 11.4, because it is too late due to systemd problems until end of 2010 and the change of the syslog daemon switch is very intrusive. Perhaps you didn't noticed, but we've released RC1 already. For 12.0 (or whatever follows the 11.4), we can change the daemon switch.
These 2 functions are *required* to implement this functionality in Type=forking service.
Systemd-patched/aware services should never fork. That's only there to support legacy services, which don't use socket-activation.
systemd supports also socket activation in Type=forking services mode.
When you don't like it, we can also revert all the changes in all the syslog-daemons and wait until there is a lib providing this functionality.
See also comment 7.
There is no lib so far. We might get there, but not now. Most stuff is already merged upstream. When the time comes we can update the stuff, for now there is no library, and SUSE will not create one on their own.
And until there is a stable systemd lib, we'll not change the syslog daemon switch.
All this systemd stuff were requested far too late to make such intrusive changes.
Maybe. I didn't "request" anything.
There are (multiple AFAIS) feature requests to integrate systemd and you are assigned as developer for them. further, *you* asked to adopt the syslog daemons. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c22
--- Comment #22 from Marius Tomaschewski
(In reply to comment #16)
... and this is the reason why /etc/rc.d/init.d/functions on a fedora host includes systemd support?
Sure they support legacy and third-party services. They are in the transition phase currently. sysv will go away for them, and all new stuff is expected to put sysv init scripts in sub rpms, that don't get installed by default, if really needed.
(In reply to comment #20)
(In reply to comment #16)
... and this is the reason why /etc/rc.d/init.d/functions on a feadora host includes systemd support? AFAIK if the `functions' file is sourced the sourcing script is redirected through systemctl
Here is the current Fedora guideline:
"Packages may also provide a SysV initscript file, but are not required to do so. This format is considered legacy, but Fedora still contains init mechanisms such as upstart which do not support the systemd unit file format. If present, the SysV initscript(s) must go into an optional subpackage, so as not to confuse sysadmins."
https://fedoraproject.org/wiki/TomCallaway/Systemd_Revised_Draft
Well, I don't really have any problem to make it same way -- but for 12.0 and not for 11.4, where we've released RC1 already and where it was not really possible to test on system running with systemd [I wrote a systemd dummy to make the initial syslog tests] for a too long time and there is not even a stable API/ABI for the daemons. Note: I know, it was not alone systemd fault, but there were problems with the kernel. So as far as I see, this bug tends to become a blocker for 12.0... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c23
--- Comment #23 from Marius Tomaschewski
Sure, no problem. We don't have to touch it, it should work. rsyslog has all merged upstream, can disable the sysv script, and is expected to work properly with the provided native systemd service files.
The other syslogs probably work fine in compat mode. We might just don't get early boot messages and have no race-free syslog restart.
And... it works as implemented now (RC1 + last syslog-ng config typo fix + sysvinit-tools). They syslog daemons _use_ the socket activation and race-free syslog restart works - you can switch between the syslog daemons, see https://bugzilla.novell.com/show_bug.cgi?id=656104#c21 . -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c24
Kay Sievers
https://bugzilla.novell.com/show_bug.cgi?id=656259
https://bugzilla.novell.com/show_bug.cgi?id=656259#c
Marius Tomaschewski
participants (1)
-
bugzilla_noreply@novell.com