Using suds objects as keys for the DatastoreBrowser cache is incorrect
because they don't implement __eq__ and __hash__ for the VIM types.
This always results in cache miss and the cache grows with every spawn()
operation.
This patch fix this by using the 'value' property (which is string) of
the MoRef as key.
Closes-Bug: 1316433
(cherry picked from commit bceb3f96b06ff8a048598724494299cf111bcaf8)
Reviewed: https:/ /review. openstack. org/97707 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=4820dbb4fdb 39476a9b4dcd8dc 42070f69bdd599
Committed: https:/
Submitter: Jenkins
Branch: stable/icehouse
commit 4820dbb4fdb3947 6a9b4dcd8dc4207 0f69bdd599
Author: Radoslav Gerganov <email address hidden>
Date: Mon Jun 2 10:21:45 2014 +0300
VMware: Fix memory leaks caused by caches
Using suds objects as keys for the DatastoreBrowser cache is incorrect
because they don't implement __eq__ and __hash__ for the VIM types.
This always results in cache miss and the cache grows with every spawn()
operation.
This patch fix this by using the 'value' property (which is string) of
the MoRef as key.
Closes-Bug: 1316433 048598724494299 cf111bcaf8)
(cherry picked from commit bceb3f96b06ff8a
Conflicts:
nova/ tests/virt/ vmwareapi/ test_imagecache .py tests/virt/ vmwareapi/ test_vmops. py
nova/
Change-Id: I2bcaf87e733d51 055566aee41bb0a 7e254027ba9