Bug 36106 - noVNC error when /var on other partition than /tmp, Failed to connect to server (code: 1006)
noVNC error when /var on other partition than /tmp, Failed to connect to serv...
Status: CLOSED DUPLICATE of bug 36988
Product: UCS
Classification: Unclassified
Component: UMC - VNC
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 4.0-0-errata
Assigned To: Philipp Hahn
Erik Damrose
:
Depends on:
Blocks: 36488
  Show dependency treegraph
 
Reported: 2014-10-09 11:56 CEST by Daniel Tröder
Modified: 2015-01-26 13:26 CET (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
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:


Attachments
patch for /usr/lib/pymodules/python2.6/univention/uvmm/node.py (555 bytes, patch)
2014-10-09 11:56 CEST, Daniel Tröder
Details | Diff
Fix noVNC temporary file location (2.55 KB, patch)
2014-11-18 20:10 CET, Philipp Hahn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder 2014-10-09 11:56:41 CEST
Created attachment 6152 [details]
patch for /usr/lib/pymodules/python2.6/univention/uvmm/node.py

With a separate /var, the Python operation os.rename() fails on Linux when used with a file that was created with tempfile.NamedTemporaryFile() as that will by default create a file in /tmp.

The result will be an empty novnc tokens file in /var/cache/univention-virtual-machine-manager-daemon/novnc.tokens/ an thus no HTML5 client.

The appended patch fixes that.
Comment 1 Philipp Hahn univentionstaff 2014-11-18 19:54:31 CET
Also PT UCS-4.0-0 with separate partition for /var/
Comment 2 Philipp Hahn univentionstaff 2014-11-18 20:10:03 CET
Created attachment 6414 [details]
Fix noVNC temporary file location

Create the temporary file on the same partition as the final file so an
atomic rename can be used to update the file.

shortly tested: works as exected
Comment 3 Philipp Hahn univentionstaff 2014-11-18 20:11:01 CET
Comment on attachment 6152 [details]
patch for /usr/lib/pymodules/python2.6/univention/uvmm/node.py

Thank you for your patch, but I prefer to create the file on the same partition and use an atomic rename.
Comment 4 Daniel Tröder 2014-11-19 09:27:44 CET
Thank you, your patch works for me on 3.2-4 too.
Comment 5 Philipp Hahn univentionstaff 2014-11-19 09:36:00 CET
(In reply to Daniel Tröder from comment #4)
> Thank you, your patch works for me on 3.2-4 too.

Thank you for the feedback.
I'll re-open this bug until the patch is applied to 3.2-x and 4.0-y.
Comment 6 Philipp Hahn univentionstaff 2014-11-26 21:51:59 CET

*** This bug has been marked as a duplicate of bug 36988 ***
Comment 7 Erik Damrose univentionstaff 2015-01-22 17:01:17 CET
Verified duplicate