Univention Bugzilla – Bug 34725
uvmm/node.py use shutil.move instead of os.rename
Last modified: 2015-01-21 12:23:41 CET
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
(In reply to Janis Meybohm from comment #0) > The use of os.rename should be avoided, it should be replaced with shutil.move No: cross-device renames are not atomic and introduce other cases with file permission/disc full/etc. The file should instead be created inside the same directory with a prefix/suffix/different name and then be renamed.
Ticket#2014110521000477 Reported again.
Reported Again 2014112421000628
r56208 | Bug #34725 UVMM: Fix noVNC temporary file location r56210 | Bug #34725 UVMM: Fix noVNC temporary file location YAML Package: univention-virtual-machine-manager-daemon Version: 3.0.18-2.562.201411262140 Branch: ucs_3.2-0 Scope: errata3.2-4
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
http://errata.univention.de/ucs/3.2/275.html