Re: systemd: bugreports for missing service-files + service-files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Am 19.06.2011 14:21, schrieb Ville Skyttä:
> On 06/19/2011 01:41 PM, Reindl Harald wrote:
>> Am 19.06.2011 12:32, schrieb Michał Piotrowski:
>>>
>>> Seems to me very unlikely to see a new systemd services in F15
>>
>> i better not comment this with more than "normally F15 should have not been released
>> without them" and if so it should be fixed
> 
> Switching from SysV to systemd within updates to a release is explicitly
> forbidden, doing so is allowed only between releases.
> 
> http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Packages_migrating_to_a_systemd_unit_file_from_a_SysV_initscript
> 
> New packages introduced into a release are on the other hand a different
> story.

this is bad since it means that the default-packages in case of services are
not in the right order because systemd ignores that, anyways i will take them
from F16 packages, backport to SPEC-Files and rebuild the services on
my own because it is unaccaptable that as example dovecot used as imap-proxy
is fired up before the dbmail-imapd - why? because is accepts connections
and they will finally fail resulting the user is requested for his password and
we all know hat most users do not konw them

a real big problem is mysqld and fire up follwoing services in a 99% mysql-driven
environment because postfix, dbmail, dovecot, postfix-plocid's and so on
will randomly fail if they come to soon

for a full-mysql-driven mail-system the following oder is hardly needed
any other order results in hughe troubles every restart
* mysqld (ready for connections!)
* postgrey
* dbmail-postfix-policyd
* dbmail (lmtp/imap/pop3)
* postfix
* dovecot (in proxy mode)

maybe "ExecStartPost=/bin/sleep 2" for mysqld helps a little bit
but pretty looks any other way

what i am missing too for some own services is start a process as explicit
user - example: service written in php as endless loop whcih sould not run
as root or "mpdscribble" (not a fedora package) i like to run on the homeserver
which is not designed native to run as service but does well, it should use
the mpd-user as before

however: attached some systemd-services in the hope making this process
faster and somebody will take a look and optimize if useful because i
am brand new on systemd




[Unit]
Description=DBMail IMAP Server
After=syslog.target local-fs.target network.target mysqld.service
Before=dovecot.service

[Service]
Type=simple
ExecStart=/usr/sbin/dbmail-imapd -D
Restart=always
RestartSec=2

[Install] 
WantedBy=multi-user.target
[Unit]
Description=DBMail LMTP Server
After=syslog.target local-fs.target network.target mysqld.service
Before=postfix.service

[Service]
Type=simple
ExecStart=/usr/sbin/dbmail-lmtpd -D
Restart=always
RestartSec=2

[Install] 
WantedBy=multi-user.target
[Unit]
Description=DBMail POP3 Server
After=syslog.target local-fs.target network.target mysqld.service
Before=dovecot.service

[Service]
Type=simple
ExecStart=/usr/sbin/dbmail-pop3d -D
Restart=always
RestartSec=2

[Install] 
WantedBy=multi-user.target
[Unit]
Description=DBMail Policy Service
After=syslog.target local-fs.target network.target mysqld.service
Before=postfix.service

[Service]
Type=simple
PIDFile=/var/spool/postfix/dbmail-postfix-policyd/pid
ExecStartPre=/bin/rm -f /var/spool/postfix/dbmail-postfix-policyd/pid
ExecStartPre=/bin/rm -f /var/spool/postfix/dbmail-postfix-policyd/socket
ExecStart=/usr/sbin/dbmail-postfix-policyd --user=postfix --group=postfix --dbmail-conf=/etc/dbmail-postfix-policyd.conf --dbmail-version=2 --unix=/var/spool/postfix/dbmail-postfix-policyd/socket --pidfile=/var/spool/postfix/dbmail-postfix-policyd/pid
Restart=always
RestartSec=2

[Install] 
WantedBy=multi-user.target
[Unit]
Description=DBMail SIEVE Server
After=syslog.target local-fs.target network.target mysqld.service

[Service]
Type=simple
ExecStart=/usr/sbin/dbmail-timsieved -D
Restart=always
RestartSec=2

[Install] 
WantedBy=multi-user.target
[Unit]
Description=Dovecot IMAP/POP3 Proxy
After=local-fs.target network.target mysqld.service dbmail-imapd.service dbmail-pop3d.service
Before=postfix.service 

[Service]
Type=simple
ExecStart=/usr/sbin/dovecot -F
NonBlocking=yes
Restart=always
RestartSec=2

[Install]
WantedBy=multi-user.target
[Unit]
Description=HTTP Server (@NAME@ MPM)
After=syslog.target local-fs.target network.target mysqld.service

[Service]
Type=forking
PIDFile=/var/run/httpd/httpd.pid
EnvironmentFile=/etc/sysconfig/httpd
ExecStart=@EXEC@ $OPTIONS -k start
ExecReload=@EXEC@ $OPTIONS -t
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=@EXEC@ $OPTIONS -k stop
Restart=always
RestartSec=2

[Install]
WantedBy=multi-user.target
[Unit]
Description=The Music Player Daemon
After=syslog.target local-fs.target pulsed.service

[Service]
Type=forking
ExecStart=/usr/bin/mpd
ExecStartPost=/usr/local/bin/mpd-post-start.sh
Restart=always
RestartSec=2

[Install] 
WantedBy=multi-user.target
[Unit]
Description=mpd last.fm submitter
After=syslog.target local-fs.target mpd.service

[Service]
Type=forking
ExecStart=/usr/bin/mpdscribble
Restart=always
RestartSec=2

[Install] 
WantedBy=multi-user.target

# WE DO NOT KNOW HOW TO TELL SYSTEMD STARTING THE PROCESS AS USER "mpd"
# THIS TIME IT RUNS AS ROOT AND SHOULD ONLY BE USED EXPERIMENTAL
[Unit]
Description=MySQL Database
After=network.target
Before=syslog.target httpd.service postfix.service dovecot.service dbmail-imapd.service dbmail-lmtpd.service dbmail-pop3d.service dbmail-postfix-policyd.service

[Service]
Type=simple
PIDFile=/var/run/mysqld/mysqld.pid
ExecStart=/usr/libexec/mysqld --defaults-file=/etc/my.cnf --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock --user=mysql
ExecStop=/bin/kill -15 $MAINPID
Restart=always
RestartSec=2
TimeoutSec=60
ExecStartPost=/bin/sleep 2

[Install]
WantedBy=multi-user.target

# WE DO NOT KNOW HOW TO INCLUDE SOMETHING LIKE THIS TO MAKE "largepages" WORKING
# [root@srv-rhsoft:~]$ cat /etc/my.memory.cnf
# echo 200 > /proc/sys/vm/nr_hugepages
# echo 27 > /proc/sys/vm/hugetlb_shm_group
# echo 2097152 > /proc/sys/kernel/shmall
# ulimit -l unlimited
# ulimit -n 30000
# InnoDB: HugeTLB: Warning: Failed to allocate 109051904 bytes. errno 1
# InnoDB HugeTLB: Warning: Using conventional memory pool

# WE HOPE THAT "ExecStartPost=/bin/sleep 2" RESULTS IN A DELAY BEFORE STARTING SEVICES DEPENDING ON
# MYSQL BECAUSE A SUCCESSFULL START DOES NOT MEAN THAT MYSQL IS READY FOR CONNECTIONS AND SOME 
# MAILSERVICES IN MYSQL-DRIVEN ENVIRONEMNTS ARE FAILING IF STARTED TOO SOON
[Unit]
Description=Postfix MTA
After=syslog.target local-fs.target network.target mysqld.service dovecot.service

[Service]
Type=forking
ExecStart=/usr/sbin/postfix -c /etc/postfix start
ExecStop=/usr/sbin/postfix -c /etc/postfix stop
ExecReload=/usr/sbin/postfix -c /etc/postfix reload
Restart=always
RestartSec=2

[Install] 
WantedBy=multi-user.target
[Unit]
Description=Postfix Greylisting Service
After=syslog.target local-fs.target network.target
Before=postfix.service

[Service]
Type=simple
ExecStart=/usr/sbin/postgrey --unix=/var/spool/postfix/postgrey/socket
Restart=always
RestartSec=2

[Install] 
WantedBy=multi-user.target
[Unit]
Description=Pulseaudio Daemon
After=syslog.target
Before=mpd.service

[Service]
Type=forking
ExecStart=/usr/bin/pulseaudio --realtime --high-priority -D --system --log-level=0 --log-target=syslog --disallow-exit --disallow-module-loading
Restart=always
RestartSec=2

[Install] 
WantedBy=multi-user.target
[Unit]
Description=SAMBA Fileserver
After=syslog.target local-fs.target network.target

[Service]
Type=forking
ExecStart=/usr/sbin/smbd -D
Restart=always
RestartSec=2

[Install] 
WantedBy=multi-user.target

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux