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 1450095 - sasl errors in systemd journal at libvirtd startup
Summary: sasl errors in systemd journal at libvirtd startup
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Lili Zhu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-11 14:11 UTC by Jeff Needle
Modified: 2017-09-22 05:44 UTC (History)
9 users (show)

Fixed In Version: libvirt-3.2.0-9.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-02 00:08:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1846 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2017-08-01 18:02:50 UTC

Description Jeff Needle 2017-05-11 14:11:33 UTC
With libvirt-3.2.0-4.el7.x86_64 (RHEL 7.4 beta version), starting up libvirt logs some errors that we should either clean up or suppress:

# systemctl status libvirtd -l
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2017-05-11 08:54:17 EDT; 1h 7min ago
     Docs: man:libvirtd(8)
           http://libvirt.org
 Main PID: 17943 (libvirtd)
   CGroup: /system.slice/libvirtd.service
           ├─14397 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper
           ├─14398 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper
           └─17943 /usr/sbin/libvirtd

May 11 08:54:17 <> systemd[1]: Starting Virtualization daemon...
May 11 08:54:17 <> libvirtd[17943]: Could not find keytab file: /etc/libvirt/krb5.tab: No such file or directory
May 11 08:54:17 <> libvirtd[17943]: gssapiv2_client_plug_init() failed in sasl_server_add_plugin(): generic failure
May 11 08:54:17 <> systemd[1]: Started Virtualization daemon.
May 11 08:54:17 <> libvirtd[17943]: _sasl_plugin_load failed on sasl_server_plug_init for plugin: gssapiv2
...

Comment 1 Daniel Berrangé 2017-05-11 14:15:16 UTC
This is a bug in the libvirtd startup code. It merely looks at whether the TCP or TLS sockets are configured for SASL auth, without bothering to check if the TCP or TLS sockets are actually turned on. As a result we try to initialize SASL despite not wanting it, and the administrator not having configured KRB5.

We just need to make the SASL setup properly conditional to suppress this warning.

Comment 2 Peter Krempa 2017-06-02 13:03:51 UTC
Fixed upstream:

commit ed914284ba74afb7dd16dcb623073bb1a1d5cd21
Author: Peter Krempa <pkrempa>
Date:   Wed May 31 09:12:09 2017 +0200

    daemon: Don't initialize SASL context if not necessary
    
    SASL context would be initialized even if the corresponding TCP or TLS
    sockets are not enabled.
    
    fe772f24a68 attempted to fix the symptom by commenting out the settings,
    but that did not fix the root cause. 3c647ee4bbb later reverted those
    changes so that the more secure algorithm is used.

Comment 6 Lili Zhu 2017-06-14 04:19:28 UTC
Reproduce this bug with build libvirt-3.2.0-7.el7.x86_64

Keep /etc/libvirt/libvirtd.conf in the default status, where tcp sockets is turned down, and unix and tls sockets are not configured for SASL auth.
# systemctl status libvirtd 
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2017-06-14 12:01:47 CST; 33s ago
     Docs: man:libvirtd(8)
           http://libvirt.org
 Main PID: 19992 (libvirtd)
   CGroup: /system.slice/libvirtd.service
           ├─ 2097 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper
           ├─ 2098 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper
           └─19992 /usr/sbin/libvirtd
 
Jun 14 12:01:47  systemd[1]: Starting Virtualization daemon...
Jun 14 12:01:47  libvirtd[19992]: Could not find keytab file: /etc/libvirt/krb5.tab: No such file or directory
Jun 14 12:01:47  libvirtd[19992]: gssapiv2_client_plug_init() failed in sasl_server_add_plugin(): generic failure
Jun 14 12:01:47  systemd[1]: Started Virtualization daemon.
Jun 14 12:01:47  libvirtd[19992]: _sasl_plugin_load failed on sasl_server_plug_init for plugin: gssapiv2
Jun 14 12:01:47  dnsmasq[2097]: read /etc/hosts - 2 addresses
Jun 14 12:01:47  dnsmasq[2097]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Jun 14 12:01:47  dnsmasq-dhcp[2097]: read /var/lib/libvirt/dnsmasq/default.hostsfile




Verify this bug with libvirt-3.2.0-9.el7.x86_64

#yum update libvirt*
Also Keep /etc/libvirt/libvirtd.conf in the default status,
# systemctl status libvirtd 
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2017-06-14 12:04:35 CST; 2s ago
     Docs: man:libvirtd(8)
           http://libvirt.org
 Main PID: 21565 (libvirtd)
   CGroup: /system.slice/libvirtd.service
           ├─ 2097 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper
           ├─ 2098 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper
           └─21565 /usr/sbin/libvirtd

Jun 14 12:04:35  systemd[1]: Starting Virtualization daemon...
Jun 14 12:04:35  systemd[1]: Started Virtualization daemon.
Jun 14 12:04:36  dnsmasq[2097]: read /etc/hosts - 2 addresses
Jun 14 12:04:36  dnsmasq[2097]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Jun 14 12:04:36  dnsmasq-dhcp[2097]: read /var/lib/libvirt/dnsmasq/default.hostsfile

As the result match the expectation, mark this bug as verified

Comment 7 errata-xmlrpc 2017-08-02 00:08:25 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/RHEA-2017:1846

Comment 8 errata-xmlrpc 2017-08-02 01:32:35 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/RHEA-2017:1846


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