[ovirt-devel] VDSM - sampling.py - remove() called without previous add()

Christopher Pereira kripper at imatronix.cl
Wed Apr 29 10:33:01 UTC 2015


On 28-04-2015 17:44, Nir Soffer wrote:
>> In sampling.py, remove() is being called without calling add() before, which
>> throws:
> Fixed in master, please update:
> https://gerrit.ovirt.org/40223
>
Hi Nir,

Still present:

Traceback (most recent call last):
   File "/usr/lib/python2.7/site-packages/yajsonrpc/__init__.py", line 
464, in _serveRequest
     res = method(**params)
   File "/usr/share/vdsm/rpc/Bridge.py", line 273, in _dynamicMethod
     result = fn(*methodArgs)
   File "/usr/share/vdsm/API.py", line 339, in destroy
     res = v.destroy()
   File "/usr/share/vdsm/virt/vm.py", line 3517, in destroy
     result = self.doDestroy()
   File "/usr/share/vdsm/virt/vm.py", line 3535, in doDestroy
     return self.releaseVm()
   File "/usr/share/vdsm/virt/vm.py", line 3450, in releaseVm 
<-------------------------------- Also called here
     sampling.stats_cache.remove(self.id)
   File "/usr/share/vdsm/virt/sampling.py", line 428, in remove
     del self._vm_last_timestamp[vmid]

Consider making the function foolproof/flow-independent:

428,429c428
<             if vmid in self._vm_last_timestamp.keys():
<                 del self._vm_last_timestamp[vmid]
---
 >             del self._vm_last_timestamp[vmid]




More information about the Devel mailing list