← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2125030] [NEW] Revert resize of instance with vTPM to flavor also with vTPM fails with ERROR state when storage is not shared

 

Public bug reported:

I stumbled across this bug while working on vTPM live migration
functional tests and was able to also reproduce the failure in a
proposed whitebox tempest test patch [1].

When attempting to revert a resize of an instance with vTPM to a flavor
also with vTPM, the revert will fail with the following traceback [2]:

ERROR nova.compute.manager [None req-009ffcaf-3dc4-4f22-b636-184cf2e0830a tempest-VTPMTest-1347189149 tempest-VTPMTest-1347189149-project-member] [instance: bd387843-0b5a-4340-859c-013f27e39e7a] Setting instance vm_state to ERROR: nova.exception.Invalid: Refusing to create an emulated TPM with no secret!
ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a] Traceback (most recent call last):
ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]   File "/opt/stack/nova/nova/compute/manager.py", line 11546, in _error_out_instance_on_exception
ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]     yield
ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]   File "/opt/stack/nova/nova/compute/manager.py", line 6046, in _finish_revert_resize
ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]     self.driver.finish_revert_migration(
ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 12779, in finish_revert_migration
ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]     xml = self._get_guest_xml(context, instance, network_info, disk_info,
ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 8047, in _get_guest_xml
ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]     conf = self._get_guest_config(instance, network_info, image_meta,
ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 7571, in _get_guest_config
ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]     self._add_vtpm_device(guest, flavor, instance, image_meta)
ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 6837, in _add_vtpm_device
ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]     raise exception.Invalid(
ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a] nova.exception.Invalid: Refusing to create an emulated TPM with no secret!

The root cause appears to be the fact that the vTPM secret is always
deleted from Barbican when driver.destroy() is called, and
driver.destroy() is called as part of the revert resize code path [3].

I don't yet know the best way to fix this but I will be working on it as
part of the vTPM live migration effort.

[1] https://review.opendev.org/c/openstack/whitebox-tempest-plugin/+/961558
[2] https://zuul.opendev.org/t/openstack/build/091220ed15dc41dfab65b7ce6cb629de/log/compute-host/logs/screen-n-cpu.txt#91404
[3] https://github.com/openstack/nova/blob/1d317f043e03e06dc3bc25acb750efb586551572/nova/compute/manager.py#L5947

** Affects: nova
     Importance: Undecided
     Assignee: melanie witt (melwitt)
         Status: In Progress


** Tags: compute libvirt

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/2125030

Title:
  Revert resize of instance with vTPM to flavor also with vTPM fails
  with ERROR state when storage is not shared

Status in OpenStack Compute (nova):
  In Progress

Bug description:
  I stumbled across this bug while working on vTPM live migration
  functional tests and was able to also reproduce the failure in a
  proposed whitebox tempest test patch [1].

  When attempting to revert a resize of an instance with vTPM to a
  flavor also with vTPM, the revert will fail with the following
  traceback [2]:

  ERROR nova.compute.manager [None req-009ffcaf-3dc4-4f22-b636-184cf2e0830a tempest-VTPMTest-1347189149 tempest-VTPMTest-1347189149-project-member] [instance: bd387843-0b5a-4340-859c-013f27e39e7a] Setting instance vm_state to ERROR: nova.exception.Invalid: Refusing to create an emulated TPM with no secret!
  ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a] Traceback (most recent call last):
  ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]   File "/opt/stack/nova/nova/compute/manager.py", line 11546, in _error_out_instance_on_exception
  ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]     yield
  ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]   File "/opt/stack/nova/nova/compute/manager.py", line 6046, in _finish_revert_resize
  ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]     self.driver.finish_revert_migration(
  ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 12779, in finish_revert_migration
  ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]     xml = self._get_guest_xml(context, instance, network_info, disk_info,
  ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 8047, in _get_guest_xml
  ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]     conf = self._get_guest_config(instance, network_info, image_meta,
  ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 7571, in _get_guest_config
  ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]     self._add_vtpm_device(guest, flavor, instance, image_meta)
  ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 6837, in _add_vtpm_device
  ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a]     raise exception.Invalid(
  ERROR nova.compute.manager [instance: bd387843-0b5a-4340-859c-013f27e39e7a] nova.exception.Invalid: Refusing to create an emulated TPM with no secret!

  The root cause appears to be the fact that the vTPM secret is always
  deleted from Barbican when driver.destroy() is called, and
  driver.destroy() is called as part of the revert resize code path [3].

  I don't yet know the best way to fix this but I will be working on it
  as part of the vTPM live migration effort.

  [1] https://review.opendev.org/c/openstack/whitebox-tempest-plugin/+/961558
  [2] https://zuul.opendev.org/t/openstack/build/091220ed15dc41dfab65b7ce6cb629de/log/compute-host/logs/screen-n-cpu.txt#91404
  [3] https://github.com/openstack/nova/blob/1d317f043e03e06dc3bc25acb750efb586551572/nova/compute/manager.py#L5947

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/2125030/+subscriptions