Bug 36988 - uvmm/node.py use shutil.move instead of os.rename
uvmm/node.py use shutil.move instead of os.rename
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Virtualization - UVMM
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-0-errata
Assigned To: Philipp Hahn
Erik Damrose
:
: 36106 (view as bug list)
Depends on: 34725
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-25 08:56 CET by Stefan Gohmann
Modified: 2015-01-29 11:48 CET (History)
6 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

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2014-11-25 08:56:22 CET
Please check a merge to UCS 4.0

+++ This bug was initially created as a clone of Bug #34725 +++

2014043021004395

node.py breaks when cache dir is on a different partition than /tmp/. The use of os.rename should be avoided, it should be replaced with shutil.move 


2014-04-30 13:40:22,664 - uvmmd.node - ERROR - ('qemu://SERVER1.tlt.local/system',): Exception in timer_callbck
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/univention/uvmm/node.py", line 578, in run
    self.update_autoreconnect()
  File "/usr/lib/pymodules/python2.6/univention/uvmm/node.py", line 597, in update_autoreconnect
    self.update()
  File "/usr/lib/pymodules/python2.6/univention/uvmm/node.py", line 771, in update
    self.write_novnc_tokens()
  File "/usr/lib/pymodules/python2.6/univention/uvmm/node.py", line 790, in write_novnc_tokens
    os.rename(tmp_file.name, path)
OSError: [Errno 18] Invalid cross-device link
Comment 1 Philipp Hahn univentionstaff 2014-11-26 21:50:35 CET
r56207 | Bug #36988 UVMM: Fix noVNC temporary file location
r56209 | Bug #36988 UVMM: Fix noVNC temporary file location YAML

Package: univention-virtual-machine-manager-daemon
Version: 4.0.20-3.563.201411262140
Branch: ucs_4.0-0
Scope: errata4.0-0
Comment 2 Philipp Hahn univentionstaff 2014-11-26 21:51:59 CET
*** Bug 36106 has been marked as a duplicate of this bug. ***
Comment 3 Erik Damrose univentionstaff 2015-01-21 15:30:40 CET
OK: temporary file is created in the same directory as the target file, still use os.rename to replace the original file
OK: YAML
Verified
Comment 4 Janek Walkenhorst univentionstaff 2015-01-29 11:48:29 CET
<http://errata.univention.de/ucs/4.0/52.html>