Bug 740393 - Systemd unit uses wrong pid path
Summary: Systemd unit uses wrong pid path
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: krb5
Version: 16
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 699785 720976
TreeView+ depends on / blocked
 
Reported: 2011-09-21 21:22 UTC by Alexander Bokovoy
Modified: 2011-10-11 03:15 UTC (History)
1 user (show)

Fixed In Version: krb5-1.9.1-15.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-11 03:15:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Alexander Bokovoy 2011-09-21 21:22:47 UTC
Description of problem:
Sep 21 22:26:35 host4 systemd[1]: Reloading.
Sep 21 22:26:36 host4 systemd[1]: [/lib/systemd/system/krb5kdc.service:7] Not an absolute path: var/run/krb5kdc.pid


Version-Release number of selected component (if applicable):
krb5-1.9.1-13.fc16

How reproducible:
Always, just try to start krb5kdc.service or reload systemd config.

This blocks systemd integration for FreeIPA.

Comment 1 Alexander Bokovoy 2011-09-21 21:24:13 UTC
Blocks bug 699785

Comment 2 Fedora Update System 2011-09-30 13:32:51 UTC
krb5-1.9.1-14.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/krb5-1.9.1-14.fc16

Comment 3 Fedora Update System 2011-09-30 18:31:04 UTC
Package krb5-1.9.1-14.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing krb5-1.9.1-14.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/krb5-1.9.1-14.fc16
then log in and leave karma (feedback).

Comment 4 Alexander Bokovoy 2011-10-01 07:12:20 UTC
Unfortunately, this update does not work.
-------------------------------------------------------
[Unit]
Description=Kerberos 5 Servers
After=syslog.target network.target

[Service]
Type=forking
PIDFile=/var/run/krb5kdc.pid
EnvironmentFile=-/etc/sysconfig/krb5kdc
ExecStart=/usr/sbin/krb5kdc -r $KRB5REALM -P $pidfile $KRB5KDC_ARGS
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target
-------------------------------------------------------

$pidfile references wrong variable as $PIDFile is different from $pidfile. $pidfile is empty. As result, krb5kdc complains in the syslog:

Oct  1 10:05:57 host4 krb5kdc[10629]: krb5kdc: option requires an argument -- 'P'
Oct  1 10:05:57 host4 krb5kdc[10629]: usage: krb5kdc [-x db_args]* [-d dbpathname] [-r dbrealmname]
Oct  1 10:05:57 host4 krb5kdc[10629]: [-R replaycachename] [-m] [-k masterenctype]
Oct  1 10:05:57 host4 krb5kdc[10629]: [-M masterkeyname] [-p port] [-P pid_file]
Oct  1 10:05:57 host4 krb5kdc[10629]: [-n] [-w numworkers] [/]
Oct  1 10:05:57 host4 krb5kdc[10629]: where,
Oct  1 10:05:57 host4 krb5kdc[10629]: [-x db_args]* - Any number of database specific arguments.
Oct  1 10:05:57 host4 krb5kdc[10629]: Look at each database module documentation for supported
Oct  1 10:05:57 host4 krb5kdc[10629]: arguments
Oct  1 10:05:57 host4 systemd[1]: krb5kdc.service: control process exited, code=exited status=1
Oct  1 10:05:57 host4 systemd[1]: Unit krb5kdc.service entered failed state.

and refuses to start. Was there any attempt to test before submitting the package?
Moving back to NEW state.

Comment 5 Alexander Bokovoy 2011-10-01 12:19:08 UTC
Checked with #systemd IRC folks and there is no way to refer via $PIDFile or $pidfile to PIDFile= stanza.

You have to specify the path directly in ExecStart stanza. The following krb5kdc.service works for me with FreeIPA systemd support I'm developing:

[Unit]
Description=Kerberos 5 Servers
After=syslog.target network.target

[Service]
Type=forking
PIDFile=/var/run/krb5kdc.pid
EnvironmentFile=-/etc/sysconfig/krb5kdc
ExecStart=/usr/sbin/krb5kdc -r ${KRB5REALM} -P /var/run/krb5kdc.pid ${KRB5KDC_ARGS}
ExecReload=/bin/kill -HUP ${MAINPID}

[Install]
WantedBy=multi-user.target

Comment 6 Fedora Update System 2011-10-02 15:39:05 UTC
krb5-1.9.1-15.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/krb5-1.9.1-15.fc16

Comment 7 Alexander Bokovoy 2011-10-02 17:07:31 UTC
Works now. Thanks!

Comment 8 Fedora Update System 2011-10-02 17:44:58 UTC
Package krb5-1.9.1-15.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing krb5-1.9.1-15.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/krb5-1.9.1-15.fc16
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2011-10-11 03:15:04 UTC
krb5-1.9.1-15.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.