RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1373909 - Running systemctl stop kadmin.service causes the status to be failed instead of inactive
Summary: Running systemctl stop kadmin.service causes the status to be failed instead ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: krb5
Version: 7.3
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: rc
: ---
Assignee: Robbie Harwood
QA Contact: Patrik Kis
URL: https://github.com/krb5/krb5/pull/745
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-07 12:10 UTC by Jan Pazdziora
Modified: 2018-10-30 08:08 UTC (History)
4 users (show)

Fixed In Version: krb5-1.15.1-28.el7
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2018-10-30 08:08:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:3071 0 None None None 2018-10-30 08:08:49 UTC

Description Jan Pazdziora 2016-09-07 12:10:07 UTC
Description of problem:

With IPA / IdM installed, stopping the kadmin.service makes the state of the service

   Active: failed (Result: exit-code) since Wed 2016-09-07 08:07:39 EDT; 2s ago

Version-Release number of selected component (if applicable):

krb5-server-1.14.1-26.el7.x86_64

How reproducible:

Deterministic.

Steps to Reproduce:
1. yum install ipa-server-dns
2. ipa-server-install with some options
3. systemctl stop kadmin.service
4. systemctl status kadmin.service -l

Actual results:

● kadmin.service - Kerberos 5 Password-changing and Administration
   Loaded: loaded (/usr/lib/systemd/system/kadmin.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2016-09-07 08:07:39 EDT; 2s ago
  Process: 8987 ExecStart=/usr/sbin/_kadmind -P /var/run/kadmind.pid $KADMIND_ARGS (code=exited, status=0/SUCCESS)
 Main PID: 8988 (code=exited, status=2)

Sep 07 08:06:38 ipa.example.test systemd[1]: Starting Kerberos 5 Password-changing and Administration...
Sep 07 08:06:38 ipa.example.test systemd[1]: Started Kerberos 5 Password-changing and Administration.
Sep 07 08:07:39 ipa.example.test systemd[1]: Stopping Kerberos 5 Password-changing and Administration...
Sep 07 08:07:39 ipa.example.test systemd[1]: kadmin.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Sep 07 08:07:39 ipa.example.test systemd[1]: Stopped Kerberos 5 Password-changing and Administration.
Sep 07 08:07:39 ipa.example.test systemd[1]: Unit kadmin.service entered failed state.
Sep 07 08:07:39 ipa.example.test systemd[1]: kadmin.service failed.

Expected results:

No failed.

Additional info:

Comment 1 Jan Pazdziora 2016-09-07 12:29:39 UTC
I fails on RHEL 7.2 with krb5-server-1.13.2-10.el7.x86_64 as well.

Comment 6 Robbie Harwood 2016-09-07 18:03:55 UTC
I'm a bit confused what you're asking for here.  Our service file is really simple; we don't do any mangling of return codes or anything from kadmind.  Additionally, return code from kadmind is not defined.  This is especially true in the case where it dies from signal, which is the normal exit route.

What information do you think is being lost here?

Comment 7 Jan Pazdziora 2016-09-08 06:49:28 UTC
The ability to say "all is clean and fine on the system" is lost.

When you run systemctl, you see red bullet next to this service.

When you run systemctl status, it will say

    State: degraded

When you run systemctl status kadmin, it says

    Active: failed

but it should not be failed -- it should be marked inactive (dead) like all other services seem to do.

Comment 8 Robbie Harwood 2016-09-08 17:29:54 UTC
We haven't done anything special to our service.  It is literally this:

[Service]
Type=forking
PIDFile=/var/run/kadmind.pid
EnvironmentFile=-/etc/sysconfig/kadmin
ExecStart=/usr/sbin/_kadmind -P /var/run/kadmind.pid $KADMIND_ARGS
ExecReload=/bin/kill -HUP $MAINPID

where _kadmind execs kadmind.  It matches krb5kdc, which is presumably working correctly.

If someone who knows more about systemd knows what's wrong here, I'm happy to fix it, but to my untrained eye I think you have a "behavior" in systemd.

Comment 9 Jan Pazdziora 2016-09-09 06:23:43 UTC
If the exit status 2 marks correct exit, then something like

SuccessExitStatus=2

is probably called for.

Comment 16 errata-xmlrpc 2018-10-30 08:08:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:3071


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