Bug 35081 - UMC caching prevents UVMM storgage pool update
UMC caching prevents UVMM storgage pool update
Status: CLOSED WONTFIX
Product: UCS
Classification: Unclassified
Component: UMC - Virtual machines (UVMM)
UCS 4.1
All Linux
: P5 normal (vote)
: UCS 3.2-x
Assigned To: UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-10 10:37 CEST by Philipp Hahn
Modified: 2023-06-28 10:51 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 1: Cosmetic issue or missing function but workaround exists
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.006
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
klaeser: Patch_Available+


Attachments
Patch to disable caching (1.34 KB, patch)
2014-06-12 10:25 CEST, Alexander Kläser
Details | Diff
Patch to disable caching (466 bytes, patch)
2014-06-12 10:26 CEST, Alexander Kläser
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2014-06-10 10:37:41 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'},
Comment 1 Alexander Kläser univentionstaff 2014-06-11 14:23:10 CEST
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).
Comment 2 Philipp Hahn univentionstaff 2014-06-11 17:40:37 CEST
(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.
Comment 3 Philipp Hahn univentionstaff 2014-06-12 10:06:04 CEST
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.
Comment 4 Alexander Kläser univentionstaff 2014-06-12 10:07:54 CEST
(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 :) .
Comment 5 Philipp Hahn univentionstaff 2014-06-12 10:10:33 CEST
(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.
Comment 6 Alexander Kläser univentionstaff 2014-06-12 10:25:58 CEST
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 ;) .
Comment 7 Alexander Kläser univentionstaff 2014-06-12 10:26:51 CEST
Created attachment 5951 [details]
Patch to disable caching

Oops, that was the wrong patch...
Comment 8 Stefan Gohmann univentionstaff 2019-01-03 07:21:18 CET
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.