Missing User TSS form nova-compute image

Bug #2067050 reported by Sunil Kumar K C
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
New
Undecided
Unassigned

Bug Description

Kolla version: stable/2023.2 (probably impact other Kolla versions)
OS version: Ubuntu 22.04.4 (probably impact other OS distributions)

Hi,
We were testing TPM support on Kolla-Ansible Openstack, downloaded new image with swtpm and swtpm_tools, fixed in bug https://bugs.launchpad.net/kolla/+bug/2062572.

we ran into error "KeyError: "getpwnam(): name not found: 'tss'"

LOGS:
2024-05-24 06:02:00.191 2 ERROR oslo_service.service [None req-c209a50d-b6a8-4e4e-836e-3f124b1q1e34t - - - - - -] Error starting thread.: nova.exception.InvalidConfiguration: The user configured in '[libvirt] swtpm_user' does not exist on this host; expected 'tss'.
2024-05-24 06:02:00.191 2 ERROR oslo_service.service Traceback (most recent call last):
2024-05-24 06:02:00.191 2 ERROR oslo_service.service File "/var/lib/kolla/venv/lib/python3.10/site-packages/nova/virt/libvirt/driver.py", line 1077, in _check_vtpm_support
2024-05-24 06:02:00.191 2 ERROR oslo_service.service pwd.getpwnam(CONF.libvirt.swtpm_user)
2024-05-24 06:02:00.191 2 ERROR oslo_service.service KeyError: "getpwnam(): name not found: 'tss'"
2024-05-24 06:02:00.191 2 ERROR oslo_service.service
2024-05-24 06:02:00.191 2 ERROR oslo_service.service During handling of the above exception, another exception occurred:
2024-05-24 06:02:00.191 2 ERROR oslo_service.service
2024-05-24 06:02:00.191 2 ERROR oslo_service.service Traceback (most recent call last):
2024-05-24 06:02:00.191 2 ERROR oslo_service.service File "/var/lib/kolla/venv/lib/python3.10/site-packages/oslo_service/service.py", line 806, in run_service
2024-05-24 06:02:00.191 2 ERROR oslo_service.service service.start()
2024-05-24 06:02:00.191 2 ERROR oslo_service.service File "/var/lib/kolla/venv/lib/python3.10/site-packages/nova/service.py", line 162, in start
2024-05-24 06:02:00.191 2 ERROR oslo_service.service self.manager.init_host(self.service_ref)
2024-05-24 06:02:00.191 2 ERROR oslo_service.service File "/var/lib/kolla/venv/lib/python3.10/site-packages/nova/compute/manager.py", line 1610, in init_host
2024-05-24 06:02:00.191 2 ERROR oslo_service.service self.driver.init_host(host=self.host)
2024-05-24 06:02:00.191 2 ERROR oslo_service.service File "/var/lib/kolla/venv/lib/python3.10/site-packages/nova/virt/libvirt/driver.py", line 850, in init_host
2024-05-24 06:02:00.191 2 ERROR oslo_service.service self._check_vtpm_support()
2024-05-24 06:02:00.191 2 ERROR oslo_service.service File "/var/lib/kolla/venv/lib/python3.10/site-packages/nova/virt/libvirt/driver.py", line 1082, in _check_vtpm_support
2024-05-24 06:02:00.191 2 ERROR oslo_service.service raise exception.InvalidConfiguration(msg % CONF.libvirt.swtpm_user)
2024-05-24 06:02:00.191 2 ERROR oslo_service.service nova.exception.InvalidConfiguration: The user configured in '[libvirt] swtpm_user' does not exist on this host; expected 'tss'.
2024-05-24 06:02:00.191 2 ERROR oslo_service.service

Nova compute fails to start because of this.

Fix is to ensure user tss is created like below

tss:x:115:115:TPM software stack,,,:/var/lib/tpm:/bin/false

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.