nova/nova/tests/functional/regressions
melanie witt 35112d7667 Handle instance = None in _local_delete_cleanup
Change I4d3193d8401614311010ed0e055fcb3aaeeebaed added some
additional local delete cleanup to prevent leaking of placement
allocations. The change introduced a regression in our "delete while
booting" handling as the _local_delete_cleanup required a valid
instance object to do its work and in two cases, we could have
instance = None from _lookup_instance if we are racing with a create
request and the conductor has deleted the instance record while we
are in the middle of processing the delete request.

This handles those scenarios by doing two things:

  (1) Changing the _local_delete_cleanup and
      _update_queued_for_deletion methods to take an instance UUID
      instead of a full instance object as they really only need the
      UUID to do their work
  (2) Saving a copy of the instance UUID before doing another instance
      lookup which might return None and passing that UUID to the
      _local_delete_cleanup and _update_queued_for_deletion methods

Closes-Bug: #1914777

Change-Id: I03cf285ad83e09d88cdb702a88dfed53c01610f8
(cherry picked from commit 123f6262f6)
2021-02-23 20:12:47 +00:00
..
README.rst
__init__.py
test_bug_1404867.py func: Add CinderFixture to _IntegratedTestBase 2020-08-03 20:41:18 +01:00
test_bug_1522536.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1541691.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1548980.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1552888.py Trivial-Fix: Fix typos 2016-06-13 06:41:08 +00:00
test_bug_1554631.py Catching OverQuota Exception 2017-05-03 19:00:34 +00:00
test_bug_1558866.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1568208.py Fix generation of Guru Meditation Report 2016-04-13 17:00:32 +03:00
test_bug_1595962.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1620248.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1669054.py tests: Remove 'test_servers.ServersTestBase' 2020-07-16 17:58:37 +01:00
test_bug_1670627.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1671648.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1675570.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1678326.py functional: Rework '_delete_server' 2019-11-15 16:06:57 +00:00
test_bug_1679750.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1682693.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1689692.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1702454.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1713783.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1718455.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1718512.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1719730.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1732947.py func: Add CinderFixture to _IntegratedTestBase 2020-08-03 20:41:18 +01:00
test_bug_1735407.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1741125.py functional: Add unified '_build_server' helper function 2020-01-15 10:31:24 +00:00
test_bug_1741307.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1746483.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1764556.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1764883.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1778305.py Don't generate service UUID for deleted services 2019-07-30 18:48:51 +00:00
test_bug_1780373.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1781286.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1781710.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1784353.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1790204.py Make API always RPC cast to conductor for resize/migrate 2019-11-13 10:19:53 -05:00
test_bug_1794996.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_bug_1797580.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1806064.py functional: Add '_delete_server' to 'InstanceHelperMixin' 2020-01-15 10:31:24 +00:00
test_bug_1806515.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1815153.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1823370.py tests: Remove 'test_servers.ServersTestBase' 2020-07-16 17:58:37 +01:00
test_bug_1825020.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1825034.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1825537.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_bug_1830747.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1831771.py functional: Avoid race and fix use of self.api within test_bug_1831771 2020-03-04 13:39:45 +00:00
test_bug_1835822.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1837955.py functional: Drop '_api' suffix from placement fixture 2020-08-19 18:07:25 +01:00
test_bug_1839560.py nova-manage db archive_deleted_rows is not multi-cell aware 2019-08-27 06:01:58 +00:00
test_bug_1843090.py functional: Add unified '_build_server' helper function 2020-01-15 10:31:24 +00:00
test_bug_1843708.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1845291.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_bug_1848343.py functional: Add '_create_server' helper 2020-01-20 14:32:43 +00:00
test_bug_1849165.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_bug_1849409.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1852458.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1862633.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1879878.py functional: Enable real policy fixture by default 2020-09-16 11:31:23 +01:00
test_bug_1886418.py functional: Enable real policy fixture by default 2020-09-16 11:31:23 +01:00
test_bug_1888395.py functional: Add 'start_compute' helper 2020-09-10 13:51:57 +01:00
test_bug_1889108.py Track error migrations in resource tracker 2020-09-10 05:30:39 +00:00
test_bug_1893284.py functional: Add and use 'GlanceFixture' 2020-09-16 11:31:23 +01:00
test_bug_1894966.py api: Set min, maxItems for server_group.policies field 2020-09-16 11:13:47 +01:00
test_bug_1895696.py compute: Skip cinder_encryption_key_id check when booting from volume 2020-09-17 12:16:54 +01:00
test_bug_1896463.py Set instance host and drop migration under lock 2020-11-18 11:36:36 +01:00
test_bug_1899649.py compute: Don't detach volumes when RescheduledException raised without retry 2020-12-07 09:42:53 +00:00
test_bug_1902925.py Fix the compute RPC 5.12 issue 2020-11-05 17:47:04 +01:00
test_bug_1914777.py Handle instance = None in _local_delete_cleanup 2021-02-23 20:12:47 +00:00

README.rst

Tests for Specific Regressions

When we have a bug reported by end users that we can write a full stack reproduce on, we should. And we should keep a regression test for that bug in our tree. It can be deleted at some future date if needed, but largely should not be changed.

Writing Regression Tests

  • These should be full stack tests which inherit from nova.test.TestCase directly. (This is to prevent coupling with other tests).
  • They should setup a full stack cloud in their setUp via fixtures
  • They should each live in a file which is named test_bug######.py

Writing Tests Before the Bug is Fixed

TODO describe writing and landing tests before the bug is fixed as a reproduce.