Bug 740393

Summary: Systemd unit uses wrong pid path
Product: [Fedora] Fedora Reporter: Alexander Bokovoy <abokovoy>
Component: krb5Assignee: Nalin Dahyabhai <nalin>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 16CC: nalin
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: krb5-1.9.1-15.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-10 23:15:04 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 699785, 720976    

Description Alexander Bokovoy 2011-09-21 17:22:47 EDT
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 17:24:13 EDT
Blocks bug 699785
Comment 2 Fedora Update System 2011-09-30 09:32:51 EDT
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 14:31:04 EDT
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 03:12:20 EDT
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 08:19:08 EDT
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 11:39:05 EDT
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 13:07:31 EDT
Works now. Thanks!
Comment 8 Fedora Update System 2011-10-02 13:44:58 EDT
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-10 23:15:04 EDT
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.