yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #87023
[Bug 1853159] Re: Compute node soft undelete raises inactive session error
Reviewed: https://review.opendev.org/c/openstack/nova/+/695189
Committed: https://opendev.org/openstack/nova/commit/2383cbb4a518821d245fce316b3778c8ba8e5246
Submitter: "Zuul (22348)"
Branch: master
commit 2383cbb4a518821d245fce316b3778c8ba8e5246
Author: Mark Goddard <mark@xxxxxxxxxxxx>
Date: Wed Nov 20 12:01:33 2019 +0000
Fix inactive session error in compute node creation
In the fix for bug 1839560 [1][2], soft-deleted compute nodes may be
restored, to ensure we can reuse ironic node UUIDs as compute node
UUIDs. While this seems to largely work, it results in some nasty errors
being generated [3]:
InvalidRequestError This session is in 'inactive' state, due to the
SQL transaction being rolled back; no further SQL can be emitted
within this transaction.
This happens because compute_node_create is decorated with
pick_context_manager_writer, which begins a transaction. While
_compute_node_get_and_update_deleted claims that calling a second
pick_context_manager_writer decorated function will begin a new
subtransaction, this does not appear to be the case.
This change removes pick_context_manager_writer from the
compute_node_create function, and adds a new _compute_node_create
function which ensures the transaction is finished if
_compute_node_get_and_update_deleted is called.
The new unit test added here fails without this change.
This change marks the removal of the final FIXME from the functional
test added in [4].
[1] https://bugs.launchpad.net/nova/+bug/1839560
[2] https://git.openstack.org/cgit/openstack/nova/commit/?id=89dd74ac7f1028daadf86cb18948e27fe9d1d411
[3] http://paste.openstack.org/show/786350/
[4] https://review.opendev.org/#/c/695012/
Change-Id: Iae119ea8776bc7f2e5dbe2e502a743217beded73
Closes-Bug: #1853159
Related-Bug: #1853009
** Changed in: nova
Status: In Progress => Fix Released
--
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/1853159
Title:
Compute node soft undelete raises inactive session error
Status in OpenStack Compute (nova):
Fix Released
Bug description:
In the fix for bug 1839560, soft-deleted compute nodes may be
restored, to ensure we can reuse ironic node UUIDs as compute node
UUIDs. While this seems to largely work, it results in some nasty
errors being generated.
Steps to reproduce
==================
Same as bug 1839560.
Expected results
================
Compute node is restored in an orderly fashion.
Actual results
==============
Example error:
http://paste.openstack.org/show/786350/
Despite the error, all my testing shows that the node is actually
restored. However, the exception raised breaks the execution of the
resource tracker update, which no doubt has some unintended
consequences.
Environment
===========
Seen on Rocky 18.2.0, and master (in functional testing).
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1853159/+subscriptions
References