Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#60570 - [libvirt] 4.8.0 missing user and group "tss"

Attached to Project: Community Packages
Opened by Uwe Sauter (UweSauter) - Tuesday, 23 October 2018, 21:27 GMT
Last edited by Christian Rebischke (Shibumi) - Saturday, 09 February 2019, 13:59 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Christian Rebischke (Shibumi)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

journalctl:


Oct 23 23:03:54 t400 libvirtd[917]: 994: info : libvirt version: 4.8.0
Oct 23 23:03:54 t400 libvirtd[917]: 994: info : hostname: t400
Oct 23 23:03:54 t400 libvirtd[917]: 994: error : virGetUserID:1042 : invalid argument: Failed to parse user 'tss'
Oct 23 23:03:54 t400 libvirtd[917]: libvirt version: 4.8.0
Oct 23 23:03:54 t400 libvirtd[917]: hostname: t400
Oct 23 23:03:54 t400 libvirtd[917]: invalid argument: Failed to parse user 'tss'
Oct 23 23:03:54 t400 libvirtd[917]: 994: error : virGetGroupID:1125 : invalid argument: Failed to parse group 'tss'
Oct 23 23:03:54 t400 libvirtd[917]: invalid argument: Failed to parse group 'tss'

Don't know what this user/group is but should this be created upon installation?
This task depends upon

Closed by  Christian Rebischke (Shibumi)
Saturday, 09 February 2019, 13:59 GMT
Reason for closing:  Fixed
Comment by loqs (loqs) - Tuesday, 23 October 2018, 22:08 GMT
https://github.com/libvirt/libvirt/commit/d9c087f57d3f06f1636711921a4a575a1070f799
What effect does the tss user and group not being present have on libvirt on your system?
Comment by Uwe Sauter (UweSauter) - Wednesday, 24 October 2018, 05:34 GMT
Well, at least it prints this error. As I said I don't know what this user/group is supposed to do. But if the non-existence of the user is not an error but only an inconvenience then it should only log an INFO or WARN but not an ERROR.
Comment by Christian Rebischke (Shibumi) - Wednesday, 07 November 2018, 08:15 GMT
libvirt 4.9.0 is in testing. Please install it and verify if your bug still exists
Comment by Uwe Sauter (UweSauter) - Saturday, 10 November 2018, 22:02 GMT
The package hasn't yet appeared on the mirrors I use ( under $BASEURL/testing/os/x86_64/ ). Can you point me to a location where I can get it manually?
Comment by loqs (loqs) - Saturday, 10 November 2018, 22:48 GMT
The package would be in community-testing not testing.
https://www.archlinux.org/packages/community-testing/x86_64/libvirt/download/ although I would suggest enabling both testing and community-testing and pulling all updated packages is preferable.
Comment by Uwe Sauter (UweSauter) - Sunday, 11 November 2018, 09:28 GMT
Sorry, my bad.

I was going to cherry pick the necessary packages as I don't want to run my system on testing. It seems that libvirt-4.9.0-1-x86_64.pkg.tar.xz has no dependencies to other packages in community-testing so this is the only one I installed.

After restarting libvirtd I can see the error message has changed a bit but is still present:

Nov 11 10:25:58 t400 libvirtd[2691]: 2711: info : libvirt version: 4.9.0
Nov 11 10:25:58 t400 libvirtd[2691]: 2711: info : hostname: t400
Nov 11 10:25:58 t400 libvirtd[2691]: 2711: error : virGetUserID:1041 : invalid argument: Failed to parse user 'tss'
Nov 11 10:25:58 t400 libvirtd[2691]: libvirt version: 4.9.0
Nov 11 10:25:58 t400 libvirtd[2691]: hostname: t400
Nov 11 10:25:58 t400 libvirtd[2691]: invalid argument: Failed to parse user 'tss'

For comparison the log before the update:

Nov 11 10:21:32 t400 libvirtd[1122]: 1198: info : libvirt version: 4.8.0
Nov 11 10:21:32 t400 libvirtd[1122]: 1198: info : hostname: t400
Nov 11 10:21:32 t400 libvirtd[1122]: libvirt version: 4.8.0
Nov 11 10:21:32 t400 libvirtd[1122]: 1198: error : virGetUserID:1042 : invalid argument: Failed to parse user 'tss'
Nov 11 10:21:32 t400 libvirtd[1122]: hostname: t400
Nov 11 10:21:32 t400 libvirtd[1122]: invalid argument: Failed to parse user 'tss'
Nov 11 10:21:32 t400 libvirtd[1122]: 1198: error : virGetGroupID:1125 : invalid argument: Failed to parse group 'tss'
Nov 11 10:21:32 t400 libvirtd[1122]: invalid argument: Failed to parse group 'tss'

Thanks.
Comment by Niccolò Belli (darkbasic) - Sunday, 11 November 2018, 09:31 GMT
/etc/libvirt/qemu.conf:
# User for the swtpm TPM Emulator
#
# Default is 'tss'; this is the same user that tcsd (TrouSerS) installs
# and uses; alternative is 'root'
#
#swtpm_user = "tss"
#swtpm_group = "tss"

I think you need to either create a tss user or just set another one.
Btw this is something which should be done by package maintainers.
Comment by Uwe Sauter (UweSauter) - Sunday, 11 November 2018, 09:36 GMT
Sorry, I'm bad at reading between the lines…

Are you saying this is the wrong place for this and I should open a bug upstream? I thought I could reach the Arch package maintainer with this ticket.

I totally agree that this is something the package maintainer should/could. I don't agree that I should create a separate user just to silence an error that shouldn't be an error (at least if want to help the community).
Comment by loqs (loqs) - Sunday, 11 November 2018, 10:07 GMT
libvirt 4.9.0-1 add a snippet to usr/lib/sysusers.d/libvirt.conf to create the tss group without a matching tss user.
After the user and group tss exist please check libvirt can still use the software TPM.
Comment by Uwe Sauter (UweSauter) - Sunday, 11 November 2018, 10:20 GMT
Well, if libvirt 4.9.0-1 creates a tss group without matching user than this is the explanation why "invalid argument: Failed to parse user 'tss'" is still printed. Which means that 4.9.0-1 should also create the user, don't you think?

As I have never (consciously) used a TPM before (neither software nor hardware) I have no idea how I should test that.
Comment by loqs (loqs) - Sunday, 11 November 2018, 10:31 GMT
I think this commit https://github.com/libvirt/libvirt/commit/b907fd75fa826a8285dc33fcf6117c7833e2853b instead of silencing a warning when the tss user / group does not exist causes an error to be produced instead.
Edit:
What upstream describes as a warning is the error message. From the commit message the message is harmless but should not be produced but the commit does not achieve that.
I would class this as an upstream issue.
Edit2:
if (virDoesUserExist(&cfg->swtpm_user) != 0)
cfg->swtpm_user = 0; /* fall back to root */
if (virDoesGroupExist(&cfg->swtpm_group) != 0)
cfg->swtpm_group = 0; /* fall back to root */
I think something like the above should silence the message although still printing a message when the value is not set to the default tss and does not exist might be appropriate but that would be for upstream.
Comment by loqs (loqs) - Monday, 12 November 2018, 12:20 GMT
Replacing two ors with ands. With that change the messages are no longer generated without the tss user or group present.
In such a case the root user and group will be used unless overridden in qemu.conf which is the original behavior.
If the tss user or group does exist it will be used unless overridden in qemu.conf which is the original behavior.
If a swtpm_user or swtpm_group is defined in /etc/libvirt/qemu.conf and does not exist that will still generate the message no change in behavior.
Comment by loqs (loqs) - Monday, 12 November 2018, 14:32 GMT
Invert test result so that root is used when the user/group does not exist or name to id mapping fails then fallback to using root.
In the previous version if tss user/group existed and the id mapping succeeded then the fallback would be used.
Comment by loqs (loqs) - Monday, 19 November 2018, 16:09 GMT Comment by loqs (loqs) - Tuesday, 20 November 2018, 17:11 GMT Comment by loqs (loqs) - Monday, 03 December 2018, 21:38 GMT
Upstream fix is contained in v4.10.0

Loading...