Univention Bugzilla – Bug 35081
UMC caching prevents UVMM storgage pool update
Last modified: 2023-06-28 10:51:47 CEST
Some caching between the UVMM JS frontend and UVMMd prevents the storage pool size from being updated. Even with Bug #35080 applied the JS frontend still returns the old values: result: [,…] ... 3: {available:666894336, capacity:1069547520, name:logical, active:true, path:/dev/logical, type:logical,…} On the other hand the UMC-CLI-tools returns the updated values: uvmm pools qemu://xen12.phahn.dev/system DATA: ... {'active': True, 'available': 398458880, 'capacity': 1069547520, 'name': 'logical', 'path': u'/dev/logical', 'type': u'logical', 'uuid': u'bcded861-a586-60e3-edec-eac2cf7d3d52'},
With which browser does that problem occur? Can you verify that this is a caching problem by looking at the network console of the browser? Caching problems on the browser side have not been observed so far. I would rather expect that the list is not updated on the server side of the module (i.e., loaded only once).
(In reply to Alexander Kläser from comment #1) > With which browser does that problem occur? Chromium Version 34.0.1847.137 Debian 7.5 (268882) > Can you verify that this is a caching problem by looking at the network console of the browser? I debugged this in JS-Console: The Python backend process keeps sending the old and stale data. If I do it through umc-command, I get different values (from a newly launched backend process). > I would > rather expect that the list is not updated on the server side of the module > (i.e., loaded only once). IMHO something fishy is going on in the backend.
The command is: # umc-command -U Administrator -P univention uvmm/storage/pool/query -o nodeURI=qemu://xen12.phahn.dev/system -r The problem occurs when a new storage volume is created, which decreases the remaining available storage pool size when a new VM is created. When creating a 2nd VM, the old available capacity is still shown.
(In reply to Philipp Hahn from comment #2) > ... > > Can you verify that this is a caching problem by looking at the network console of the browser? > > I debugged this in JS-Console: The Python backend process keeps sending the > old and stale data. > > If I do it through umc-command, I get different values (from a newly > launched backend process). umc-command launches every time a new session. If you work with an existing session, the value is cached upon the first query, afterwards you get the cached value: > def storage_pool_query(self, request): > ... > self.required_options(request, 'nodeURI') > uri = request.options['nodeURI'] > if uri in self.storage_pools: > self.finished(request.id, self.storage_pools[uri].values()) > return > ... Nothing fishy, just an intended caching mechanism :) .
(In reply to Alexander Kläser from comment #4) > umc-command launches every time a new session. If you work with an existing > session, the value is cached upon the first query, afterwards you get the > cached value: This specific value MUST NOT be cached, as creating a VM reduces the available storage pool capacity which MUST BE updated for the next VM to be created. Please provide a mechanism to disable caching.
Created attachment 5950 [details] Patch to disable caching (In reply to Philipp Hahn from comment #5) > ..., > Please provide a mechanism to disable caching. Of course. Attached you find a minimal patch ;) .
Created attachment 5951 [details] Patch to disable caching Oops, that was the wrong patch...
This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018. Customers still on UCS 4.1 are encouraged to update to UCS 4.3. Please contact your partner or Univention for any questions. If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.