very slow boot process with F33 caused by mysql entry in nssswitch.conf

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

 




Hi,

#                worked in F31
# caused problems in F33

I upgraded a system from F31 to F33 via dnf distro-sync and it did boot extrem slow.

A systemd.debug-shell=1 && strace of systemd-tmpfiles  later, it looked like a massive resolve problem,
as next to any step from  the tmpfiles process created at least 2 dns lookups.

ls -la /dev/ took round about 20 seconds, also creating dns lookups.

Due to the dns lookuped hostname I could nail it down to having "mysql" to nsswitch.conf  like this:

passwd:      mysql files systemd
shadow:      mysql files
group:       mysql files systemd

System takes up to 10 Minutes to boot due to massive failing dns resolve calls for the configured mysql auth servername when enabled, when removed it boots in seconds.

>> The same config did not cause delays on F31.  <<

As this config is needed to do an enterprise like login schema based on mysql, I think the order of starting services and sockets needs a correction.

Can someone involved in Systemd take a look at it?

Those two processes are the only ones running besides pid 1, when the problem hits the boot process, which starts at switchroot() to the real sysroot:

|- .. root bash tty 9
|- systemd-tmpfiles
'- systemd-journald

the mysql server is ofcourse a remote server, otherwise it would not make any sense to use this , but it would not matter due to the lack of network at this point.

libnss-mysql.cfg looks like this, just to give an impression of what needs to go on:

$ cat /etc/libnss-mysql.cfg 

getpwnam    SELECT username,'x',uid,gid,name,homedir,shell \
            FROM users \
            WHERE username='%1$s' \
            LIMIT 1
getpwuid    SELECT username,'x',uid,gid,name,homedir,shell \
            FROM users \
            WHERE uid='%1$u' \
            LIMIT 1
getspnam    SELECT username,password,lstchg,min,max,warn,inact,expire,flag \
            FROM users \
            WHERE username='%1$s' \
            LIMIT 1
getpwent    SELECT username,'x',uid,gid,name,homedir,shell \
            FROM users
getspent    SELECT username,password,lstchg,min,max,warn,inact,expire,flag \
            FROM users
getgrnam    SELECT name,password,gid \
            FROM groups \
            WHERE name='%1$s' \
            LIMIT 1
getgrgid    SELECT name,password,gid \
            FROM groups \
            WHERE gid='%1$u' \
            LIMIT 1
getgrent    SELECT name,password,gid \
            FROM groups
memsbygid   SELECT username \
            FROM grouplist \
            WHERE gid='%1$u'
gidsbymem   SELECT gid \
            FROM grouplist \
            WHERE username='%1$s'

host remote.hostname
port 3XXX
database    XXXXXXXXXx
username    XXXXXXXXXXXXX
password    XXXXXXXXXXXX
#socket      /var/lib/mysql/mysql.sock

I'm pretty sure, this would also fail on F34, if the network is not  reachable when needed.

libnss-mysql updated from 1.5-34 to 1.5-37 and nss from 3.58 to 3.63, just in case, nss caused this behaviour.

Of

best regards,
Marius Schwarz
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [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