nova/nova/objects
Matt Riedemann 03a2508362 Fix listing deleted servers with a marker
Change I1aa3ca6cc70cef65d24dec1e7db9491c9b73f7ab in Queens,
which was backported through to Newton, introduced a regression
when listing deleted servers with a marker because it assumes
that if BuildRequestList.get_by_filters does not raise
MarkerNotFound that the marker was found among the build requests
and does not account for that get_by_filters method short-circuiting
if filtering servers with deleted/cleaned/limit=0. The API code
then nulls out the marker which means you'll continue to get the
marker instance back in the results even though you shouldn't,
and that can cause an infinite loop in some client-side tooling like
nova's CLI:

  nova list --deleted --limit -1

This fixes the bug by raising MarkerNotFound from
BuildRequestList.get_by_filters if we have a marker but are
short-circuiting and returning early from the method based on
limit or filters.

Change-Id: Ic2b19c2aa06b3059ab0344b6ac56ffd62b3f755d
Closes-Bug: #1849409
(cherry picked from commit df03499843)
2019-10-23 14:50:06 -04:00
..
__init__.py object: Introduce Resource and ResourceList objs 2019-09-13 08:50:35 +00:00
agent.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
aggregate.py DB API changes to get non-matching aggregates from metadata 2019-09-12 16:56:32 -05:00
bandwidth_usage.py Stop handling 'update_cells' on 'BandwidthUsage.create' 2019-05-20 10:29:16 +01:00
base.py object: Introduce Resource and ResourceList objs 2019-09-13 08:50:35 +00:00
block_device.py Remove 'bdm_(update_or_create|destroy)_at_top' 2019-04-16 18:26:17 +01:00
build_request.py Fix listing deleted servers with a marker 2019-10-23 14:50:06 -04:00
cell_mapping.py Fix using template cell urls with nova-manage 2019-01-17 14:18:14 -08:00
compute_node.py hacking: Resolve W503 (line break occurred before a binary operator) 2019-06-24 14:24:06 -05:00
console_auth_token.py Reduce scope of 'path' query parameter to noVNC consoles 2019-10-01 22:16:42 +00:00
diagnostics.py Added nova objects for intance diagnostics 2017-05-30 00:39:44 +04:00
dns_domain.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
ec2.py objects: Remove unused ec2 objects 2019-07-10 16:15:20 +01:00
external_event.py API microversion 2.76: Add 'power-update' external event 2019-08-15 13:19:44 -04:00
fields.py Merge "Add reminder to update corresponding glance docs" 2019-09-23 19:58:54 +00:00
fixed_ip.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
flavor.py Merge "Remove old flavor_create db api method" 2018-03-20 18:11:06 +00:00
floating_ip.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
host_mapping.py Warn for duplicate host mappings during discover_hosts 2019-06-13 17:18:16 +00:00
hv_spec.py objects: Move 'hv_type' to 'fields.HVType' 2016-11-25 16:19:43 +00:00
image_meta.py Add extra spec parameter and image property for memory encryption 2019-09-01 15:17:31 +01:00
instance.py Merge "Tune up db.instance_get_all_uuids_by_hosts" 2019-09-23 19:58:43 +00:00
instance_action.py Add InstanceAction/Event create() method 2019-08-07 17:56:01 -04:00
instance_fault.py Remove 'instance_fault_create_at_top' 2019-04-29 17:54:17 +01:00
instance_group.py Avoid unnecessary joins in InstanceGroup.get_hosts 2019-05-23 11:14:55 -04:00
instance_info_cache.py Remove 'instance_info_cache_update_at_top' 2019-04-29 17:55:41 +01:00
instance_mapping.py hacking: Resolve W503 (line break occurred before a binary operator) 2019-06-24 14:24:06 -05:00
instance_numa.py objects: Add 'InstanceNUMATopology.cpu_pinning' property 2019-09-18 00:19:33 +01:00
instance_pci_requests.py [FUP] Follow-up patch for SR-IOV live migration 2019-07-02 13:52:01 -05:00
keypair.py Drop migrate_keypairs_to_api_db data migration 2019-04-03 11:42:48 -04:00
migrate_data.py New objects for NUMA live migration 2019-09-12 17:34:34 -04:00
migration.py Set user_id/project_id from context when creating a Migration 2019-09-12 16:52:26 +00:00
migration_context.py object: Introduce Resource and ResourceList objs 2019-09-13 08:50:35 +00:00
monitor_metric.py Fix MonitorMetric obj_make_compatible 2016-09-12 14:10:41 +00:00
network.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
network_metadata.py Assorted cleanups from numa-aware-vswitches series 2018-07-27 09:49:12 -07:00
network_request.py Merge "Remove DictCompat from NetworkRequest" 2016-06-30 10:23:36 +00:00
numa.py Merge "objects: use all_things_equal from objects.base" 2019-09-24 16:51:11 +00:00
pci_device.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
pci_device_pool.py [2/3]Replace six.iteritems() with .items() 2017-01-09 09:11:00 +00:00
quotas.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
request_spec.py Note about Destination.forbidden_aggregates 2019-09-12 20:18:01 +00:00
resource.py libvirt: Enable driver discovering PMEM namespaces 2019-09-13 08:50:35 +00:00
security_group.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
security_group_rule.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
selection.py Move the to_dict() method to the Selection object 2017-12-07 15:01:09 +00:00
service.py NUMA live migration support 2019-09-12 17:34:34 -04:00
tag.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
task_log.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
trusted_certs.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
vcpu_model.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
virt_cpu_topology.py cleanup NovaObjectDictCompat from virt_cpu_topology 2015-08-05 08:56:30 +05:30
virt_device_metadata.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
virtual_interface.py Populate InstanceMapping.user_id during migrations and schedules 2019-03-08 19:01:25 -05:00
volume_usage.py Transform volume.usage notification 2018-10-09 06:28:11 +00:00