Bug 32531 - Systemd vconsole setup issue Failed to import credentials, ignoring: No such file or directory. Patch supplied
Summary: Systemd vconsole setup issue Failed to import credentials, ignoring: No such ...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 9
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA9-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2023-11-16 10:49 CET by Raphael Gertz
Modified: 2023-11-27 20:50 CET (History)
9 users (show)

See Also:
Source RPM: systemd-253.10-1.mga9.src.rpm
CVE:
Status comment:


Attachments

Description Raphael Gertz 2023-11-16 10:49:01 CET
Description of problem:
Systemd issue a useless warning.

Patch exists upstream here:
https://github.com/systemd/systemd/commit/55ace8e5c58441d1a2c64b297a38b232ef0c0e28

Version-Release number of selected component (if applicable):
systemd-253.10-1.mga9

How reproducible:
Always

Steps to Reproduce:
1. Set locale to french for example:
$ cat /etc/locale.conf 
COUNTRY=FR
LANG=fr_FR.UTF-8
LANGUAGE=fr_FR.UTF-8:fr

$ cat /etc/vconsole.conf 
FONT=lat0-16
KEYMAP=fr-latin1

2. Regenerate initrd
# mkinitrd -f /boot/initrd-$(uname -r).img $(uname -r)

3. Boot and see log
# journalctl -b | grep systemd-vconsole-setup
systemd[1]: Starting systemd-vconsole-setup.service...
systemd-vconsole-setup[552]: Failed to import credentials, ignoring: Aucun fichier ou dossier de ce type
systemd[1]: Finished systemd-vconsole-setup.service.
Comment 1 Raphael Gertz 2023-11-16 10:51:44 CET
I took the liberty to add patch to svn repository after adapting it to apply to our mga9 systemd version under name:
0514-fix-vconsole-setup-failed-to-import-credentials.patch

Please add to SPECS/systemd.spec + bump release if it's ok to include it:
+# (rapsys) fix systemd-vconsole-setup[X]: Failed to import credentials, ignoring: No such file or directory
+Patch514: 0514-fix-vconsole-setup-failed-to-import-credentials.patch
Comment 2 Raphael Gertz 2023-11-16 10:53:05 CET
I bumped on this warning while investigating why the keyboard map is incompletely included in a non host only initrd under arm64 on rpi cm4 board.
Comment 3 Lewis Smith 2023-11-16 19:53:46 CET
Thanks for this report.
Assigning to basesystem; CC'ing Stig & Neal who touched systemd lately.

Assignee: bugsquad => basesystem
Summary: Systemd vconsole setup issue Failed to import credentials, ignoring: No such file or directory => Systemd vconsole setup issue Failed to import credentials, ignoring: No such file or directory. Patch supplied
CC: (none) => ngompa13, smelror

Comment 4 Stig-Ørjan Smelror 2023-11-16 20:33:01 CET
Pushed the update to the build system and will notify QA when the build is complete and get it out the door.


Cheers,
Stig
Comment 5 Stig-Ørjan Smelror 2023-11-16 21:13:44 CET
Advisory
========

Added upstream patch to fix systemd vconsole setup issue Failed to import credentials, ignoring: No such file or directory.

References
==========


Files
=====

Uploaded to core/updates_testing

lib64udev-devel-253.10-1.1.mga9
lib64udev1-253.10-1.1.mga9
systemd-devel-253.10-1.1.mga9
systemd-homed-253.10-1.1.mga9
nss-myhostname-253.10-1.1.mga9
lib64systemd0-253.10-1.1.mga9
systemd-tests-253.10-1.1.mga9
systemd-253.10-1.1.mga9

from systemd-253.10-1.1.mga9.src.rpm

Assignee: basesystem => qa-bugs

Comment 6 Marja Van Waes 2023-11-16 21:57:26 CET
Advisory from comment 5 added to SVN. Please remove the "advisory" keyword if it needs to be changed. It also helps when obsolete advisories are tagged as "obsolete"

CC: (none) => marja11
Keywords: (none) => advisory

Comment 7 Herman Viaene 2023-11-17 17:20:15 CET
MGA9-64 Xfce on Acer Aspire 5253
No installation issues.
After reboot:
# journalctl -b | grep systemd-vconsole-setup
nov. 17 16:00:58 mach7.hviaene.thuis systemd[1]: Starting systemd-vconsole-setup.service...
nov. 17 16:01:00 mach7.hviaene.thuis systemd[1]: Finished systemd-vconsole-setup.service.
That looks OK.
Xfce menus are (mostly) in french, except e.g."Recently used" and most of the applications remain in english. Xfce utilities are in french.
The keymap setting in vconsole.conf  made me expect that the keyboard should now follow the french-AZERTY layout, but it doesn't, it remains belgian-AZERTY.
I happen to have a french-AZERTY keyboard laying around, so I can  check the keys.
Leaving to Raphael to judge on this whether to let go or not.

CC: (none) => herman.viaene

Comment 8 Thomas Andrews 2023-11-17 23:02:21 CET
MGA9-64 Plasma, US locale, in VirtualBox:

Before the update, doing nothing but running the journal command:

# journalctl -b | grep systemd-vconsole-setup
Nov 17 15:31:14 localhost.localdomain systemd[1]: Starting systemd-vconsole-setup.service...
Nov 17 15:31:14 localhost.localdomain systemd-vconsole-setup[504]: Failed to import credentials, ignoring: No such file or directory
Nov 17 15:31:14 localhost.localdomain systemd-vconsole-setup[504]: KD_FONT_OP_GET failed while trying to get the font metadata: Invalid argument
Nov 17 15:31:14 localhost.localdomain systemd-vconsole-setup[504]: Fonts will not be copied to remaining consoles
Nov 17 15:31:14 localhost.localdomain systemd[1]: Finished systemd-vconsole-setup.service.

 As you can see, this system has three warnings, the first of which is the one in question. I don't know anything about the other two, but the VM seems to function as it should despite them.

After the update (selecting "Use rpmnew as main file") and a reboot:

# journalctl -b | grep systemd-vconsole-setup
Nov 17 15:50:20 localhost.localdomain systemd[1]: Starting systemd-vconsole-setup.service...
Nov 17 15:50:20 localhost.localdomain systemd-vconsole-setup[491]: KD_FONT_OP_GET failed while trying to get the font metadata: Invalid argument
Nov 17 15:50:20 localhost.localdomain systemd-vconsole-setup[491]: Fonts will not be copied to remaining consoles
Nov 17 15:50:20 localhost.localdomain systemd[1]: Finished systemd-vconsole-setup.service.

The warning in question is now gone. The others are still there, but I'm assuming they should be. And, no obvious change in the way the VM runs.

CC: (none) => andrewsfarm

Comment 9 Dave Hodgins 2023-11-18 02:36:20 CET
I remember looking into the font problem at some point in the past.
The following configuration works ...
$ cat /etc/vconsole.conf 
FONG=Uni3-TerminusBold16
FONT=lat0-16
FONT_UNIMAP=/usr/share/kbd/unimaps/cp437AB.uni
KEYMAP=us

It requires the package hxtools to be installed for that font unimap.
The proper configuration depends on the language and keyboard.

"man vconsole.conf" includes the statement
"You can safely mask this file if you want to avoid this kind of initialization.",
which is why I didn't bother opening a bug report about it. Also, I have
no idea what the use case is for vconsole.

CC: (none) => davidwhodgins

Comment 10 Raphael Gertz 2023-11-18 03:59:21 CET
(In reply to Dave Hodgins from comment #9)
> It requires the package hxtools to be installed for that font unimap.
> The proper configuration depends on the language and keyboard.

Thank's for the infos about hxtools, it will help me to find if the problem comes from this missing package or dracut i18n scripts which miss to include a file.

I am under a rpi cm4 arm64, maybe there is a non i586/x86_64 issue too...

> Also, I have no idea what the use case is for vconsole.

I think there are two use cases with non qwerty keyboard :
- be able to type a root luks encrypted password
- type your real console login and password
Comment 11 Raphael Gertz 2023-11-18 04:04:22 CET
(In reply to Herman Viaene from comment #7)
> Xfce menus are (mostly) in french, except e.g."Recently used" and most of
> the applications remain in english. Xfce utilities are in french.
> The keymap setting in vconsole.conf  made me expect that the keyboard should
> now follow the french-AZERTY layout, but it doesn't, it remains
> belgian-AZERTY.
> I happen to have a french-AZERTY keyboard laying around, so I can  check the
> keys.
> Leaving to Raphael to judge on this whether to let go or not.

Did you re-run drakkeyboard to check that keyboard map is set everywhere ?

From what I remember with kde, there was real console keyboard map set with vconsole (which call loadkeys) and X keyboard configuration.

I am inclined to think that your strange configuration in xfce may be an unrelated bug.
Comment 12 Raphael Gertz 2023-11-18 04:09:04 CET
(In reply to Thomas Andrews from comment #8)
> MGA9-64 Plasma, US locale, in VirtualBox:
> 
> Before the update, doing nothing but running the journal command:
> 
> # journalctl -b | grep systemd-vconsole-setup
> Nov 17 15:31:14 localhost.localdomain systemd[1]: Starting
> systemd-vconsole-setup.service...
> Nov 17 15:31:14 localhost.localdomain systemd-vconsole-setup[504]: Failed to
> import credentials, ignoring: No such file or directory
> Nov 17 15:31:14 localhost.localdomain systemd-vconsole-setup[504]:
> KD_FONT_OP_GET failed while trying to get the font metadata: Invalid argument
> Nov 17 15:31:14 localhost.localdomain systemd-vconsole-setup[504]: Fonts
> will not be copied to remaining consoles
> Nov 17 15:31:14 localhost.localdomain systemd[1]: Finished
> systemd-vconsole-setup.service.
> 
>  As you can see, this system has three warnings, the first of which is the
> one in question. I don't know anything about the other two, but the VM seems
> to function as it should despite them.
> 
> After the update (selecting "Use rpmnew as main file") and a reboot:
> 
> # journalctl -b | grep systemd-vconsole-setup
> Nov 17 15:50:20 localhost.localdomain systemd[1]: Starting
> systemd-vconsole-setup.service...
> Nov 17 15:50:20 localhost.localdomain systemd-vconsole-setup[491]:
> KD_FONT_OP_GET failed while trying to get the font metadata: Invalid argument
> Nov 17 15:50:20 localhost.localdomain systemd-vconsole-setup[491]: Fonts
> will not be copied to remaining consoles
> Nov 17 15:50:20 localhost.localdomain systemd[1]: Finished
> systemd-vconsole-setup.service.
> 
> The warning in question is now gone. The others are still there, but I'm
> assuming they should be. And, no obvious change in the way the VM runs.

May you check from where theses warnings comes ?

For my tests I force the generation of an initrd and modify dracut script to pause forever before the cpio step.

Then go as root in /tmp/dracut*/initramfs.

Then mount -o bind /proc proc, sys and dev

Then strace the vconsole setup process.
strace chroot . /usr/lib/systemd/systemd-vconsole-setup

To see where your warnings comes from.

My patch comes from a regression fix in systemd 255, maybe there are patches for your issue over there.
Comment 13 Thomas Andrews 2023-11-18 15:34:24 CET
(In reply to Raphael Gertz from comment #12)
> (In reply to Thomas Andrews from comment #8)
> 
> May you check from where theses warnings comes ?
> 
> For my tests I force the generation of an initrd and modify dracut script to
> pause forever before the cpio step.
> 
> Then go as root in /tmp/dracut*/initramfs.
> 
> Then mount -o bind /proc proc, sys and dev
> 
> Then strace the vconsole setup process.
> strace chroot . /usr/lib/systemd/systemd-vconsole-setup
> 
> To see where your warnings comes from.
> 
> My patch comes from a regression fix in systemd 255, maybe there are patches
> for your issue over there.

That is all beyond my capabilities, starting with the "modify the dracut script" part. The coding skills I once had were with languages and ancient 8-bit consumer systems that no longer exist, and have atrophied from over 25 years of not being used.

My test was in a VM. I just checked on this HP Pavilion 15 laptop (A8-4555, HD 7600G graphics, Plasma system) which has not received this update, and all three warnings are there, too. Using Dave's command to check vconsole.conf, I get this:

# cat /etc/vconsole.conf 
FONT=lat0-16
KEYMAP=us

This system also functions with no problems. That said, if the function of vconsole is for changing the keyboard keymap, I have not so much as thought about trying to do that, so I wouldn't have run into it. My skills also do not involve using anything but a qwerty keyboard layout.
Comment 14 Herman Viaene 2023-11-20 18:29:00 CET
Answer on Comment 11: after changing locale.conf and vconsole.conf, and doing the actions, and rebooted: keyboard checked with drakkeyboard: Belgian (i.e. my normal installation)
Xfce settings for keyboard layout is set to "Use system settings".
Comment 15 Morgan Leijström 2023-11-20 21:44:43 CET
mga9-64 Seem OK here
Intel i7-870, P55 chipset, kernel linus 6.5.11-2

Like on Comment 8 checking before and after update, the warning of reading credentials went away, now:

$ journalctl -b | grep systemd-vconsole-setup
nov 20 20:32:20 svarten.tribun systemd[1]: Starting systemd-vconsole-setup.service...
nov 20 20:32:20 svarten.tribun systemd[1]: Finished systemd-vconsole-setup.service.

CC: (none) => fri

Comment 16 Thomas Andrews 2023-11-27 02:21:51 CET
The warning this bug was created for has disappeared, so I'm giving this an OK and validating. The other warnings that appeared on some systems are a subject for another bug.

CC: (none) => sysadmin-bugs
Keywords: (none) => validated_update
Whiteboard: (none) => MGA9-64-OK

Comment 17 Mageia Robot 2023-11-27 17:19:46 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2023-0123.html

Resolution: (none) => FIXED
Status: NEW => RESOLVED

Comment 18 Jens Persson 2023-11-27 20:50:41 CET
Just noticed that Systemd is outdated in Cauldron (v253). Current stable seems to be v254.

https://github.com/systemd/systemd/releases

CC: (none) => xerxes2


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