yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #93240
[Bug 2047100] [NEW] Agent resource cache updates
Public bug reported:
1. Agent resource cache has an infinite growth set: _satisfied_server_queries
https://github.com/openstack/neutron/blob/master/neutron/agent/resource_cache.py#L41
there is no entry removal for this set.
2. Because this set has a non-standard structure, for instance:
set([('Port', ('id', (u'830d035e-5138-49ae-bbe4-324f4096656d',))), ('Network', ('id', ('e04208de-1006-4a6b-881a-83129856afa6',))), ('Network', ('id', ('505155ea-8fbb-42d1-a8c9-cc2c78f8476e',))), ('Port', ('id', (u'ac825cc9-906a-45db-a77d-4e336fc1c4ea',))), ('Port', ('id', (u'c3a72a39-dbd5-4737-a68c-120de93b186c',))), ('Network', ('id', ('cd5155df-9777-4487-a730-b5ee533c4f80',))), ('Port', ('id', (u'340e02f2-fe54-4f31-8858-7f6413fb0010',))), ('Port', ('id', (u'64fc4d85-04d6-453f-8d20-f4d1308d34fd',))), ('Network', ('id', ('a6201723-a237-433c-b357-82a6a24526e5',))), ('Network', ('id', ('71a80697-1705-4bd0-b65b-0fd7dd616836',))), ('Port', ('security_group_ids', ('48a2ebb8-16ea-4a0a-9d45-eabc6a6b3dcf',))), ('Network', ('id', ('7e83c48a-b246-4a02-bb87-10016ac4b47e',))), ('SecurityGroupRule', ('security_group_id', (u'48a2ebb8-16ea-4a0a-9d45-eabc6a6b3dcf',))), ('Port', ('id', (u'2cc656ba-b07b-4e85-ad56-ee6da4b2e763',))), ('Port', ('id', (u'89d0aab8-82f7-4e5e-98b1-e009e31498ce',))), ('Port', ('id', (u'd820dbc2-bf4f-463b-9a67-6b704202bee0',))), ('Network', ('id', ('aea5771b-9655-4936-b9f4-f94d482c0b15',))), ('Port', ('id', (u'68c3e31b-9bf6-45e9-bfbb-3da1cafebcec',)))])
It's hardly to remove all entries for one resource at all, because if
some codes query cache by filter=None, some codes use fitler={"x":y,
"a": b}, the entries are various, especially when the code is not in
Neutron.
3. If the port removed, and added again, because the query is in the
_satisfied_server_queries:
https://github.com/openstack/neutron/blob/master/neutron/agent/resource_cache.py#L75
It may return None or stale resource.
So, it's better to remove such "server_queries" records. Because, if the
resource is in cache, just return it. If it is not, get it from neutron-
server.
** Affects: neutron
Importance: Undecided
Status: New
** Description changed:
- 1. Agent resource cache has a infinite growth set: _satisfied_server_queries
+ 1. Agent resource cache has an infinite growth set: _satisfied_server_queries
https://github.com/openstack/neutron/blob/master/neutron/agent/resource_cache.py#L41
there is no entry removal for this set.
2. Because this set has a non-standard structure, for instance:
set([('Port', ('id', (u'830d035e-5138-49ae-bbe4-324f4096656d',))), ('Network', ('id', ('e04208de-1006-4a6b-881a-83129856afa6',))), ('Network', ('id', ('505155ea-8fbb-42d1-a8c9-cc2c78f8476e',))), ('Port', ('id', (u'ac825cc9-906a-45db-a77d-4e336fc1c4ea',))), ('Port', ('id', (u'c3a72a39-dbd5-4737-a68c-120de93b186c',))), ('Network', ('id', ('cd5155df-9777-4487-a730-b5ee533c4f80',))), ('Port', ('id', (u'340e02f2-fe54-4f31-8858-7f6413fb0010',))), ('Port', ('id', (u'64fc4d85-04d6-453f-8d20-f4d1308d34fd',))), ('Network', ('id', ('a6201723-a237-433c-b357-82a6a24526e5',))), ('Network', ('id', ('71a80697-1705-4bd0-b65b-0fd7dd616836',))), ('Port', ('security_group_ids', ('48a2ebb8-16ea-4a0a-9d45-eabc6a6b3dcf',))), ('Network', ('id', ('7e83c48a-b246-4a02-bb87-10016ac4b47e',))), ('SecurityGroupRule', ('security_group_id', (u'48a2ebb8-16ea-4a0a-9d45-eabc6a6b3dcf',))), ('Port', ('id', (u'2cc656ba-b07b-4e85-ad56-ee6da4b2e763',))), ('Port', ('id', (u'89d0aab8-82f7-4e5e-98b1-e009e31498ce',))), ('Port', ('id', (u'd820dbc2-bf4f-463b-9a67-6b704202bee0',))), ('Network', ('id', ('aea5771b-9655-4936-b9f4-f94d482c0b15',))), ('Port', ('id', (u'68c3e31b-9bf6-45e9-bfbb-3da1cafebcec',)))])
It's hardly to remove all one ports' entry at all, because if some codes
query cache by filter=None, some codes use fitler={"x":y, "a": b},
especially when the code is not in Neutron.
3. If the port removed, and added again, because the query is in the
_satisfied_server_queries:
https://github.com/openstack/neutron/blob/master/neutron/agent/resource_cache.py#L75
It may return None or stale resource.
So, it's better to remove such "server_queries" records. Because, if the
resource is in cache, just return it. If it is not, get it from neutron-
server.
** Description changed:
1. Agent resource cache has an infinite growth set: _satisfied_server_queries
https://github.com/openstack/neutron/blob/master/neutron/agent/resource_cache.py#L41
there is no entry removal for this set.
2. Because this set has a non-standard structure, for instance:
set([('Port', ('id', (u'830d035e-5138-49ae-bbe4-324f4096656d',))), ('Network', ('id', ('e04208de-1006-4a6b-881a-83129856afa6',))), ('Network', ('id', ('505155ea-8fbb-42d1-a8c9-cc2c78f8476e',))), ('Port', ('id', (u'ac825cc9-906a-45db-a77d-4e336fc1c4ea',))), ('Port', ('id', (u'c3a72a39-dbd5-4737-a68c-120de93b186c',))), ('Network', ('id', ('cd5155df-9777-4487-a730-b5ee533c4f80',))), ('Port', ('id', (u'340e02f2-fe54-4f31-8858-7f6413fb0010',))), ('Port', ('id', (u'64fc4d85-04d6-453f-8d20-f4d1308d34fd',))), ('Network', ('id', ('a6201723-a237-433c-b357-82a6a24526e5',))), ('Network', ('id', ('71a80697-1705-4bd0-b65b-0fd7dd616836',))), ('Port', ('security_group_ids', ('48a2ebb8-16ea-4a0a-9d45-eabc6a6b3dcf',))), ('Network', ('id', ('7e83c48a-b246-4a02-bb87-10016ac4b47e',))), ('SecurityGroupRule', ('security_group_id', (u'48a2ebb8-16ea-4a0a-9d45-eabc6a6b3dcf',))), ('Port', ('id', (u'2cc656ba-b07b-4e85-ad56-ee6da4b2e763',))), ('Port', ('id', (u'89d0aab8-82f7-4e5e-98b1-e009e31498ce',))), ('Port', ('id', (u'd820dbc2-bf4f-463b-9a67-6b704202bee0',))), ('Network', ('id', ('aea5771b-9655-4936-b9f4-f94d482c0b15',))), ('Port', ('id', (u'68c3e31b-9bf6-45e9-bfbb-3da1cafebcec',)))])
- It's hardly to remove all one ports' entry at all, because if some codes
- query cache by filter=None, some codes use fitler={"x":y, "a": b},
- especially when the code is not in Neutron.
+ It's hardly to remove all entries for one resource at all, because if
+ some codes query cache by filter=None, some codes use fitler={"x":y,
+ "a": b}, the entries are various, especially when the code is not in
+ Neutron.
3. If the port removed, and added again, because the query is in the
_satisfied_server_queries:
https://github.com/openstack/neutron/blob/master/neutron/agent/resource_cache.py#L75
It may return None or stale resource.
So, it's better to remove such "server_queries" records. Because, if the
resource is in cache, just return it. If it is not, get it from neutron-
server.
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2047100
Title:
Agent resource cache updates
Status in neutron:
New
Bug description:
1. Agent resource cache has an infinite growth set: _satisfied_server_queries
https://github.com/openstack/neutron/blob/master/neutron/agent/resource_cache.py#L41
there is no entry removal for this set.
2. Because this set has a non-standard structure, for instance:
set([('Port', ('id', (u'830d035e-5138-49ae-bbe4-324f4096656d',))), ('Network', ('id', ('e04208de-1006-4a6b-881a-83129856afa6',))), ('Network', ('id', ('505155ea-8fbb-42d1-a8c9-cc2c78f8476e',))), ('Port', ('id', (u'ac825cc9-906a-45db-a77d-4e336fc1c4ea',))), ('Port', ('id', (u'c3a72a39-dbd5-4737-a68c-120de93b186c',))), ('Network', ('id', ('cd5155df-9777-4487-a730-b5ee533c4f80',))), ('Port', ('id', (u'340e02f2-fe54-4f31-8858-7f6413fb0010',))), ('Port', ('id', (u'64fc4d85-04d6-453f-8d20-f4d1308d34fd',))), ('Network', ('id', ('a6201723-a237-433c-b357-82a6a24526e5',))), ('Network', ('id', ('71a80697-1705-4bd0-b65b-0fd7dd616836',))), ('Port', ('security_group_ids', ('48a2ebb8-16ea-4a0a-9d45-eabc6a6b3dcf',))), ('Network', ('id', ('7e83c48a-b246-4a02-bb87-10016ac4b47e',))), ('SecurityGroupRule', ('security_group_id', (u'48a2ebb8-16ea-4a0a-9d45-eabc6a6b3dcf',))), ('Port', ('id', (u'2cc656ba-b07b-4e85-ad56-ee6da4b2e763',))), ('Port', ('id', (u'89d0aab8-82f7-4e5e-98b1-e009e31498ce',))), ('Port', ('id', (u'd820dbc2-bf4f-463b-9a67-6b704202bee0',))), ('Network', ('id', ('aea5771b-9655-4936-b9f4-f94d482c0b15',))), ('Port', ('id', (u'68c3e31b-9bf6-45e9-bfbb-3da1cafebcec',)))])
It's hardly to remove all entries for one resource at all, because if
some codes query cache by filter=None, some codes use fitler={"x":y,
"a": b}, the entries are various, especially when the code is not in
Neutron.
3. If the port removed, and added again, because the query is in the
_satisfied_server_queries:
https://github.com/openstack/neutron/blob/master/neutron/agent/resource_cache.py#L75
It may return None or stale resource.
So, it's better to remove such "server_queries" records. Because, if
the resource is in cache, just return it. If it is not, get it from
neutron-server.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2047100/+subscriptions