yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #46915
[Bug 1549814] [NEW] Metadata caching is fundamentally broken
Public bug reported:
The caching backend for memcached/dogpile stores whole Python objects by
creating a deep copy. Metadata is cached by storing the metadata Python
object, and therefore the whole object tree underneath, including the
"instance" attribute. Whenever the metadata is fetched, it also fetches
the old version of instance with it, and works on it. This has several
implications, like for example lazy fetched fields of the "instance"
object are never cached, if they are not pre-fetched before caching.
Also it might implicate security issues.
It would be probably a better approach to actually cache the DB query
results only, and not the whole populated "living" object.
** Affects: nova
Importance: Undecided
Status: New
** Description changed:
- The caching backend for memcached /dogpile stores whole Python objects
- by creating a deep copy. Metadata is cached by storing the metadata
- Python object, and therefore the whole object tree underneath, including
- the "instance" attribute. Whenever the metadata is fetched, it also
- fetches the old version of instance with it, and works on it. This has
- several implications, like for example lazy fetched fields of the
- "instance" object are never cached, if they are not pre-fetched before
- caching. Also it might implicate security issues.
+ The caching backend for memcached/dogpile stores whole Python objects by
+ creating a deep copy. Metadata is cached by storing the metadata Python
+ object, and therefore the whole object tree underneath, including the
+ "instance" attribute. Whenever the metadata is fetched, it also fetches
+ the old version of instance with it, and works on it. This has several
+ implications, like for example lazy fetched fields of the "instance"
+ object are never cached, if they are not pre-fetched before caching.
+ Also it might implicate security issues.
It would be probably a better approach to actually cache the DB query
results only, and not the whole populated "living" object.
--
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/1549814
Title:
Metadata caching is fundamentally broken
Status in OpenStack Compute (nova):
New
Bug description:
The caching backend for memcached/dogpile stores whole Python objects
by creating a deep copy. Metadata is cached by storing the metadata
Python object, and therefore the whole object tree underneath,
including the "instance" attribute. Whenever the metadata is fetched,
it also fetches the old version of instance with it, and works on it.
This has several implications, like for example lazy fetched fields of
the "instance" object are never cached, if they are not pre-fetched
before caching. Also it might implicate security issues.
It would be probably a better approach to actually cache the DB query
results only, and not the whole populated "living" object.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1549814/+subscriptions
Follow ups